Thursday, March 12, 2015

Completing initial CDB and PDB setup, after netca setup (via response file) we can see CDB and PDB services

After yesterday "Using dbca to setup new Oracle 12c example CDB and PDB via a silent response file", today looking at what I have created via v$pdbs and dba_pdbs)


SELECT name, open_mode FROM v$pdbs;

SQL>

NAME       OPEN_MODE
------------------------------ ----------
PDB$SEED       READ ONLY
PDB1       READ WRITE

and


col pdb_name form a30
SELECT pdb_name, status FROM dba_pdbs ORDER BY pdb_name;

SQL>

PDB_NAME       STATUS
------------------------------ -------------
PDB$SEED       NORMAL
PDB1       NORMAL

Next checking the datafiles from the OS level (i.e. tree command)


[oracle@ora12c66 ~]$ tree /u01/oradata/
/u01/oradata/
└── cdborcl
   ├── control01.ctl
   ├── pdb1
   │   ├── example01.dbf
   │   ├── pdb1_temp01.dbf
   │   ├── SAMPLE_SCHEMA_users01.dbf
   │   ├── sysaux01.dbf
   │   └── system01.dbf
   ├── pdbseed
   │   ├── pdbseed_temp01.dbf
   │   ├── sysaux01.dbf
   │   └── system01.dbf
   ├── redo01.log
   ├── redo02.log
   ├── redo03.log
   ├── sysaux01.dbf
   ├── system01.dbf
   ├── temp01.dbf
   ├── undotbs01.dbf
   └── users01.dbf


The service_names within the database relate to the main CDB instance (and not the PDB):



SQL> show parameter name

NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
cell_offloadgroup_name     string
db_file_name_convert     string
db_name     string cdborcl
db_unique_name     string cdborcl
global_names     boolean FALSE
instance_name     string cdborcl
lock_name_space     string
log_file_name_convert     string
pdb_file_name_convert     string
processor_group_name     string
service_names     string cdborcl
SQL> exit

Unfortunately the listener isn't configured;


[oracle@ora12c66 ~]$ lsnrctl status

LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 12-MAR-2015 12:28:54

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
 TNS-00511: No listener
  Linux Error: 111: Connection refused

So using netca


[oracle@ora12c66 ~]$ $ORACLE_HOME/bin/netca -silent -responseFile /vagrant/netca.rsp

Parsing command line arguments:
   Parameter "silent" = true
   Parameter "responsefile" = /vagrant/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
   Running Listener Control:
     /u01/product/12.1.0/db_1/bin/lsnrctl start LISTENER
   Listener Control complete.
   Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
and for completeness here is my netca.rsp response file:

[oracle@ora12c66 ~]$ cat /vagrant/netca.rsp
[GENERAL]
RESPONSEFILE_VERSION="12.1"
CREATE_TYPE="CUSTOM"
SHOW_GUI=false
[oracle.net.ca]
INSTALLED_COMPONENTS={"server","net8","javavm"}
INSTALL_TYPE=""typical""
LISTENER_NUMBER=1
LISTENER_NAMES={"LISTENER"}
LISTENER_PROTOCOLS={"TCP;1521"}
LISTENER_START=""LISTENER""
NAMING_METHODS={"TNSNAMES","ONAMES","HOSTNAME"}
NSN_NUMBER=1
NSN_NAMES={"EXTPROC_CONNECTION_DATA"}
NSN_SERVICE={"PLSExtProc"}
NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}

now we can see the CBD and PDB services are registered to the listener:



[oracle@ora12c66 ~]$ lsnrctl status

LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 12-MAR-2015 12:38:57

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

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                12-MAR-2015 12:38:48
Uptime                    0 days 0 hr. 0 min. 9 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/product/12.1.0/db_1/network/admin/listener.ora
Listener Log File         /u01/diag/tnslsnr/ora12c66/listener/alert/log.xml
Listening Endpoints Summary...
 (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora12c66)(PORT=1521)))
 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=ora12c66)(PORT=5500))(Security=(my_wallet_directory=/u01/admin/cdborcl/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "cdborcl" has 1 instance(s).
 Instance "cdborcl", status READY, has 1 handler(s) for this service...
Service "cdborclXDB" has 1 instance(s).
 Instance "cdborcl", status READY, has 1 handler(s) for this service...
Service "pdb1" has 1 instance(s).
 Instance "cdborcl", status READY, has 1 handler(s) for this service...
The command completed successfully


In my next blow post, I will start plugging/unplugging and cloning the PDBs


No comments:

Post a Comment