Oracle12c DataGuard switchover的例子

12c dataguard提供了新的语法来实现dg的switchover.下面进行测试下。

主库执行检查

SQL> ALTER DATABASE SWITCHOVER TO orcldg VERIFY;  --主库进行切换检查
ALTER DATABASE SWITCHOVER TO orcldg VERIFY
*
ERROR at line 1:
ORA-16475: succeeded WITH warnings, CHECK alert log FOR more details  --查看alert日志
 
 
SQL>
alert

ALTER DATABASE SWITCHOVER TO orcldg VERIFY   --命令输入
Sun May 10 18:31:29 2015
This is cascading configuration.
LOG_ARCHIVE_DEST_3 has already been configured to switchover target ORCLDG. Clearing LOG_ARCHIVE_DEST_3.--清空参数dest-3
Using STANDBY_ARCHIVE_DEST parameter default value as /backup/archivelog
Sun May 10 18:31:29 2015
ALTER SYSTEM SET log_archive_dest_3='' SCOPE=MEMORY SID='*';
LOG_ARCHIVE_DEST3 is cleared.
Configuring a new LOG_ARCHIVE_DEST to switchover target ORCLDG.
Using STANDBY_ARCHIVE_DEST parameter default value as /backup/archivelog
Sun May 10 18:31:29 2015
ALTER SYSTEM SET log_archive_dest_31='service=orcldg ASYNC db_unique_name=ORCLDG' SCOPE=MEMORY SID='*';
SWITCHOVER VERIFY: Send VERIFY request to switchover target ORCLDG
SWITCHOVER VERIFY COMPLETE
SWITCHOVER VERIFY WARNING: switchover target temporary files are not the same with the primary. See switchover target's alert log for details.     --dg端没有临时文件,导致上面sql执行有问题,这里只为测试功能.这里忽略
Using STANDBY_ARCHIVE_DEST parameter default value as /backup/archivelog
Sun May 10 18:31:30 2015
ALTER SYSTEM SET log_archive_dest_31='' SCOPE=MEMORY SID='*';
ORA-16475 signalled during: ALTER DATABASE SWITCHOVER TO orcldg VERIFY...
Sun May 10 18:31:32 2015
LGWR: Standby redo logfile selected to archive thread 1 sequence 116
LGWR: Standby redo logfile selected for thread 1 sequence 116 for destination LOG_ARCHIVE_DEST_2
Sun May 10 18:31:32 2015
Changing destination 3 from remote to local during archival of log#: 1 sequence#: 115 thread#: 1
Sun May 10 18:31:32 2015
Thread 1 advanced to log sequence 116 (LGWR switch)
  Current log# 2 seq# 116 mem# 0: /oradata/orcl/redo02.log
Sun May 10 18:31:32 2015
Archived Log entry 120 added for thread 1 sequence 115 ID 0x53634e8b dest 1:
切换

SQL> ALTER DATABASE SWITCHOVER TO orcldg;   --正式切换
 
DATABASE altered.
主库日志

ALTER DATABASE SWITCHOVER TO orcldg --接受到切换命令
Sun May 10 18:33:19 2015
This is cascading configuration.
Sun May 10 18:33:19 2015
ALTER SYSTEM SET log_archive_dest_state_2='DEFER' SCOPE=MEMORY SID='*';  --修改dest_2
Configuring a new LOG_ARCHIVE_DEST to switchover target ORCLDG.
Using STANDBY_ARCHIVE_DEST parameter default value as /backup/archivelog
Sun May 10 18:33:19 2015
ALTER SYSTEM SET log_archive_dest_31='service=orcldg ASYNC db_unique_name=ORCLDG' SCOPE=MEMORY SID='*';--设置参数
Starting switchover [Process ID: 2105]
Sun May 10 18:33:20 2015
ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY [Process Id: 2105] (orcl)--原命令切换到PHYSICAL STANDBY
Waiting for target standby to receive all redo
Sun May 10 18:33:20 2015
Waiting for all non-current ORLs to be archived...
Sun May 10 18:33:20 2015
All non-current ORLs have been archived.
Sun May 10 18:33:20 2015
Waiting for all FAL entries to be archived...
Sun May 10 18:33:20 2015
All FAL entries have been archived.
Sun May 10 18:33:20 2015
Waiting for dest_id 31 to become synchronized...
Sun May 10 18:33:20 2015
Thread 1 cannot allocate new log, sequence 117
Checkpoint not complete
  Current log# 2 seq# 116 mem# 0: /oradata/orcl/redo02.log
