oracle 12c 解锁scott用户
安装oracle 12c的时候没有解锁scott用户。安装后解锁步骤:
-
sqlplus / as sysdba
@path\to\RDBMS\ADMIN\scott.sql
-
修改文件:path\to\NETWORK\ADMIN\tnsnames.ora
PDBORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = pdborcl) ) )
-
重启
SHUTDOWN IMMEDIATE; STARTUP;
-
sqlplus / as sysdba
CREATE OR REPLACE TRIGGER open_pdbs AFTER STARTUP ON DATABASE BEGIN EXECUTE IMMEDIATE 'ALTER PLUGGABLE DATABASE ALL OPEN'; END open_pdbs; /
-
sqlplus SYS/password@PDBORCL AS SYSDBA
SQL> ALTER USER scott ACCOUNT UNLOCK IDENTIFIED BY tiger; sqlplus scott/tiger@pdborcl SQL> show user; USER is "SCOTT"
参考:
http://lalitkumarb.com/2014/10/01/mandatory-steps-for-12c-installation/
http://skyuck.iteye.com/blog/845225