您好,欢迎来到爱站旅游。
搜索
您的当前位置:首页Oracle单实例绑定多个服务

Oracle单实例绑定多个服务

来源:爱站旅游

项目前期是在一台服务器建立了两个实例,客户端配置两个连接,现在需要把两个实例整合其中一个实例中去,要求不更改客户端的配置

背景:

项目前期是在一台服务器建立了两个实例,客户端配置两个连接,现在需要把两个实例整合其中一个实例中去,要求不更改客户端的配置。

例如

整合前有test,standby2两个实例

整合后只有standby2这个实例

之前在RAC上用srvctl配置过,还没有在单实例上配置,现在具体操作整理如下:

1、创建服务

exec dbms_service.create_service('test','test');

select t.name,t.NETWORK_NAME from v$services t;

standby2,standby2

2、设置服务立即生效

alter system set service_names='standby2,test' ;

select t.name,t.NETWORK_NAME from v$services t;

standby2,standby2

test,test

3、重新加载监听

[Oracle@standby2 ~]$ lsnrctl reload

[oracle@standby2 ~]$ lsnrctl status;

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 15-SEP-2014 12:52:32

Copyright (c) 1991, 2013, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=standby2)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 15-SEP-2014 12:39:28
Uptime 0 days 0 hr. 13 min. 4 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/standby2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=standby2)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "test" has 1 instance(s).
Instance "standby2", status READY, has 1 handler(s) for this service...
Service "standby2" has 1 instance(s).
Instance "standby2", status READY, has 1 handler(s) for this service...
Service "standby2_DGMGRL" has 1 instance(s).
Instance "standby2", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

Copyright © 2019- azee.cn 版权所有 赣ICP备2024042794号-5

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务