The difference between Oracle dynamic registration and static registration: Dynamic monitoring does not require any information about the data to be recorded in the Listener.ora file, only the configuration information of the listener is written to the file. For example:
LISTENER =
(Description_list =
(DESCRIPTION =
(address= (PROTOCOL = IPC) (Key=extpro1))
(address= (PROTOCOL = TCP) (HOST = 192.168.2.29) (PORT = 1521))
)
)
The client's Tnsnames.ora configuration information needs to be added to each service_name, and nothing else needs to be changed, such as
YUCESHI1 =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.2.29) (PORT = 1521))
)
(Connect_data =
(service_name = test1)
)
)
YUCESHI2 =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.2.29) (PORT = 1521))
)
(Connect_data =
(service_name = test2)
)
)
YUCESH3 =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.2.29) (PORT = 1521))
)
(Connect_data =
(service_name = test3)
)
)
Dynamic monitoring steps:
The server-side configuration is as follows:
Set Service_names:
alter system set SERVICE_NAMES=TEST1,TEST2,TEST3;
2. Write the Listener.ora file:
LISTENER =
(Description_list =
(DESCRIPTION =
(address= (PROTOCOL = IPC) (Key=extpro1))
(address= (PROTOCOL = TCP) (HOST = 192.168.2.29) (PORT = 1521))
)
)
3. Restart the Oracle instance for the Service_names to take effect. (only if Oracle is in open state)
Conn/as Sysdba;
Shutdown immediate;
Startup
Client Configuration:
1. Edit the Tnsnames.ora and take effect immediately after saving.
YUCESHI1 =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.2.29) (PORT = 1521))
)
(Connect_data =
(service_name = test1)
)
)
YUCESHI2 =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.2.29) (PORT = 1521))
)
(Connect_data =
(service_name = test2)
)
)
YUCESH3 =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.2.29) (PORT = 1521))
)
(Connect_data =
(service_name = test3)
)
)
The above dynamic registration configuration is complete. The above changes to the static registration step.
1. Only need to modify the Listener.ora configuration file on the server side. And a few more sid_desc on the line.
The configuration is as follows:
LISTENER =
(Description_list =
(DESCRIPTION =
(address= (PROTOCOL = IPC) (Key=extpro1))
(address= (PROTOCOL = TCP) (HOST = 192.168.2.29) (PORT = 1521))
)
)
# #上面是监听器配置部分, here is the database configuration section
Sid_list_listener =
(Sid_list =
(Sid_desc =
(Global_dbname = test1)
(Oracle_home =/opt/oracle/product/11.2.0/dbhome_1)
(Sid_name = ORCL)
)
(Sid_desc =
(Global_dbname = test2)
(Oracle_home =/opt/oracle/product/11.2.0/dbhome_1)
(Sid_name = ORCL)
)
(Sid_desc =
(Global_dbname = test3)
(Oracle_home =/opt/oracle/product/11.2.0/dbhome_1)
(Sid_name = ORCL)
)
)
2. Restart the monitor:
Su-oracle
Lsnrctl stop
Lsnrctl start
Configuration complete
This article is from the "Common Documents" blog, so be sure to keep this source http://yujianglei.blog.51cto.com/7215578/1558696
Oracle dynamic registration and static registration listener