单例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

以上就是在standby2监控的两个服务standby2,test

4、关闭或删除之前的test实例

这里建议关闭,等运行一段时间后确定不需要这个实例才删除。

5、测试

以上只是说明了在不更改客户端配置的情况可下,怎么样保存应用的正常访问。至于怎么把实例test整合到standby2中并没有详细介绍,过程如下:

a、创建test实例所用到的用户及授权

b、创建test实例所需要的表空间

c、从test实例导出数据

b、导入数据到standby2实例

f、参考第5点测试

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值