[oracle@myorasrv ~]$ . oraenv
ORACLE_SID = [cdb2] ? cdb2
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1 is /u01/app/oracle
[oracle@myorasrv ~]$ mkdir $ORACLE_BASE/oradata/cdb2/pdb2_2
[oracle@myorasrv ~]$ sqlplus / as sysdba
SQL> alter pluggable database pdb2_1 close;
Pluggable database altered.
SQL> alter pluggable database pdb2_1 open;
Pluggable database altered.
SQL> alter pluggable database pdb2_1 close;
Pluggable database altered.
SQL> alter pluggable database pdb2_1 open read only;
Pluggable database altered.
SQL> create pluggable database pdb2_2 from pdb2_1
2 CREATE_FILE_DEST='/u01/app/oracle/oradata/cdb2/pdb2_2';
Pluggable database created.
SQL> select name,open_mode from v$pdbs;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDB2_1 READ ONLY
PDB2_2 MOUNTED
SQL> alter pluggable database pdb2_1 close;
Pluggable database altered.
SQL> alter pluggable database pdb2_1 open;
Pluggable database altered.
SQL> alter pluggable database pdb2_2 open;
Pluggable database altered.
SQL> select name,open_mode from v$pdbs;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDB2_1 READ WRITE
PDB2_2 READ WRITE
SQL>
ORACLE_SID = [cdb2] ? cdb2
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1 is /u01/app/oracle
[oracle@myorasrv ~]$ mkdir $ORACLE_BASE/oradata/cdb2/pdb2_2
[oracle@myorasrv ~]$ sqlplus / as sysdba
SQL> alter pluggable database pdb2_1 close;
Pluggable database altered.
SQL> alter pluggable database pdb2_1 open;
Pluggable database altered.
SQL> alter pluggable database pdb2_1 close;
Pluggable database altered.
SQL> alter pluggable database pdb2_1 open read only;
Pluggable database altered.
SQL> create pluggable database pdb2_2 from pdb2_1
2 CREATE_FILE_DEST='/u01/app/oracle/oradata/cdb2/pdb2_2';
Pluggable database created.
SQL> select name,open_mode from v$pdbs;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDB2_1 READ ONLY
PDB2_2 MOUNTED
SQL> alter pluggable database pdb2_1 close;
Pluggable database altered.
SQL> alter pluggable database pdb2_1 open;
Pluggable database altered.
SQL> alter pluggable database pdb2_2 open;
Pluggable database altered.
SQL> select name,open_mode from v$pdbs;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDB2_1 READ WRITE
PDB2_2 READ WRITE
SQL>
No comments:
Post a Comment