Oracle Database 12c New Features

Showing posts with label lsnrctl. Show all posts
Showing posts with label lsnrctl. Show all posts

Explore Oracle 12c Services In RAC

To check the services via Oracle Listener

[oracle@ora12cn1 admin]$ lsnrctl status
LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 21-NOV-2013 22:23:08
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.1.0 - Production
Start Date                21-NOV-2013 14:25:29
Uptime                    0 days 7 hr. 57 min. 39 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/12.1.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/ora12cn1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.101)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.111)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=ora12cn1.localdomain)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/product/12.1.0/db_1/admin/ora12c/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "ora12c" has 1 instance(s).
  Instance "ora12c_1", status READY, has 1 handler(s) for this service...
Service "ora12cXDB" has 1 instance(s).
  Instance "ora12c_1", status READY, has 1 handler(s) for this service...
Service "quote" has 1 instance(s).
  Instance "ora12c_1", status READY, has 1 handler(s) for this service...
The command completed successfully

Make sure that the listener is started, if not started start the listener. To view detail services use services parameter

[oracle@ora12cn1 admin]$ lsnrctl services
LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 21-NOV-2013 22:24:29
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
Service "ora12c" has 1 instance(s).
  Instance "ora12c_1", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:3 refused:0 state:ready
         LOCAL SERVER
Service "ora12cXDB" has 1 instance(s).
  Instance "ora12c_1", status READY, has 1 handler(s) for this service...
    Handler(s):
      "D000" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: ora12cn1, pid: 3844>
         (ADDRESS=(PROTOCOL=tcp)(HOST=ora12cn1.localdomain)(PORT=21683))
Service "quote" has 1 instance(s).
  Instance "ora12c_1", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:3 refused:0 state:ready
         LOCAL SERVER
The command completed successfully



To list the services automatically created for each container.


SQL> SELECT name, con_id FROM v$services;
NAME               CON_ID
-------------------- ----------
quote                       3
ora12cXDB                    1
ora12c                      1
SYS$BACKGROUND                1
SYS$USERS                    1


Note: There we will never have PDB$SEED service because, we never can connect to the PDB SEED, in this example case I only have 1 PDB namely QUOTE.

SQL> col pdb_name form a20
SQL> select pdb_id, pdb_name from cdb_pdbs;
PDB_ID     PDB_NAME
---------- --------------------
2 PDB$SEED
       3 QUOTE

Explore Oracle 12c Services In RAC

To check the services via Oracle Listener

[oracle@ora12cn1 admin]$ lsnrctl status
LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 21-NOV-2013 22:23:08
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.1.0 - Production
Start Date                21-NOV-2013 14:25:29
Uptime                    0 days 7 hr. 57 min. 39 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/12.1.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/ora12cn1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.101)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.111)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=ora12cn1.localdomain)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/product/12.1.0/db_1/admin/ora12c/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "ora12c" has 1 instance(s).
  Instance "ora12c_1", status READY, has 1 handler(s) for this service...
Service "ora12cXDB" has 1 instance(s).
  Instance "ora12c_1", status READY, has 1 handler(s) for this service...
Service "quote" has 1 instance(s).
  Instance "ora12c_1", status READY, has 1 handler(s) for this service...
The command completed successfully

Make sure that the listener is started, if not started start the listener. To view detail services use services parameter

[oracle@ora12cn1 admin]$ lsnrctl services
LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 21-NOV-2013 22:24:29
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
Service "ora12c" has 1 instance(s).
  Instance "ora12c_1", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:3 refused:0 state:ready
         LOCAL SERVER
Service "ora12cXDB" has 1 instance(s).
  Instance "ora12c_1", status READY, has 1 handler(s) for this service...
    Handler(s):
      "D000" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: ora12cn1, pid: 3844>
         (ADDRESS=(PROTOCOL=tcp)(HOST=ora12cn1.localdomain)(PORT=21683))
Service "quote" has 1 instance(s).
  Instance "ora12c_1", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:3 refused:0 state:ready
         LOCAL SERVER
The command completed successfully



To list the services automatically created for each container.


SQL> SELECT name, con_id FROM v$services;
NAME               CON_ID
-------------------- ----------
quote                       3
ora12cXDB                    1
ora12c                      1
SYS$BACKGROUND                1
SYS$USERS                    1


Note: There we will never have PDB$SEED service because, we never can connect to the PDB SEED, in this example case I only have 1 PDB namely QUOTE.

SQL> col pdb_name form a20
SQL> select pdb_id, pdb_name from cdb_pdbs;
PDB_ID     PDB_NAME
---------- --------------------
2 PDB$SEED
       3 QUOTE