Oracle12c开启scott账户

Posted hackyo

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Oracle12c开启scott账户相关的知识,希望对你有一定的参考价值。

在oracle目录app\orcl\product\12.1.0\dbhome_1\NETWORK\ADMIN\下tnsnames.ora文件最后加入以下内容

PDBORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = PDBORCL)
    )
  )

然后进入sqlplus连接登陆sys账号,运行以下语句

SQL > conn sysYouPassword as sysdba;
SQL > alter session set container = PDBORCL;
SQL > startup
SQL > conn [email protected] as sysdba;
SQL > alter user scott account unlock identified by tiger;
SQL > conn sysYouPassword as sysdba;
SQL > CREATE OR REPLACE TRIGGER open_all_pdbs
    AFTER STARTUP
    ON DATABASE
    BEGIN
    EXECUTE IMMEDIATE alter pluggable database all open;
    END open_all_pdbs;    
SQL > shutdown immediate
SQL > startup

至此已经可以使用账号[email protected]密码tiger登陆了

以上是关于Oracle12c开启scott账户的主要内容,如果未能解决你的问题,请参考以下文章

Oracle 12c 添加scott用户

Oracle12c解锁scott测试用户

Oracle 12c如何创建scott用户

Oracle12c新特性pdborcl,如何登录到普通用户scott ?

疯狂安装oracle 12c,此版本没有scott这个用户

在Oracle12c上添加了Scott用户,但是为啥再次进入的时候却显示invalid username/password;logon denied