Thursday, January 7, 2016

Create pluggable database

Create pluggable database
PDB1@ORCL> alter session set container=cdb$root;
Session altered.
PDB1@ORCL> set lines 350
PDB1@ORCL> select * from cdb_pdbs;
    PDB_ID PDB_NAME    DBID    CON_UID GUID                             STATUS        CREATION_SCN     CON_ID
---------- ----------- ---------- ---------- -------------------------------- ------------- ------------ ----------
         2 PDB$SEED    4080030308 4080030308 F081641BB43F0F7DE045000000000001 NORMAL             1720754          1
         3 PDB1        3345156736 3345156736 F0832BAF14721281E045000000000001 NORMAL             2244252          1
PDB1@ORCL>
17:11:23 PDB1@ORCL> create pluggable database pdbmic1 admin user admin1 identified by admin1 roles=(connect);
Pluggable database created.
Elapsed: 00:00:59.45
17:13:38 PDB1@ORCL>
17:14:47 PDB1@ORCL> select * from cdb_pdbs;
    PDB_ID PDB_NAME         DBID    CON_UID GUID                             STATUS        CREATION_SCN     CON_ID
---------- ---------- ---------- ---------- -------------------------------- ------------- ------------ ----------
         2 PDB$SEED   4080030308 4080030308 F081641BB43F0F7DE045000000000001 NORMAL             1720754          1
         3 PDB1       3345156736 3345156736 F0832BAF14721281E045000000000001 NORMAL             2244252          1
         4 PDBMIC1    4078413767 4078413767 28B29D2DABB27F6FE055000000000001 NEW                3212466          1
Elapsed: 00:00:00.14
17:14:58 PDB1@ORCL> alter pluggable database pdbmic1 open read write;
Pluggable database altered.
Elapsed: 00:00:18.29
17:15:54 PDB1@ORCL> select * from cdb_pdbs;
    PDB_ID PDB_NAME         DBID    CON_UID GUID                             STATUS        CREATION_SCN     CON_ID
---------- ---------- ---------- ---------- -------------------------------- ------------- ------------ ----------
         2 PDB$SEED   4080030308 4080030308 F081641BB43F0F7DE045000000000001 NORMAL             1720754          1
         3 PDB1       3345156736 3345156736 F0832BAF14721281E045000000000001 NORMAL             2244252          1
         4 PDBMIC1    4078413767 4078413767 28B29D2DABB27F6FE055000000000001 NORMAL             3212466          1
Elapsed: 00:00:00.34
17:16:50 PDB1@ORCL> show user
USER is "SYS"
17:17:06 PDB1@ORCL> 

No comments: