DBA - Oracle 12c Exploring - Part 1
DBA - Oracle 12c Exploring - Part 1
DBA
Home Scripts Backup and Recovery Oracle Database
Container – either a PDB or the root container. Root contains the schema, schema objects and nonschema objects to which all
PDB’s belong. About Me
Every CDB has following.
San deep
ONE Root container It is the core of the CDB, contains all oracle supplied metadata like packages, core dictionary objects and
common users. It is denoted by CDB$ROOT. Follow 3
ONE seed PDB It is a template distributed for other PDB’s creation. It is named as PDB$SEED. We cant modify or add objects in
I am working as Sr. DBA an
PDB$SEED. started my career in early
USER CREATED PDB – It is the pluggable database created by users for their application purpose. It contains user data started with advanced repli
of oracle db and now focusing on various
1. To check whether the connected database is CONTAINER database (CDB) or PLUGGABLE database tasks. Exploring daily and learning various
like Ms Sql Sever, Mysql. I have decided t
a blog bit late but still I feel it would be wo
share the knowledge I learnt that might he
SQL> select name,cdb,con_id,con_dbid from v$database;
people.
NAME CDB CON_ID CON_DBID
Please do feel free to comment and corre
ORCL YES 0 1368449947 if I am wrong. I am glad to accept it.
http://sandeepnandhadba.blogspot.com.br/2014/05/oracle12cexploringpart1.html 1/4
11/06/2015 DBA : Oracle 12c exploring Part 1
Logical Volume and ...
[oracle@oeltest orcl]$ ls ltrh
Flushing single statement from
total 2.0G
Library cache
drwxrx. 2 oracle oinstall 4.0K Feb 27 23:17 pdbseed
drwxrx. 2 oracle oinstall 4.0K Feb 28 00:36 pdborcl Oracle 12c exploring Part 1
rwr. 1 oracle oinstall 51M Feb 28 09:53 redo01.log Edition Based Redefinition – Locks
rwr. 1 oracle oinstall 51M Feb 28 09:53 redo03.log and No Data Fou...
rwr. 1 oracle oinstall 5.1M Feb 28 09:53 users01.dbf
rwr. 1 oracle oinstall 89M Feb 28 10:04 temp01.dbf Edition Based Redefiniton 11gR2
rwr. 1 oracle oinstall 216M Feb 28 10:10 undotbs01.dbf Certification
rwr. 1 oracle oinstall 761M Feb 28 10:10 sysaux01.dbf
rwr. 1 oracle oinstall 781M Feb 28 10:10 system01.dbf Steps to apply patch set from
11.2.0.3.0 to 11.2.0...
rwr. 1 oracle oinstall 18M Feb 28 10:10 control01.ctl
rwr. 1 oracle oinstall 51M Feb 28 10:10 redo02.log
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.1.0 Production
Start Date 28FEB2014 10:24:47
Uptime 0 days 0 hr. 0 min. 42 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/oeltest/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oeltest.localdomain)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=oeltest.localdomain)(PORT=5500))(Security=
(my_wallet_directory=/u01/app/oracle/admin/orcl/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "orcl.localdomain" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB.localdomain" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "pdborcl.localdomain" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oeltest.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.localdomain)
)
)
To connect to pluggable database, directly, let us add tns entry in tnsnames.ora file.
PDBORCL =
(DESCRIPTION =
http://sandeepnandhadba.blogspot.com.br/2014/05/oracle12cexploringpart1.html 2/4
11/06/2015 DBA : Oracle 12c exploring Part 1
(ADDRESS = (PROTOCOL = TCP)(HOST = oeltest.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdborcl.localdomain)
)
)
TNS Ping Utility for Linux: Version 12.1.0.1.0 Production on 28FEB2014 10:31:29
Enter password:
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SYS_CONTEXT('USERENV','CON_NAME')
PDBORCL
b. Secondly, we can connect using alter session between CDB to PDB or from any PDB.
Session altered.
SYS_CONTEXT('USERENV
PDB$SEED
Session altered.
SYS_CONTEXT('USERENV
PDBORCL
Session altered.
SYS_CONTEXT('USERENV
CDB$ROOT
8. After logging to PDBORCL, let us see how the datafile structures are.
SQL> select name from v$datafile;
http://sandeepnandhadba.blogspot.com.br/2014/05/oracle12cexploringpart1.html 3/4
11/06/2015 DBA : Oracle 12c exploring Part 1
NAME
/data/orcl/undotbs01.dbf
/data/orcl/pdborcl/system01.dbf
/data/orcl/pdborcl/sysaux01.dbf
/data/orcl/pdborcl/pdborcl_users01.dbf
MEMBER
/data/orcl/redo03.log
/data/orcl/redo02.log
/data/orcl/redo01.log
NAME
/data/orcl/control01.ctl
/u01/app/oracle/fast_recovery_area/orcl/control02.ctl
No comments:
Post a Comment
Publish Preview
http://sandeepnandhadba.blogspot.com.br/2014/05/oracle12cexploringpart1.html 4/4