[oracle@myorasrv rdbms]$ . oraenv
ORACLE_SID = [cdb1] ? cdb2
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1 is /u01/app/oracle
[oracle@myorasrv rdbms]$ mkdir $ORACLE_BASE/oradata/cdb2/pdb2_1
[oracle@myorasrv rdbms]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Mon Feb 1 05:41:41 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> create pluggable database pdb2_1 admin user pdb2_1_admin
2 identified by oracle_4U roles=(connect)
3 create_file_dest='/u01/app/oracle/oradata/cdb2/pdb2_1';
Pluggable database created.
SQL> col name for a10
SQL> select con_id,name,open_mode,dbid,con_uid from v$pdbs;
CON_ID NAME OPEN_MODE DBID CON_UID
---------- ---------- ---------- ---------- ----------
2 PDB$SEED READ ONLY 159907668 159907668
3 PDB2_1 MOUNTED 1547403331 1547403331
SQL> alter pluggable database pdb2_1 open;
Pluggable database altered.
SQL> exit
[oracle@myorasrv ~]$ netca
Oracle Net Services Configuration:
..............................
[oracle@myorasrv ~]$ sqlplus sys@pdb2_1 as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Mon Feb 1 05:53:36 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> !lsnrctl status
.....
Service pdb2_1 has 1 instance(s).
....
SQL> connect sys\@localhost:1521\/pdb2_1 as sysdba
Enter password:
Connected.
SQL> connect pdb2_1_admin@PDB2_1
Enter password:
Connected.
SQL> show con_name
CON_NAME
------------------------------
PDB2_1
======================================
SQL> !ls -R $ORACLE_BASE/oradata/cdb2/pdb2_1/*
/u01/app/oracle/oradata/cdb2/pdb2_1/CDB2:
2AAFE0C2280B728AE0533834960ABEB9
/u01/app/oracle/oradata/cdb2/pdb2_1/CDB2/2AAFE0C2280B728AE0533834960ABEB9:
datafile
/u01/app/oracle/oradata/cdb2/pdb2_1/CDB2/2AAFE0C2280B728AE0533834960ABEB9/datafile:
o1_mf_sysaux_cbxw5xtk_.dbf o1_mf_system_cbxw5xtd_.dbf o1_mf_temp_cbxw5xtl_.dbf
SQL> !ls -l $ORACLE_BASE/oradata/cdb2/pdb2_1/*
total 4
drwxr-x--- 3 oracle oinstall 4096 Feb 1 05:44 2AAFE0C2280B728AE0533834960ABEB9
ORACLE_SID = [cdb1] ? cdb2
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1 is /u01/app/oracle
[oracle@myorasrv rdbms]$ mkdir $ORACLE_BASE/oradata/cdb2/pdb2_1
[oracle@myorasrv rdbms]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Mon Feb 1 05:41:41 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> create pluggable database pdb2_1 admin user pdb2_1_admin
2 identified by oracle_4U roles=(connect)
3 create_file_dest='/u01/app/oracle/oradata/cdb2/pdb2_1';
Pluggable database created.
SQL> col name for a10
SQL> select con_id,name,open_mode,dbid,con_uid from v$pdbs;
CON_ID NAME OPEN_MODE DBID CON_UID
---------- ---------- ---------- ---------- ----------
2 PDB$SEED READ ONLY 159907668 159907668
3 PDB2_1 MOUNTED 1547403331 1547403331
SQL> alter pluggable database pdb2_1 open;
Pluggable database altered.
SQL> exit
[oracle@myorasrv ~]$ netca
Oracle Net Services Configuration:
..............................
[oracle@myorasrv ~]$ sqlplus sys@pdb2_1 as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Mon Feb 1 05:53:36 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> !lsnrctl status
.....
Service pdb2_1 has 1 instance(s).
....
SQL> connect sys\@localhost:1521\/pdb2_1 as sysdba
Enter password:
Connected.
SQL> connect pdb2_1_admin@PDB2_1
Enter password:
Connected.
SQL> show con_name
CON_NAME
------------------------------
PDB2_1
======================================
SQL> !ls -R $ORACLE_BASE/oradata/cdb2/pdb2_1/*
/u01/app/oracle/oradata/cdb2/pdb2_1/CDB2:
2AAFE0C2280B728AE0533834960ABEB9
/u01/app/oracle/oradata/cdb2/pdb2_1/CDB2/2AAFE0C2280B728AE0533834960ABEB9:
datafile
/u01/app/oracle/oradata/cdb2/pdb2_1/CDB2/2AAFE0C2280B728AE0533834960ABEB9/datafile:
o1_mf_sysaux_cbxw5xtk_.dbf o1_mf_system_cbxw5xtd_.dbf o1_mf_temp_cbxw5xtl_.dbf
SQL> !ls -l $ORACLE_BASE/oradata/cdb2/pdb2_1/*
total 4
drwxr-x--- 3 oracle oinstall 4096 Feb 1 05:44 2AAFE0C2280B728AE0533834960ABEB9
No comments:
Post a Comment