Sun May 10 18:33:21 2015
Active, synchronized Physical Standby switchover target has been identified
Preventing updates and queries at the Primary
Generating and shipping final logs to target standby
Switchover End-Of-Redo Log thread 1 sequence 116 has been fixed
Switchover: Primary highest seen SCN set to 0x0.0x2b49d1     >>切换scn
ARCH: Noswitch archival of thread 1, sequence 116
ARCH: End-Of-Redo Branch archival of thread 1 sequence 116
ARCH: LGWR is scheduled to archive destination LOG_ARCHIVE_DEST_31 after log switch
ARCH: LGWR is actively archiving destination LOG_ARCHIVE_DEST_2
Sun May 10 18:33:23 2015
Process (ospid 2077) is suspended due to switchover to physical standby operation.
Sun May 10 18:33:25 2015
ARCH: Standby redo logfile selected for thread 1 sequence 116 for destination LOG_ARCHIVE_DEST_31
ARCH: Standby redo logfile selected for thread 1 sequence 116 for destination LOG_ARCHIVE_DEST_2
ARCH: Archiving is disabled due to current logfile archival
Primary will check for some target standby to have received all redo
Waiting for target standby to apply all redo
Backup controlfile written to trace file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_2105.trc
Converting the primary database to a new standby database   >>切换成dg
Clearing standby activation ID 1399017099 (0x53634e8b)
The primary database controlfile was created using the
'MAXLOGFILES 16' clause.
There is space for up to 13 standby redo logfiles
Use the following SQL commands on the standby database to create
standby redo logfiles that match the primary database:
ALTER DATABASE ADD STANDBY LOGFILE 'srl1.f' SIZE 52428800;
ALTER DATABASE ADD STANDBY LOGFILE 'srl2.f' SIZE 52428800;
ALTER DATABASE ADD STANDBY LOGFILE 'srl3.f' SIZE 52428800;
ALTER DATABASE ADD STANDBY LOGFILE 'srl4.f' SIZE 52428800;
Archivelog for thread 1 sequence 116 required for standby recovery
Offline data file 5 marked as online during convert to standby or switchover to standby.
Restore of backup may be required if the file is not physically accessible.
Offline data file 7 marked as online during convert to standby or switchover to standby.
Restore of backup may be required if the file is not physically accessible.
Offline data file 21 marked as online during convert to standby or switchover to standby.
Restore of backup may be required if the file is not physically accessible.
Offline data file 22 marked as online during convert to standby or switchover to standby.
Restore of backup may be required if the file is not physically accessible.
Offline data file 23 marked as online during convert to standby or switchover to standby.
Restore of backup may be required if the file is not physically accessible.
Offline data file 24 marked as online during convert to standby or switchover to standby.
Restore of backup may be required if the file is not physically accessible.
Offline data file 25 marked as online during convert to standby or switchover to standby.
Restore of backup may be required if the file is not physically accessible.
Offline data file 26 marked as online during convert to standby or switchover to standby.
Restore of backup may be required if the file is not physically accessible.
Switchover: Primary controlfile converted to standby controlfile succesfully.   >>控制文件切换成功
Switchover: Complete - Database shutdown required                               >>实例关闭
Sending request(convert to primary database) to switchover target ORCLDG        >>发送命令到dg端
Switchover complete. Database shutdown required
USER (ospid: 2105): terminating the instance
Sun May 10 18:33:29 2015
Instance terminated by USER, pid = 2105
Completed: ALTER DATABASE SWITCHOVER TO orcldg
Shutting down instance (abort)
License high water mark = 17
Sun May 10 18:33:29 2015
Instance shutdown complete
Far sync 传输日志

