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是常用的一个系统调用,使用场景是:分配内存.读写大文件.连接动态库文件.多进程间共享内存. 更详细解 ...
随机推荐
- Centos kvm+ceph
Centos kvm+ceph 一. centos6.5 安装kvm 1. disable selinux 2. 确认支持intel虚拟化 3. 安装需要的包 4.设置桥接网络 5.运行kvm ins ...
- hiho 1612
emmmmm?A不了?90分是什么鬼 #include<cstdio> #include<cstdlib> #include<vector> #include< ...
- BZOJ1412 ZJOI2009 狼和羊的故事 【网络流-最小割】
BZOJ1412 ZJOI2009 狼和羊的故事 Description “狼爱上羊啊爱的疯狂,谁让他们真爱了一场:狼爱上羊啊并不荒唐,他们说有爱就有方向......” Orez听到这首歌,心想:狼和 ...
- hadoop入门手册4:Hadoop【2.7.1】初级入门之命令:文件系统shell1
问题导读1.Hadoop文件系统shell与Linux shell有哪些相似之处?2.如何改变文件所属组?3.如何改变hdfs的文件权限?4.如何查找hdfs文件,并且不区分大小写? 概述文件系统 ( ...
- 《selenium2 python 自动化测试实战》(16)——js操作补充
js修改readonly属性 我们看到这里日期框标签中有readonly属性,如果我们直接send_keys就无法输入内容,这时我们需要先去掉readonly属性: js ='document.get ...
- [MEF]第04篇 MEF的多部件导入(ImportMany)和目录服务
一.演示概述此演示介绍了MEF如何使用ImportMany特性同时导入多个与相同约束相匹配的导出部件,并且介绍了目录服务(Catalog),该服务告知MEF框架可以在什么地方去搜寻与指定约束匹配的导出 ...
- c/c++中system函数在Linux和windows下区别
windows 在windows下的system函数中命令可以不区别大小写! 功 能: 发出一个DOS命令 #include <stdlib.h> int system(char *com ...
- video4linux(v4l)使用摄像头的实例基础教程与体会(转)
1. video4linux基础相关 1.1 v4l的介绍与一些基础知识的介绍 I.首先说明一下video4linux(v4l). 它是一些视频系统.视频软件.音频软 ...
- angular的require模块的使用($requireProvider的作用)
今天我们学习一下angular的另一个几乎被忽略的模块angular-require 先给出链接地址(git:) https://github.com/Treri/angular-requir ...
- laravel加载js和css等资源
4里面是composer下载以后,publish,blade模板里面有html标签 不过在5以后,html和form标签去掉了,publish方式似乎也变化了,没看懂…… 直接贴demo吧 mac:n ...