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"
要显示PDB并从根容器连接到可插入数据库,请执行以下操作:
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB READ WRITE NO
SQL> alter session set container = ORCLPDB;
Session altered.
SQL> show con_name;
CON_NAME
------------------------------
ORCLPDB
sql plus
SQL> connect as sysdba;
Enter user-name: sysdba
Enter password:
Connected.
SQL> ALTER USER hr account unlock identified by hr;
User altered
then create user on sql plus and sql developer
$ sqlplus sys/<your_admin_pws>@localhost as sysdba
然后执行这个:
create pluggable database MYDATABASE
admin user Scott identified by tiger;
file_name_convert = ('/pdbseed/', '/mydatabase/')
;
alter pluggable database MYDATABASE open;