千家信息网

Oracle DG之--构建Physical Standby

发表于:2025-01-20 作者:千家信息网编辑
千家信息网最后更新 2025年01月20日,Oracle DG之--构建Physical Standby系统环境:操作系统: RedHat EL4Oracle: Oracle 10.2.0.1.0从以上图中所示:主库为bj(db_unique_
千家信息网最后更新 2025年01月20日Oracle DG之--构建Physical Standby

Oracle DG之--构建Physical Standby


系统环境:

操作系统: RedHat EL4

Oracle: Oracle 10.2.0.1.0

从以上图中所示:主库为bj(db_unique_name),备库为sh。


案例分析:

本案例采用RMAN Duplicate方式建立standby database。

一、配置主备库初始化参数

主库的初始化参数:initbj.ora

[oracle@ocmtest dbs]$ more initbj.ora *.audit_file_dest='/u01/app/oracle/admin/bj/adump'*.background_dump_dest='/u01/app/oracle/admin/bj/bdump'*.compatible='10.2.0.1.0'*.control_files='/u01/app/oracle/oradata/bj/control01.ctl','/u01/app/oracle/oradata/bj/control02.ctl','/u01/app/oracle/oradata/bj/control03.ctl'*.core_dump_dest='/u01/app/oracle/admin/bj/cdump'*.db_block_size=8192*.db_domain=''*.db_file_multiblock_read_count=16*.db_name='bj'*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'*.db_recovery_file_dest_size=2147483648*.dispatchers='(PROTOCOL=TCP) (SERVICE=bjXDB)'*.job_queue_processes=10*.open_cursors=300*.pga_aggregate_target=68157440*.processes=150*.remote_login_passwordfile='EXCLUSIVE'*.sga_target=205520896*.undo_management='AUTO'*.undo_tablespace='UNDOTBS1'*.user_dump_dest='/u01/app/oracle/admin/bj/udump'

以下为DG配置参数:

DB_UNIQUE_NAME=bjLOG_ARCHIVE_CONFIG='DG_CONFIG=(bj,sh)'LOG_ARCHIVE_DEST_1='LOCATION=/u01/disk1/arch/bj/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=bj'    LOG_ARCHIVE_DEST_2='SERVICE=sh LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=sh'      LOG_ARCHIVE_DEST_STATE_1=ENABLELOG_ARCHIVE_DEST_STATE_2=ENABLEREMOTE_LOGIN_PASSWORDFILE=EXCLUSIVELOG_ARCHIVE_MAX_PROCESSES=3FAL_SERVER=shFAL_CLIENT=bjDB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/sh/','/u01/app/oracle/oradata/bj/'                            LOG_FILE_NAME_CONVERT='/u01/app/oracle/oradata/sh/','/u01/app/oracle/oradata/bj/'                             STANDBY_FILE_MANAGEMENT=AUTO

备库的初始化参数:initsh.ora

[oracle@ocmtest1 dbs]$ more initsh.ora *.audit_file_dest='/u01/app/oracle/admin/sh/adump'*.background_dump_dest='/u01/app/oracle/admin/sh/bdump'*.compatible='10.2.0.1.0'*.control_file_record_keep_time=7*.control_files='/u01/app/oracle/oradata/sh/control01.ctl','/u01/app/oracle/oradata/sh/control02.ctl','/u01/app/oracle/oradata/sh/control03.ctl'*.core_dump_dest='/u01/app/oracle/admin/sh/cdump'*.db_block_size=8192*.db_domain=''*.db_file_multiblock_read_count=16*.DB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/bj/','/u01/app/oracle/oradata/sh/'*.db_name='bj'*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'*.db_recovery_file_dest_size=2147483648*.open_cursors=300*.pga_aggregate_target=68157440*.processes=150*.REMOTE_LOGIN_PASSWORDFILE='EXCLUSIVE'*.sga_target=205520896*.undo_management='AUTO'*.undo_tablespace='UNDOTBS1'*.user_dump_dest='/u01/app/oracle/admin/sh/udump'

以下为DG配置参数:

*.DB_UNIQUE_NAME='sh'*.FAL_CLIENT='sh'*.FAL_SERVER='bj'*.job_queue_processes=10*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(bj,sh)'*.LOG_ARCHIVE_DEST_1='LOCATION=/u01/disk1/arch/sh/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=sh'*.LOG_ARCHIVE_DEST_2='SERVICE=bj LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=bj'*.LOG_ARCHIVE_DEST_STATE_1='ENABLE'*.LOG_ARCHIVE_DEST_STATE_2='ENABLE'*.log_archive_format='arch_%t_%s_%r.log'*.LOG_ARCHIVE_MAX_PROCESSES=3*.LOG_FILE_NAME_CONVERT='/u01/app/oracle/oradata/bj/','/u01/app/oracle/oradata/sh/'*.STANDBY_FILE_MANAGEMENT='AUTO'

二、在主库上建立standby 日志

   对于默认的最大性能的保护方式,可以不用建立standby redo logfiles;但建立standby redo logfiles可以更好的保存redo log;standby redo日志组组数应等于或多于redo log,日志的大小应该一致。   SQL> alter database add standby logfile group 4 ('/u01/app/oracle/oradata/bj/redo04.log') size 50m; SQL> alter database add standby logfile group 5 ('/u01/app/oracle/oradata/bj/redo05.log.rdo') size 50m;  SQL> alter database add standby logfile group 6 ('/u01/app/oracle/oradata/bj/redo06.log') size 50m;

三、在备库上建立相应目录:

[oracle@ocmtest1 dbs]$mkdir -p /u01/app/oracle/admin/sh/adump[oracle@ocmtest1 dbs]$mkdir -p /u01/app/oracle/admin/sh/udump[oracle@ocmtest1 dbs]$mkdir -p /u01/app/oracle/admin/sh/bdump[oracle@ocmtest1 dbs]$mkdir -p /u01/app/oracle/admin/sh/cdump[oracle@ocmtest1 dbs]$mkdir -p /u01/app/oracle/oradata/sh

四、在主库生成备库的controlfile和备份


1、数据库在mount 状态下06:57:41 SQL> alter database create standby controlfile as '/home/oracle/std_control01.ctl';2、 将生成的控制文件,拷贝到备库相同的目录下[oracle@ocmtest1 ~]$ scp  /home/oracle/std_control01.ctl 192.168.8.86:/home/oracle对主库进行备份[oracle@ocmtest bj]$ rman target /Recovery Manager: Release 10.2.0.1.0 - Production on Wed Aug 31 10:55:55 2011Copyright (c) 1982, 2005, Oracle.  All rights reserved.connected to target database (not started)RMAN> run {                                                                     2>  startup force mount;                                                           3>  backup database format='/u01/disk1/rman/bj/bj_%s.bak' plus archivelog;      4> alter database open;                                                        5> }


五、在备库上Duplicate Database(备库启动到弄mount)

1)在备库上建立/u01/disk1/rman/bj目录   拷贝主库的备份到备库/u01/disk1/rman/bj目录(拷贝到相同的目录下)[oracle@ocmtest bj]$ scp /u01/disk1/rman/bj/bj_*.bak 192.168.8.86:/u01/disk1/rman/bj2)配置Oracle network因为,备库启动到no mount 状态,拒绝用户远程联机,所以采用静态注册,如下所示备库listenter[oracle@ocmtest1 admin]$ cat listener.ora# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora# Generated by Oracle configuration tools.SID_LIST_LISTENER =  (SID_LIST =    (SID_DESC =      (SID_NAME = PLSExtProc)      (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)      (PROGRAM = extproc)    )   (SID_DESC =      (GLOBAL_DBNAME = bj)      (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)      (SID_NAME = bj)    )  )LISTENER =  (DESCRIPTION_LIST =    (DESCRIPTION =      (ADDRESS = (PROTOCOL = TCP)(HOST = ocmtest1.51CTO提醒您,请勿滥发广告!)(PORT = 1521))      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))    )  )如下所示:主库的tnsnames文件:[oracle@ocmtest1 admin]$ [oracle@ocmtest admin]$ cat tnsnames.ora # tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora# Generated by Oracle configuration tools.BJ =  (DESCRIPTION =    (ADDRESS_LIST =      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.8.84)(PORT = 1521))    )    (CONNECT_DATA =      (SERVICE_NAME = bj)    ))SH =  (DESCRIPTION =    (ADDRESS_LIST =      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.8.86)(PORT = 1521))    )    (CONNECT_DATA =      (SERVICE_NAME = sh)       (UR=A)   ;添加此项连接到静态注册的备库    ))测试连接备库[oracle@ocmtest bj]$ sqlplus sys/oracle@sh as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 31 11:19:32 2011Copyright (c) 1982, 2005, Oracle.  All rights reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProductionWith the Partitioning, OLAP and Data Mining optionsSQL> exit                                                                                                                                Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProductionWith the Partitioning, OLAP and Data Mining options通过主库连接到备库,进行恢复(通过克隆方式建立备库)[oracle@ocmtest bj]$ rman target /Recovery Manager: Release 10.2.0.1.0 - Production on Wed Aug 31 11:19:36 2011Copyright (c) 1982, 2005, Oracle.  All rights reserved.connected to target database: BJ (DBID=1015723911)RMAN> connect auxiliary sys/oracle@sh;                                                                                                 connected to auxiliary database: BJ (not mounted)RMAN> duplicate target database for standby;                                    Starting Duplicate Db at 31-AUG-11using target database control file instead of recovery catalogallocated channel: ORA_AUX_DISK_1channel ORA_AUX_DISK_1: sid=155 devtype=DISKcontents of Memory Script:{   restore clone standby controlfile;   sql clone 'alter database mount standby database';}executing Memory ScriptStarting restore at 31-AUG-11using channel ORA_AUX_DISK_1channel ORA_AUX_DISK_1: restoring control filechannel ORA_AUX_DISK_1: copied control file copyinput filename=/home/oracle/stand.ctloutput filename=/u01/app/oracle/oradata/sh/control01.ctloutput filename=/u01/app/oracle/oradata/sh/control02.ctloutput filename=/u01/app/oracle/oradata/sh/control03.ctlFinished restore at 31-AUG-11sql statement: alter database mount standby databasereleased channel: ORA_AUX_DISK_1contents of Memory Script:{   set newname for tempfile  1 to  "/u01/app/oracle/oradata/sh/temp01.dbf";   switch clone tempfile all;   set newname for datafile  1 to  "/u01/app/oracle/oradata/sh/system01.dbf";   set newname for datafile  2 to  "/u01/app/oracle/oradata/sh/undotbs01.dbf";   set newname for datafile  3 to  "/u01/app/oracle/oradata/sh/sysaux01.dbf";   set newname for datafile  4 to  "/u01/app/oracle/oradata/sh/users01.dbf";   set newname for datafile  5 to  "/u01/app/oracle/oradata/sh/example01.dbf";   restore   check readonly   clone database   ;}executing Memory Scriptexecuting command: SET NEWNAMErenamed temporary file 1 to /u01/app/oracle/oradata/sh/temp01.dbf in control fileexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEStarting restore at 31-AUG-11allocated channel: ORA_AUX_DISK_1channel ORA_AUX_DISK_1: sid=155 devtype=DISKchannel ORA_AUX_DISK_1: starting datafile backupset restorechannel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup setrestoring datafile 00001 to /u01/app/oracle/oradata/sh/system01.dbfrestoring datafile 00002 to /u01/app/oracle/oradata/sh/undotbs01.dbfrestoring datafile 00003 to /u01/app/oracle/oradata/sh/sysaux01.dbfrestoring datafile 00004 to /u01/app/oracle/oradata/sh/users01.dbfrestoring datafile 00005 to /u01/app/oracle/oradata/sh/example01.dbfchannel ORA_AUX_DISK_1: reading from backup piece /u01/disk1/rman/bj/bj_2.bakchannel ORA_AUX_DISK_1: restored backup piece 1piece handle=/u01/disk1/rman/bj/bj_2.bak tag=TAG20110831T105953channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:48Finished restore at 31-AUG-11contents of Memory Script:{   switch clone datafile all;}executing Memory Scriptdatafile 1 switched to datafile copyinput datafile copy recid=10 stamp=760621486 filename=/u01/app/oracle/oradata/sh/system01.dbfdatafile 2 switched to datafile copyinput datafile copy recid=11 stamp=760621487 filename=/u01/app/oracle/oradata/sh/undotbs01.dbfdatafile 3 switched to datafile copyinput datafile copy recid=12 stamp=760621487 filename=/u01/app/oracle/oradata/sh/sysaux01.dbfdatafile 4 switched to datafile copyinput datafile copy recid=13 stamp=760621487 filename=/u01/app/oracle/oradata/sh/users01.dbfdatafile 5 switched to datafile copyinput datafile copy recid=14 stamp=760621487 filename=/u01/app/oracle/oradata/sh/example01.dbfFinished Duplicate Db at 31-AUG-11