Sun May 10 18:33:25 2015
Changing standby controlfile to MAXIMUM PERFORMANCE mode
RFS[3]: Assigned to RFS process (PID:2153)
RFS[3]: Selected log 4 for thread 1 sequence 116 dbid 1399018635 branch 871237903
Sun May 10 18:33:25 2015
Archived Log entry 30 added for thread 1 sequence 116 ID 0x53634e8b dest 1:
Sun May 10 18:33:29 2015
RFS[4]: Assigned to RFS process (PID:2131)
RFS[4]: Possible network disconnect with primary database
Sun May 10 18:33:29 2015
RFS[2]: Possible network disconnect with primary database
DataGuard端 alert日志

Sun May 10 18:33:26 2015
SWITCHOVER: received request 'ALTER DTABASE COMMIT TO SWITCHOVER  TO PRIMARY' from primary database. >>接受到命令
Sun May 10 18:33:26 2015
ALTER DATABASE SWITCHOVER TO PRIMARY (orcl)                                                          >>进行切换
Maximum wait for role transition is 15 minutes.  >>最多等待15分钟
Switchover: Media recovery is still active       >>发现正在进行recover
Role Change: Canceling MRP - no more redo to apply >>关闭mrp
Sun May 10 18:33:26 2015
MRP0: Background Media Recovery cancelled with status 16037
Sun May 10 18:33:26 2015
Errors in file /u01/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_mrp0_2134.trc:
ORA-16037: user requested cancel of managed recovery operation
Managed Standby Recovery not using Real Time Apply
Recovery interrupted!                             >>recover 被中止
Sun May 10 18:33:26 2015
Errors in file /u01/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_mrp0_2134.trc:
ORA-16037: user requested cancel of managed recovery operation
Sun May 10 18:33:26 2015
MRP0: Background Media Recovery process shutdown (orcl)
Sun May 10 18:33:27 2015
Role Change: Canceled MRP                         >>关闭mrp
Killing 5 processes (PIDS:2186,2148,2146,2168,2170) (all RFS) in order to disallow current and future RFS connections. Requested by OS process 2197                      >>kill rps进程
Stopping Emon pool
All dispatchers and shared servers shutdown
CLOSE: killing server sessions.
CLOSE: all sessions shutdown successfully.
Stopping Emon pool
Sun May 10 18:33:29 2015
SMON: disabling cache recovery
Sun May 10 18:33:29 2015
Backup controlfile written to trace file /u01/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_rmi_2197.trc  >>备份控制文件
SwitchOver after complete recovery through change 2836945
Online logfile pre-clearing operation disabled by switchover                    >>清空redo
Online log /oradata/orcl/redo01.log: Thread 1 Group 1 was previously cleared
Online log /oradata/orcl/redo02.log: Thread 1 Group 2 was previously cleared
Online log /oradata/orcl/redo03.log: Thread 1 Group 3 was previously cleared
Standby became primary SCN: 2836943                                             >>成为主库的scn
AUDIT_TRAIL initialization parameter is changed back to its original value as specified in the parameter file.
Switchover: Complete - Database mounted as primary
SWITCHOVER: completed request from primary database.                            >>切换成功
Sun May 10 18:33:44 2015
ARC1: Becoming the 'no SRL' ARCH
 
Sun May 10 18:36:19 2015
Assigning activation ID 1407090153 (0x53de7de9)             --开始打开数据库
LGWR: Primary database is in MAXIMUM AVAILABILITY mode
Sun May 10 18:36:19 2015
Destination LOG_ARCHIVE_DEST_2 is UNSYNCHRONIZED
LGWR: Destination LOG_ARCHIVE_DEST_1 is not serviced by LGWR
Sun May 10 18:36:19 2015
Thread 1 advanced to log sequence 118 (thread open)
Thread 1 opened at log sequence 118
  Current log# 2 seq# 118 mem# 0: /oradata/orcl/redo02.log
