Oracle shared service connects to static registration service, oracle static
Oracle shared service connection static registration service
By default, the oracle shared service is registered to the dynamic registration service.
Sys @ PROD3> select * from v $ version where rownum = 1;
BANNER
Certificate ----------------------------------------------------------------------------------------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
[Oracle @ server1 admin] $ cat listener. ora
# Listener. ora Network Configuration File:/home/u01/app/oracle/product/11.2.0/db_1/network/admin/listener. ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = prod3.oracle.com) -- this is a static registration service.
(ORACLE_HOME =/home/u01/app/oracle/product/11.2.0/db_1)
(SID_NAME = PROD3)
)
(SID_DESC =
(GLOBAL_DBNAME = PLSExtProc)
(ORACLE_HOME =/home/u01/app/oracle/product/11.2.0/db_1)
(SID_NAME = PLSExtProc)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = server1) (PORT = 1521 ))
)
Set the Shared Server:
Alter system set DISPATCHERS = '(PROTOCOL = TCP) (DISPATCHERS = 3 )';
Alter system set shared_server_session= 200 scope = both;
Alter system set max_dispatchers = 10 scope = both;
Alter system set shared_servers = 10 scope = both;
Alter system set max_shared_servers = 30 scope = both;
[Oracle @ server1 admin] $ lsnrctl services
LSNRCTL for Linux: Version 11.2.0.3.0-Production on 20-APR-2015 15:46:17
Copyright (c) 1991,201 1, Oracle. All rights reserved.
Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = server1) (PORT = 1521 )))
Services Summary...
Service "PLSExtProc" has 1 instance (s ).
Instance "PLSExtProc", status UNKNOWN, has 1 handler (s) for this service...
Handler (s ):
"DEDICATED" established: 0 refused: 0
LOCAL SERVER
Service "PROD3" has 1 instance (s ).
Instance "PROD3", status READY, has 4 handler (s) for this service...
Handler (s ):
"DEDICATED" established: 0 refused: 0 state: ready
LOCAL SERVER
"D001" established: 0 refused: 0 current: 0 max: 1022 state: ready
DISPATCHER <machine: server1, pid: 6889>
(ADDRESS = (PROTOCOL = tcp) (HOST = server1) (PORT = 57907 ))
"D000" established: 0 refused: 0 current: 0 max: 1022 state: ready
DISPATCHER <machine: server1, pid: 6887>
(ADDRESS = (PROTOCOL = tcp) (HOST = server1) (PORT = 64757 ))
"D002" established: 0 refused: 0 current: 0 max: 1022 state: ready
DISPATCHER <machine: server1, pid: 6891>
(ADDRESS = (PROTOCOL = tcp) (HOST = server1) (PORT = 31428 ))
Service "prod3.oracle.com" has 1 instance (s ).
Instance "PROD3", status UNKNOWN, has 1 handler (s) for this service...
Handler (s ):
"DEDICATED" established: 0 refused: 0
LOCAL SERVER
The command completed successfully
-- The static registration service prod3.oracle.com does not contain dispatcher, and the dynamic registration of prod3 contains
Cat tnsnames. ora
PROD3_S =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = server1) (PORT = 1521 ))
)
(CONNECT_DATA =
(Server = shared)
(SERVICE_NAME = prod3.oracle.com)
)
)
PROD3 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = server1) (PORT = 1521 ))
)
(CONNECT_DATA =
(Server = dedicated)
(SERVICE_NAME = prod3.oracle.com)
)
)
Because the service prod3.oracle.com does not contain dispatcher, an error occurs when you connect as a shared service.
[Oracle @ server1 admin] $ sqlplussys/oracle @ prod3_s as sysdba
SQL * Plus: Release 11.2.0.3.0 Production on Mon Apr 20 15:48:49 2015
Copyright (c) 1982,201 1, Oracle. All rights reserved.
ERROR:
ORA-12523: TNS: listener cocould not find instance appropriate for the client
Connection
Register the shared service to a static listener
Modify parameters
Alter system set dispatchers = '(PROTOCOL = TCP) (DISPATCHERS = 3) (SERVICE = PROD3, PROD3.ORACLE. COM )';
Specify service parameters
[Oracle @ server1 admin] $ lsnrctl services
LSNRCTL for Linux: Version 11.2.0.3.0-Production on 20-APR-2015 15:49:42
Copyright (c) 1991,201 1, Oracle. All rights reserved.
Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = server1) (PORT = 1521 )))
Services Summary...
Service "PLSExtProc" has 1 instance (s ).
Instance "PLSExtProc", status UNKNOWN, has 1 handler (s) for this service...
Handler (s ):
"DEDICATED" established: 0 refused: 0
LOCAL SERVER
Service "PROD3" has 1 instance (s ).
Instance "PROD3", status READY, has 4 handler (s) for this service...
Handler (s ):
"DEDICATED" established: 0 refused: 0 state: ready
LOCAL SERVER
"D002" established: 0 refused: 0 current: 0 max: 1022 state: ready
DISPATCHER <machine: server1, pid: 6891>
(ADDRESS = (PROTOCOL = tcp) (HOST = server1) (PORT = 31428 ))
"D001" established: 0 refused: 0 current: 0 max: 1022 state: ready
DISPATCHER <machine: server1, pid: 6889>
(ADDRESS = (PROTOCOL = tcp) (HOST = server1) (PORT = 57907 ))
"D000" established: 0 refused: 0 current: 0 max: 1022 state: ready
DISPATCHER <machine: server1, pid: 6887>
(ADDRESS = (PROTOCOL = tcp) (HOST = server1) (PORT = 64757 ))
Service "prod3.oracle.com" has 2 instance (s ).
Instance "PROD3", status UNKNOWN, has 1 handler (s) for this service...
Handler (s ):
"DEDICATED" established: 0 refused: 0
LOCAL SERVER
Instance "PROD3", status READY, has 3 handler (s) for this service...
Handler (s ):
"D002" established: 0 refused: 0 current: 0 max: 1022 state: ready
DISPATCHER <machine: server1, pid: 6891>
(ADDRESS = (PROTOCOL = tcp) (HOST = server1) (PORT = 31428 ))
"D001" established: 0 refused: 0 current: 0 max: 1022 state: ready
DISPATCHER <machine: server1, pid: 6889>
(ADDRESS = (PROTOCOL = tcp) (HOST = server1) (PORT = 57907 ))
"D000" established: 0 refused: 0 current: 0 max: 1022 state: ready
DISPATCHER <machine: server1, pid: 6887>
(ADDRESS = (PROTOCOL = tcp) (HOST = server1) (PORT = 64757 ))
The command completed successfully
Access with a Shared Server:
[Oracle @ server1 admin] $ sqlplus sys/oracle @ prod3_s as sysdba
SQL * Plus: Release 11.2.0.3.0 Production on Mon Apr 20 15:50:09 2015
Copyright (c) 1982,201 1, Oracle. All rights reserved.
Connected:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Sys @ PROD3>
This article is an original article. Do not reprint it. If you need to reprint, please indicate in detail the reprint Source