---备库建立完毕,并启动到mount状态!


六、在备库上启动MRP进程

11:40:28 SQL> SELECT status from v$instance;                                                                                             STATUS------------MOUNTED11:45:40 SQL> alter database recover managed standby database disconnect from session;                                                   Database altered.告警日志:alter database recover managed standby database disconnect from sessionWed Aug 31 11:46:00 2011Attempt to start background Managed Standby Recovery process (sh)MRP0 started with pid=22, OS id=14159Wed Aug 31 11:46:01 2011MRP0: Background Managed Standby Recovery process started (sh)Managed Standby Recovery not using Real Time ApplyWed Aug 31 11:46:06 2011Errors in file /u01/app/oracle/admin/sh/bdump/sh_mrp0_14159.trc:ORA-00313: open failed for members of log group 1 of thread 1ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/sh/redo01.log'ORA-27037: unable to obtain file statusLinux Error: 2: No such file or directoryAdditional information: 3Wed Aug 31 11:46:06 2011Errors in file /u01/app/oracle/admin/sh/bdump/sh_mrp0_14159.trc:ORA-00313: open failed for members of log group 1 of thread 1ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/sh/redo01.log'ORA-27037: unable to obtain file statusLinux Error: 2: No such file or directoryAdditional information: 3Clearing online redo logfile 1 /u01/app/oracle/oradata/sh/redo01.logClearing online log 1 of thread 1 sequence number 23Wed Aug 31 11:46:06 2011Errors in file /u01/app/oracle/admin/sh/bdump/sh_mrp0_14159.trc:ORA-00313: open failed for members of log group 1 of thread 1ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/sh/redo01.log'ORA-27037: unable to obtain file statusLinux Error: 2: No such file or directoryAdditional information: 3Wed Aug 31 11:46:07 2011Completed: alter database recover managed standby database disconnect from sessionWed Aug 31 11:46:08 2011Clearing online redo logfile 1 completeWed Aug 31 11:46:08 2011Errors in file /u01/app/oracle/admin/sh/bdump/sh_mrp0_14159.trc:ORA-00313: open failed for members of log group 2 of thread 1ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/sh/redo02.log'ORA-27037: unable to obtain file statusLinux Error: 2: No such file or directoryAdditional information: 3Wed Aug 31 11:46:08 2011Errors in file /u01/app/oracle/admin/sh/bdump/sh_mrp0_14159.trc:ORA-00313: open failed for members of log group 2 of thread 1ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/sh/redo02.log'ORA-27037: unable to obtain file statusLinux Error: 2: No such file or directoryAdditional information: 3Clearing online redo logfile 2 /u01/app/oracle/oradata/sh/redo02.logClearing online log 2 of thread 1 sequence number 21Wed Aug 31 11:46:08 2011Errors in file /u01/app/oracle/admin/sh/bdump/sh_mrp0_14159.trc:ORA-00313: open failed for members of log group 2 of thread 1ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/sh/redo02.log'ORA-27037: unable to obtain file statusLinux Error: 2: No such file or directoryAdditional information: 3Clearing online redo logfile 2 completeWed Aug 31 11:46:09 2011Errors in file /u01/app/oracle/admin/sh/bdump/sh_mrp0_14159.trc:ORA-00313: open failed for members of log group 3 of thread 1ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/sh/redo03.log'ORA-27037: unable to obtain file statusLinux Error: 2: No such file or directoryAdditional information: 3Wed Aug 31 11:46:09 2011Errors in file /u01/app/oracle/admin/sh/bdump/sh_mrp0_14159.trc:ORA-00313: open failed for members of log group 3 of thread 1ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/sh/redo03.log'ORA-27037: unable to obtain file statusLinux Error: 2: No such file or directoryAdditional information: 3Clearing online redo logfile 3 /u01/app/oracle/oradata/sh/redo03.logClearing online log 3 of thread 1 sequence number 22Wed Aug 31 11:46:09 2011Errors in file /u01/app/oracle/admin/sh/bdump/sh_mrp0_14159.trc:ORA-00313: open failed for members of log group 3 of thread 1ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/sh/redo03.log'ORA-27037: unable to obtain file statusLinux Error: 2: No such file or directoryAdditional information: 3Clearing online redo logfile 3 completeMedia Recovery Waiting for thread 1 sequence 23Wed Aug 31 11:47:00 2011Using STANDBY_ARCHIVE_DEST parameter default value as /u01/disk1/arch/sh/Redo Shipping Client Connected as PUBLIC-- Connected User is ValidRFS[1]: Assigned to RFS process 14219RFS[1]: Identified database type as 'physical standby'Wed Aug 31 11:47:00 2011RFS LogMiner: Client disabled from further notificationWed Aug 31 11:47:01 2011Redo Shipping Client Connected as PUBLIC-- Connected User is ValidRFS[2]: Assigned to RFS process 14221RFS[2]: Identified database type as 'physical standby'Wed Aug 31 11:47:01 2011RFS[1]: Archived Log: '/u01/disk1/arch/sh/arch_1_7_760458507.log'RFS[1]: Archived Log: '/u01/disk1/arch/sh/arch_1_8_760458507.log'Wed Aug 31 11:47:01 2011RFS[2]: Archived Log: '/u01/disk1/arch/sh/arch_1_6_760458507.log'RFS[2]: Archived Log: '/u01/disk1/arch/sh/arch_1_10_760458507.log'Wed Aug 31 11:47:01 2011RFS[1]: Archived Log: '/u01/disk1/arch/sh/arch_1_9_760458507.log'Wed Aug 31 11:47:02 2011RFS[2]: Archived Log: '/u01/disk1/arch/sh/arch_1_11_760458507.log'Wed Aug 31 11:47:02 2011RFS[1]: Archived Log: '/u01/disk1/arch/sh/arch_1_12_760458507.log'Wed Aug 31 11:47:02 2011RFS[2]: Archived Log: '/u01/disk1/arch/sh/arch_1_13_760458507.log'Wed Aug 31 11:47:02 2011RFS[1]: Archived Log: '/u01/disk1/arch/sh/arch_1_14_760458507.log'Wed Aug 31 11:47:02 2011RFS[2]: Archived Log: '/u01/disk1/arch/sh/arch_1_15_760458507.log'Wed Aug 31 11:47:02 2011RFS[1]: Archived Log: '/u01/disk1/arch/sh/arch_1_16_760458507.log'Wed Aug 31 11:47:03 2011RFS[2]: Archived Log: '/u01/disk1/arch/sh/arch_1_17_760458507.log'Wed Aug 31 11:47:03 2011RFS[1]: Archived Log: '/u01/disk1/arch/sh/arch_1_18_760458507.log'RFS[1]: Archived Log: '/u01/disk1/arch/sh/arch_1_19_760458507.log'Wed Aug 31 11:47:03 2011RFS[2]: Archived Log: '/u01/disk1/arch/sh/arch_1_20_760458507.log'RFS[2]: Archived Log: '/u01/disk1/arch/sh/arch_1_22_760458507.log'Wed Aug 31 11:47:04 2011RFS[1]: Archived Log: '/u01/disk1/arch/sh/arch_1_21_760458507.log'Wed Aug 31 11:47:04 2011RFS[2]: Archived Log: '/u01/disk1/arch/sh/arch_1_24_760458507.log'RFS[2]: Archived Log: '/u01/disk1/arch/sh/arch_1_25_760458507.log'Wed Aug 31 11:47:05 2011RFS[1]: Archived Log: '/u01/disk1/arch/sh/arch_1_23_760458507.log'Wed Aug 31 11:47:05 2011RFS[2]: Archived Log: '/u01/disk1/arch/sh/arch_1_26_760458507.log'RFS[2]: Archived Log: '/u01/disk1/arch/sh/arch_1_27_760458507.log'Wed Aug 31 11:47:05 2011RFS[1]: Archived Log: '/u01/disk1/arch/sh/arch_1_28_760458507.log'Wed Aug 31 11:47:05 2011RFS[2]: Archived Log: '/u01/disk1/arch/sh/arch_1_29_760458507.log'Wed Aug 31 11:47:05 2011Media Recovery Log /u01/disk1/arch/sh/arch_1_23_760458507.logMedia Recovery Log /u01/disk1/arch/sh/arch_1_24_760458507.logMedia Recovery Log /u01/disk1/arch/sh/arch_1_25_760458507.logMedia Recovery Log /u01/disk1/arch/sh/arch_1_26_760458507.logMedia Recovery Log /u01/disk1/arch/sh/arch_1_27_760458507.logMedia Recovery Log /u01/disk1/arch/sh/arch_1_28_760458507.logMedia Recovery Log /u01/disk1/arch/sh/arch_1_29_760458507.logMedia Recovery Waiting for thread 1 sequence 30