Successful open of redo thread 1
Sun May 10 18:36:19 2015
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Sun May 10 18:36:19 2015
Archived Log entry 43 added for thread 1 sequence 117 ID 0x53de7de9 dest 1:
Sun May 10 18:36:19 2015
SMON: enabling cache recovery
Sun May 10 18:36:19 2015
[2219] Successfully onlined Undo Tablespace 2.
Undo initialization finished serial:0 start:525504 end:525654 diff:150 ms (0.2 seconds)
Dictionary check beginning
Dictionary check complete
Verifying minimum file header compatibility (11g) for tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
Sun May 10 18:36:19 2015
SMON: enabling tx recovery
Starting background process SMCO
Sun May 10 18:36:19 2015
Database Characterset is ZHS16GBK
Sun May 10 18:36:19 2015
SMCO started with pid=32, OS id=2226
No Resource Manager plan active
Starting background process IMCO
Sun May 10 18:36:19 2015
IMCO started with pid=35, OS id=2232
Starting background process AQPC
Sun May 10 18:36:20 2015
AQPC started with pid=36, OS id=2234
LOGSTDBY: Validating controlfile with logical metadata
LOGSTDBY: Validation complete
Sun May 10 18:36:20 2015
ARC1: STARTING ARCH PROCESSES
Starting background process ARC4
Sun May 10 18:36:20 2015
ARC4 started with pid=37, OS id=2236
ARC4: Archival started
ARC1: STARTING ARCH PROCESSES COMPLETE
Sun May 10 18:36:21 2015
Pluggable database PDB$SEED dictionary check beginning
Pluggable Database PDB$SEED Dictionary check complete
Database Characterset for PDB$SEED is ZHS16GBK
Sun May 10 18:36:21 2015
******************************************************************
LGWR: Setting 'active' archival for destination LOG_ARCHIVE_DEST_2
******************************************************************
LGWR: Standby redo logfile selected to archive thread 1 sequence 119
LGWR: Standby redo logfile selected for thread 1 sequence 119 for destination LOG_ARCHIVE_DEST_2
Sun May 10 18:36:22 2015
Thread 1 advanced to log sequence 119 (LGWR switch)
  Current log# 3 seq# 119 mem# 0: /oradata/orcl/redo03.log
Shutting down archive processes
Sun May 10 18:36:22 2015
ARCH shutting down
ARC4: Archival stopped
Sun May 10 18:36:22 2015
Due to limited space in shared pool (need 6094848 bytes, have 3981120 bytes), limiting Resource Manager entities from 2048 to 32
Opening pdb PDB$SEED (2) with no Resource Manager plan active
Sun May 10 18:36:23 2015
Archived Log entry 45 added for thread 1 sequence 118 ID 0x53de7de9 dest 1:
Sun May 10 18:36:23 2015
Errors in file /u01/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_dbw0_2044.trc:
ORA-01157: cannot identify/lock data file 203 - see DBWR trace file
ORA-01110: data file 203: '/oradata/orcl/travel/travel_temp012015-03-19_01-30-29-PM.dbf'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Sun May 10 18:36:23 2015
Errors in file /u01/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_dbw0_2044.trc:
ORA-01186: file 203 failed verification tests
ORA-01157: cannot identify/lock data file 203 - see DBWR trace file
ORA-01110: data file 203: '/oradata/orcl/travel/travel_temp012015-03-19_01-30-29-PM.dbf'
Sun May 10 18:36:23 2015
File 203 not verified due to error ORA-01157
Sun May 10 18:36:23 2015
ARC0: Standby redo logfile selected for thread 1 sequence 118 for destination LOG_ARCHIVE_DEST_2
Sun May 10 18:36:23 2015
Pluggable database TRAVEL dictionary check beginning
Sun May 10 18:36:23 2015
Pluggable database PDB03 dictionary check beginning
Pluggable Database PDB03 Dictionary check complete
Sun May 10 18:36:23 2015
Pluggable Database TRAVEL Dictionary check complete
Sun May 10 18:36:23 2015
Database Characterset for PDB03 is ZHS16GBK
Sun May 10 18:36:23 2015
Database Characterset for TRAVEL is ZHS16GBK
Sun May 10 18:36:23 2015
*********************************************************************  --临时表空间不存在问题
WARNING: The following temporary tablespaces in container(PDB03)
         contain no files.
         This condition can occur when a backup controlfile has
         been restored.  It may be necessary to add files to these
         tablespaces.  That can be done using the SQL statement:
 
         ALTER TABLESPACE <tablespace_name> ADD TEMPFILE
 
         Alternatively, if these temporary tablespaces are no longer
         needed, then they can be dropped.
           Empty temporary tablespace: TEMP
