项目前期是在一台服务器建立了两个实例,客户端配置两个连接,现在需要把两个实例整合其中一个实例中去,要求不更改客户端的配置
背景:
项目前期是在一台服务器建立了两个实例,客户端配置两个连接,现在需要把两个实例整合其中一个实例中去,要求不更改客户端的配置。
例如
整合前有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
声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com