oracle动态注册和静态注册的区别:动态监听不需要在listener.ora文件中记录关于数据的任何信息,只需要将监听器的配置信息写入到该文件。例如:
新密网站制作公司哪家好,找创新互联公司!从网页设计、网站建设、微信开发、APP开发、成都响应式网站建设公司等网站项目制作,到程序开发,运营维护。创新互联公司公司2013年成立到现在10年的时间,我们拥有了丰富的建站经验和运维经验,来保证我们的工作的顺利进行。专注于网站建设就选创新互联公司。
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS=(PROTOCOL = IPC) (KEY=EXTPRO1))
(ADDRESS=(PROTOCOL = TCP)(HOST = 192.168.2.29)(PORT = 1521))
)
)
客户端的tnsnames.ora配置信息,需要加入每个service_name,其他的任何东西不需要改动,例如
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)
)
)
动态监听步骤:
服务器端配置如下:
设置service_names:
alter system set service_names=test1,test2,test3;
2. 编写listener.ora文件:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS=(PROTOCOL = IPC) (KEY=EXTPRO1))
(ADDRESS=(PROTOCOL = TCP)(HOST = 192.168.2.29)(PORT = 1521))
)
)
3.重新启动oracle实例,这样做才能使service_names生效。(前提是oracle处于open状态下才执行)
conn /as sysdba;
shutdown immediate;
startup;
客户端配置:
1.编辑tnsnames.ora,保存后立即生效。
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)
)
)
以上动态注册配置完毕。以上改为静态注册步骤。
只需要在服务器端修改listener.ora
售后响应及时
7×24小时客服热线数据备份
更安全、更高效、更稳定价格公道精准
项目经理精准报价不弄虚作假合作无风险
重合同讲信誉,无效全额退款