*********************************************************************
Sun May 10 18:36:24 2015
Errors in file /u01/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_dbw0_2044.trc:
ORA-01157: cannot identify/lock data file 203 - see DBWR trace file
ORA-01110: data file 203: '/oradata/orcl/travel/travel_temp012015-03-19_01-30-29-PM.dbf'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Sun May 10 18:36:24 2015
Errors in file /u01/app/oracle/diag/rdbms/orcldg/orcl/trace/orcl_dbw0_2044.trc:
ORA-01186: file 203 failed verification tests
ORA-01157: cannot identify/lock data file 203 - see DBWR trace file
ORA-01110: data file 203: '/oradata/orcl/travel/travel_temp012015-03-19_01-30-29-PM.dbf'
Sun May 10 18:36:24 2015
File 203 not verified due to error ORA-01157
Sun May 10 18:36:24 2015
Re-creating tempfile /oradata/orcl/travel/travel_temp012015-03-19_01-30-29-PM.dbf
ALTER SYSTEM: Flushing buffer cache inst=0 container=3 local
Sun May 10 18:36:24 2015
ALTER SYSTEM: Flushing buffer cache inst=0 container=4 local
Sun May 10 18:36:25 2015
Destination LOG_ARCHIVE_DEST_2 is SYNCHRONIZED
LGWR: Standby redo logfile selected to archive thread 1 sequence 120
LGWR: Standby redo logfile selected for thread 1 sequence 120 for destination LOG_ARCHIVE_DEST_2
Sun May 10 18:36:25 2015
Thread 1 advanced to log sequence 120 (LGWR switch)
  Current log# 1 seq# 120 mem# 0: /oradata/orcl/redo01.log
Sun May 10 18:36:25 2015
Archived Log entry 48 added for thread 1 sequence 119 ID 0x53de7de9 dest 1:
Sun May 10 18:36:25 2015
Cannot start service travel, reason=-1
Cannot start service pdb03, reason=-1
Starting background process CJQ0
Completed: alter database open
Sun May 10 18:36:33 2015
CJQ0 started with pid=40, OS id=2289
查看新主库

SQL> SELECT name,database_role,db_unique_name,open_mode,protection_mode,protection_level,switchover_status,supplemental_log_data_pk,supplemental_log_data_ui FROM v$database;
 
NAME      DATABASE_ROLE    DB_UNIQUE_NAME                 OPEN_MODE            PROTECTION_MODE      PROTECTION_LEVEL     SWITCHOVER_STATUS    SUP SUP
--------- ---------------- ------------------------------ -------------------- -------------------- -------------------- -------------------- --- ---
ORCL      PRIMARY          orcldg                         MOUNTED              MAXIMUM AVAILABILITY UNPROTECTED          NOT ALLOWED          NO  NO
 
SQL> SELECT * FROM V$DATAGUARD_CONFIG;
 
DB_UNIQUE_NAME                 PARENT_DBUN                    DEST_ROLE         CURRENT_SCN     CON_ID
------------------------------ ------------------------------ ----------------- ----------- ----------
orcldg                         NONE                           PRIMARY DATABASE            0          0
orcl                           orcldg                         UNKNOWN                     0          0
orclfs                         UNKNOWN                        UNKNOWN                     0          0
 
SQL> SHOW parameter dest_2
 
PARAMETER_NAME                                               TYPE        VALUE
------------------------------------------------------------ ----------- ----------------------------------------------------------------------------------------------------
db_create_online_log_dest_2                                  string
log_archive_dest_2                                           string      service=orcl LGWR SYNC affirm valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=orcl
log_archive_dest_20                                          string
log_archive_dest_21                                          string
log_archive_dest_22                                          string
log_archive_dest_23                                          string
log_archive_dest_24                                          string
log_archive_dest_25                                          string
log_archive_dest_26                                          string
log_archive_dest_27                                          string
log_archive_dest_28                                          string
log_archive_dest_29                                          string
SQL> ALTER DATABASE OPEN;
 
DATABASE altered.
 
SQL>
SQL>
SQL>

时间: 2024-09-20 07:16:11

Oracle12c DataGuard switchover的例子的相关文章

oracle 11GR2 dataguard SWITCHOVER FAILOVER

