Oracle Shared Services connection static registration service
The default Oracle Shared service is registered with the dynamic registration service.
[email protected] > select * from v$version where rownum=1;
BANNER
--------------------------------------------------------------------------------------------------------------- -------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
[[email protected] 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))
)
To set up a shared server:
alter system set DISPATCHERS = ' (protocol=tcp) (dispatchers=3) ';
Alter system set SHARED_SERVER_SESSIONS=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;
[Email protected] admin]$ LSNRCTL Services
Lsnrctl for linux:version 11.2.0.3.0-production on 20-apr-2015 15:46:17
Copyright (c) 1991, 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, have 1 handler (s) for the This service ...
Handler (s):
"Dedicated" established:0 refused:0
LOCAL SERVER
Service "PROD3"Has 1 instance (s).
Instance "PROD3", status Ready, have 4 handler (s) for the 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", statusUNKNOWN, have 1 handler (s) for the This service ...
Handler (s):
"Dedicated" established:0 refused:0
LOCAL SERVER
The command completed successfully
--Static registration service prod3.oracle.com There is no dispatcher, dynamic registration prod3 inside there
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 there is no dispatcher in the service prod3.oracle.com, you will get an error when you connect as a shared service ORA-12523
[email protected] admin]$ Sqlplus sys/[email protected]prod3_s As sysdba
Sql*plus:release 11.2.0.3.0 Production on Mon Apr 20 15:48:49 2015
Copyright (c) 1982, Oracle. All rights reserved.
ERROR:
Ora-12523:tns:listener could not find instance appropriate for the client
Connection
Registering a shared service with a static listener
modifying parameters
Alter system set dispatchers= ' (PROTOCOL=TCP) (dispatchers=3) (service=prod3,prod3. oracle.com) ';
Specifying Service parameters
[Email protected] admin]$ LSNRCTL Services
Lsnrctl for linux:version 11.2.0.3.0-production on 20-apr-2015 15:49:42
Copyright (c) 1991, 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, have 1 handler (s) for the This service ...
Handler (s):
"Dedicated" established:0 refused:0
LOCAL SERVER
Service "PROD3" has 1 instance (s).
Instance "PROD3", status ready, have 4 handler (s) for the 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, have 1 handler (s) for the This service ...
Handler (s):
"Dedicated" established:0 refused:0
LOCAL SERVER
Instance "PROD3", status ready, have 3 handler (s) for the 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
Now access with a shared server:
[Email protected] admin]$ sqlplus sys/[email protected]_s as sysdba
Sql*plus:release 11.2.0.3.0 Production on Mon Apr 20 15:50:09 2015
Copyright (c) 1982, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
With the partitioning, OLAP, Data Mining and Real application testing options
[email protected] >
This article is an original article, please do not reprint. Please indicate the source of the reprint in detail if necessary.
Oracle Shared Services connection static registration service