Oracle11gr2_ADG管理之switchover补充
之前演示的switchver总是提示下面的错误,并且需要人工干预:
Oracle11gr2_ADG管理之switchover实战
DGMGRL> switchover to snewtest;
Warning: You are no longer connected to ORACLE.
Please complete the following steps to finish switchover:
start up instance "newtest" of database "newtest"
解决方案
1.主库上配置 listener.ora
[oracle@localhost admin]$ vi listener.ora
# listener.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = newtest)
(ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_1/)
(SID_NAME = newtest)
)
(SID_DESC =
(GLOBAL_DBNAME = newtest_DGMGRL)
(ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_1/)
(SID_NAME = newtest)
)
)
2.备库上配置 listener.ora
[oracle@localhost ~]$ cd /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/
[oracle@localhost admin]$ vi listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = newtest)
(ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_1/)
(SID_NAME = newtest)
)
(SID_DESC =
(GLOBAL_DBNAME = snewtest_DGMGRL)
(ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_1/)
(SID_NAME = newtest)
)
)
3. 主备库重启lsrnctl
lsrnctl stop
lsrnctl start
任何库上执行切换
[oracle@localhost admin]$ dgmgrl sys/oracle@newtest
DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected.
切换到备库
DGMGRL> swithover to snewtest
Unrecognized command "swithover", try "help"
DGMGRL> switchover to snewtest;
Performing switchover NOW, please wait...
Operation requires a connection to instance "newtest" on database "snewtest"
Connecting to instance "newtest"...
Connected.
New primary database "snewtest" is opening...
Operation requires startup of instance "newtest" on database "newtest"
Starting instance "newtest"...
ORACLE instance started.
Database mounted.
Database opened.
Switchover succeeded, new primary is "snewtest"
切换回主库
DGMGRL> switchover to newtest;
Performing switchover NOW, please wait...
Operation requires a connection to instance "newtest" on database "newtest"
Connecting to instance "newtest"...
Connected.
New primary database "newtest" is opening...
Operation requires startup of instance "newtest" on database "snewtest"
Starting instance "newtest"...
ORACLE instance started.
Database mounted.
Database opened.
Switchover succeeded, new primary is "newtest"
这次的切换变得十分顺利 不需要人工干预了
Oracle11gr2_ADG管理之switchover补充的更多相关文章
- Oracle11gr2_ADG管理之switchover实战
. 环境 db_primary db_stanby 备注 db版本 11.2.0.4.0 11.2.0.4.0 os版本 centos 6.4 centos 6.4 db_unique_name ne ...
- SpringMVC拦截器2(资源和权限管理)(作为补充说明)
SpringMVC拦截器(资源和权限管理) 1.DispatcherServlet SpringMVC具有统一的入口DispatcherServlet,所有的请求都通过DispatcherServle ...
- Linux内存管理 (9)mmap(补充)
之前写过一篇简单的介绍mmap()/munmap()的文章<Linux内存管理 (9)mmap>,比较单薄,这里详细的梳理一下. 从常用的使用者角度介绍两个函数的使用:然后重点是分析内核的 ...
- Oracle11gr2_ADG管理之在备库上模拟failover的过程实战
技术建议和方案. 要求failover后不重建备库,并能够把failover的数据库重新切换回备库 主库为newtest,备库为snewtest 备库上已经开启了闪回 得到一个参考的SCN SQL&g ...
- Oracle11gr2_ADG管理之跳归档恢复dg实战
模拟故障 关闭备库 SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut dow ...
- Oracle11gR2_ADG管理之恢复主库的truncate表实战
备库开启flashback database #关闭备库的同步 SQL> alter database recover managed standby database cancel; Data ...
- Oracle11gR2_ADG管理之resinstate实战
主库上打开闪回 SQL> select flashback_on from v$database; FLASHBACK_ON ------------------ YES 模拟断电 SQL> ...
- Linux学习《第五章用户文件权限管理》之补充学习
- Linux内存管理 (9)mmap
专题:Linux内存管理专题 关键词:文件映射.匿名映射.私有映射.共享映射 mmap/munmap是常用的一个系统调用,使用场景是:分配内存.读写大文件.连接动态库文件.多进程间共享内存. 更详细解 ...
随机推荐
- python笔记-7(shutil/json/pickle/shelve/xml/configparser/hashlib模块)
一.shutil模块--高级的文件.文件夹.压缩包处理模块 1.通过句柄复制内容 shutil.copyfileobj(f1,f2)对文件的复制(通过句柄fdst/fsrc复制文件内容) 源码: Le ...
- svg图片的缩放拖拽
svg是一种不错的矢量图,有时候我们会使用这样的图片来作为展示图,因为它不会因为放大缩小而失真. 好了,不扯淡了,废话少说,直入主题吧. 首先确定你是要深入学习还是要简单的把遇到的小任务解决一下,以后 ...
- 错误:'class QApplication' has no member named 'setMainwidget'
错误:'class QApplication' has no member named 'setMainwidget' 转自:http://blog.csdn.net/chenqiai0/articl ...
- 《selenium2 python 自动化测试实战》(11)——selenium安装版本
先和大家说一下selenium环境的问题,大家可以在cmd里先看一下自己的selenium版本: 回车,就可以安装了. 本来想和大家说如何跳过验证码进行登录的,结果好多朋友加我问我环境配置的问题,所以 ...
- ubuntu换系统下载路径源
ubuntn默认下载路径的源是国外的下载很慢换成国内的下载路径会好很多 在ubuntu应用搜索框(左上脚那个)中输入software 1.software&Updates 应用点击softwa ...
- MySQL事物回滚
#commit.rollback用来确保数据库有足够的剩余空间:#commi.rollback只能用于DML操作,即insert.update.delet;#rollback操作撤销上一个commit ...
- 一步步用python制作游戏外挂【转】
转自:http://www.cnblogs.com/xsmhero/archive/2013/01/03/2842973.html 玩过电脑游戏的同学对于外挂肯定不陌生,但是你在用外挂的时候有没有想过 ...
- C# winform中自定义用户控件 然后在页面中调用用户控件的事件
下面是用户控件的代码: using System; using System.Collections.Generic; using System.ComponentModel; using Syste ...
- Jetty小计,比之tomcat调试还是不方便
不需要额外的工程支持,不需要硬盘中有tomcat之类的额外文件 Jetty的Debug:右键Debug as... Maven Builder Jetty相关的配置文件如下: <profiles ...
- Linux VPS上DenyHosts阻止SSH暴力攻击
2009年07月23日 下午 | 作者:VPS侦探 现在的互联网非常不安全,很多人没事就拿一些扫描机扫描ssh端口,然后试图连接ssh端口进行暴力破解(穷举扫描),所以建议vps主机的空间,尽量设置复 ...