七、在主库上切换日志测试数据同步

RMAN> sql'alter system switch logfile';                                                                                                sql statement: alter system switch logfile备库告警日志:RFS[1]: No standby redo logfiles createdRFS[1]: Archived Log: '/u01/disk1/arch/sh/arch_1_30_760458507.log'Wed Aug 31 11:48:06 2011Redo Shipping Client Connected as PUBLIC-- Connected User is ValidRFS[3]: Assigned to RFS process 14234RFS[3]: Identified database type as 'physical standby'Primary database is in MAXIMUM PERFORMANCE modePrimary database is in MAXIMUM PERFORMANCE modeRFS[3]: No standby redo logfiles createdWed Aug 31 11:48:08 2011Media Recovery Log /u01/disk1/arch/sh/arch_1_30_760458507.logMedia Recovery Waiting for thread 1 sequence 31 (in transit)---备库接收到归档日志,并对其做Media Recover。

八、查看数据库信息:

18:02:08 SYS@ bj >select name,database_role,protection_mode from v$database;NAME      DATABASE_ROLE    PROTECTION_MODE--------- ---------------- --------------------BJ         PRIMARY          MAXIMUM PERFORMANCE18:02:50 SYS@ sh >select name,database_role,protection_mode from v$database;NAME      DATABASE_ROLE    PROTECTION_MODE--------- ---------------- --------------------BJ        PHYSICAL STANDBY MAXIMUM PERFORMANCE


----@此案例采用Oracle 10g的环境,对于备库在recover状态下,只能启动到mount状态,如果启动到open环境,则会停止recover,失去了数据保护的功能;对于Oracle 11g,Oracle启用了新的特性,"Active Standby",可以将备库启动到open状态,并且可以继续recover,从而增强了备库的应用范围和备库的功能。



0