1. switch:用户主动切换: 2. failover:主库出现故障,强行切换: switchover:一般switchover切换都是计划中的切换,特点是切换后,不会丢失任何数据,而且这个过程是可逆的,整个dataguard环境不会被破坏,原来dataguard环境中的所有物理和逻辑standby都可以继续工作. 在进行dataguard的物理standby切换前需要注意: 1.确认主库和从库间网络连接通畅: 2.确认没有活动的会话连接在数据库中: 3.primary数据库处于打开的状态,

dataguard switchover的自动化脚本实现

data guard的主要功能就是作为备库来同步主库的数据变化,一般使用中物理standby使用的比较多.data guard显示威力的一个场景就是swithover了,即主备切换.这种切换方式执行时间很短,能够在一些灾难场景中极大的提高系统的可用性和稳定性. 自己在本地的环境中搭建了一套data guard的环境,开始比较生疏,切换中碰到了不少的问题,最后搭建完成,把切换中的一些细节信息都总结起来,整理成了一个初步的脚本.能够很方便的实现swith over 这个脚本适用于物理standby,

【DATAGUARD】物理dg的switchover切换(五)

[DATAGUARD]物理dg的switchover切换(五) 1.1  BLOG文档结构图     1.2  前言部分   1.2.1  导读 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~: ① 物理dg的switchover切换演练过程 ② 物理dg管理和维护的一些sql   注意:本篇BLOG中代码部分需要特别关注的地方我都用黄色背景和红色字体来表示,比如下边的例子中,thread 1的最大归档日志号为33,thread 2的最大

【DATAGUARD】物理dg的failover切换(六)

[DATAGUARD]物理dg的failover切换(六) 1.1  BLOG文档结构图     1.2  前言部分   1.2.1  导读 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~: ① 物理dg的failover切换演练过程 ② 物理dg管理和维护的一些sql ③ 利用duplicate搭建物理dg ④   注意:本篇BLOG中代码部分需要特别关注的地方我都用黄色背景和红色字体来表示,比如下边的例子中,thread 1的最大归档

Oracle 10g dataguard常用的维护命令总结

DataGuard可以提供Oracle数据库的冗灾.数据保护.故障恢复等,实现数据库快速切换与灾难性恢复.在生产数据库的保证"事务一致性"时,使用生产库的物理全备份创建备库,备库会通过生产库传输过来的归档日志或重做条目自动维护备用数据库. DataGuard数据同步技术有以下优势:  1) Oracle数据库自身内置的功能,与每个Oracle新版本的新特性都完全兼容,且不需要另外付费. 2) 配置管理较简单,不需要熟悉其他第三方的软件产品. 3) 物理Standby数据库支持任何类型的

如何保障业务0暂停下,从11gR2 MAA升级到12c?

讲师介绍  唐波 中科院高级工程师 资深EBS套件DBA   DBAplus社群联合发起人,Oracle 10g/11g OCM.RHCI,中国东南甲骨文用户组secoug主席,ACOUG&SHOUG核心成员. 中科院最佳技术顾问.知名WDP讲师,福建省第一批Oracle ERP实施顾问.   大家好,我是来自中科院的唐波,今天我将跟大家分享如何使用保障前台业务0暂停的方式,从Oracle 11gR2 MAA升级到Oracle12c MAA.   本次分享将包括以下4个方面: 1.  环境概览

【DG】DG日常维护

[DG]DG日常维护 第一部分 日常维护 一 正确打开主库和备库 1 主库: SQL> STARTUP MOUNT; SQL> ALTER DATABASE ARCHIVELOG; SQL> ALTER DATABASE OPEN; 2 备库: SQL> STARTUP MOUNT; SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION; 二 正确关闭顺序   1 备库: SQ

Dataguard的switchover和failover

Dataguard中的role transition:switchover和failover以及将failover后的old primary flackback成physical standby库 Dataguard中的role transition包括两种:switchover和failover, 区别在于:switchover将一个physical standby database switchover成为primary database过程可以保证无数据丢失,在完成后其它的standby数

Oracle 11g Dataguard物理备库配置(五) broker switchover测试

本文采用Oracle 11g Dataguard broker switchover测试 1. 采用dataguard broker 测试switchover 1) 主库情况 SQL> select open_mode,database_role,db_unique_name from v$database; OPEN_MODE            DATABASE_ROLE    DB_UNIQUE_NAME -------------------- ---------------- ---