模拟物理standby产生gap
来源:互联网 发布:淘宝女打底衫 编辑:程序博客网 时间:2024/06/06 03:18
1.停掉备库dg2的网络
2.在主库进行切换日志的操作
SYS@dg1>select protection_mode,database_role,protection_level from v$database;PROTECTION_MODE DATABASE_ROLE PROTECTION_LEVEL
-------------------- ---------------- --------------------
MAXIMUM PERFORMANCE PRIMARY MAXIMUM PERFORMANCE
SYS@dg1>alter system switch logfile;
System altered.
SYS@dg1>alter system switch logfile;
System altered.
SYS@dg1>col name for a40
SYS@dg1>select * from (select name,recid from v$archived_log order by recid desc) where rownum<5;
NAME RECID
---------------------------------------- ----------
dg2 285
/u01/archivelog/arc_1_147_821829622.arc 284
/u01/archivelog/arc_1_146_821829622.arc 283
/u01/archivelog/arc_1_145_821829622.arc 282
3.去操作系统中把刚才切换日志产生的归档文件移动(这里是改了个名)
[oracle@dg1 ~]$ cd /u01/archivelog/[oracle@dg1 archivelog]$ mv arc_1_146_821829622.arc arc_1_146_821829622.arcbak
4.恢复备库dg2的网络并查看主备库的日志,出现了GAP
此时主库dg1的日志:FAL[server, ARC0]: Error 12543 creating remote archivelog file 'dg2'
FAL[server, ARC0]: FAL archive failed, see trace file.
Errors in file /u01/diag/rdbms/dg1/dg/trace/dg_arc0_14838.trc:
ORA-16055: FAL request rejected
ARCH: FAL archive failed. Archiver continuing
ORACLE Instance dg - Archival Error. Archiver continuing.
FAL[server, ARC3]: Error 12543 creating remote archivelog file 'dg2'
FAL[server, ARC3]: FAL archive failed, see trace file.
Errors in file /u01/diag/rdbms/dg1/dg/trace/dg_arc3_14850.trc:
ORA-16055: FAL request rejected
ARCH: FAL archive failed. Archiver continuing
ORACLE Instance dg - Archival Error. Archiver continuing.
此时备库dg2的日志:
[oracle@dg2 ~]$ cat alert_dg.log
Mon Aug 05 11:34:20 2013
RFS[2]: Assigned to RFS process 7930
RFS[2]: Identified database type as 'physical standby': Client is ARCH pid 14846
Mon Aug 05 11:34:20 2013
RFS[3]: Assigned to RFS process 7934
RFS[3]: Identified database type as 'physical standby': Client is ARCH pid 14850
RFS[3]: Opened log for thread 1 sequence 147 dbid 1735160627 branch 821829622
Archived Log entry 153 added for thread 1 sequence 147 rlc 821829622 ID 0x6776473b dest 2:
Mon Aug 05 11:34:23 2013
Fetching gap sequence in thread 1, gap sequence 146-146
Mon Aug 05 11:34:34 2013
FAL[client]: Failed to request gap sequence
GAP - thread 1 sequence 146-146
DBID 1735160627 branch 821829622
FAL[client]: All defined FAL servers have been attempted.
-------------------------------------------------------------
Check that the CONTROL_FILE_RECORD_KEEP_TIME initialization
parameter is defined to a value that is sufficiently large
enough to maintain adequate log switch information to resolve
archivelog gaps.
-------------------------------------------------------------
5.此时在主库上把归档名字改回去。系统自动修复GAP。
[oracle@dg1 ~]$ cat alert_dg.log[oracle@dg1 ~]$ cd /u01/archivelog/
[oracle@dg1 archivelog]$ mv arc_1_146_821829622.arcbak arc_1_146_821829622.arc
[oracle@dg1 archivelog]$ cd
稍等片刻:
[oracle@dg1 ~]$ sqlplus / as sysdba
SYS@dg1>select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
147
[oracle@dg2 ~]$ cat alert_dg.log
Mon Aug 05 11:43:21 2013
RFS[3]: Opened log for thread 1 sequence 146 dbid 1735160627 branch 821829622
Archived Log entry 154 added for thread 1 sequence 146 rlc 821829622 ID 0x6776473b dest 2:
Mon Aug 05 11:43:25 2013
Media Recovery Log /u01/archivelog/arc_1_146_821829622.arc
Media Recovery Log /u01/archivelog/arc_1_147_821829622.arc
Media Recovery Waiting for thread 1 sequence 148
oracle@dg2 ~]$ sqlplus / as sysdba
SYS@dg2>select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
147
- 模拟物理standby产生gap
- 模拟物理standby产生GAP的情形
- 物理standby高级管理
- DataGuard - 物理Standby管理
- 物理standby的Failover
- dataguard 中standby有大量gap解决方法
- physical standby 归档出现gap的解决办法
- dataguard 中standby有大量gap解决方法
- oracle物理dg gap解决
- 利用Rman搭建物理standby
- Oracle DataGuard 物理Standby 搭建
- 物理STANDBY的SWITCHOVER切换
- 物理Standby Switchover 角色转换
- Dataguard 备机产生gap
- 物理standby转换为逻辑standby的步骤
- 物理standby主备库的手工切换步骤
- DataGuard物理standby配置 - 参数文件设置
- DATA GUARD物理STANDBY的 SWITCHOVER切换
- 有一段传奇 叫提高班
- 一个不错的php图片处理类EasyPhpThumbnail Class
- Jode Eclipse 插件的安装与使用
- Android Robotium自动化测试
- windows设置为 NTP server
- 模拟物理standby产生gap
- XML解析出现An invalid XML character (Unicode: 0x**) was found in the comment.
- java保留两位小数4种方法
- Android Permission Denial: starting Intent
- 接收数据并显示实时波形图---资料收集
- Android Robotium自动化测试二
- android中intent带Uri传输时中文的乱码、android 获取文件名乱码处理方法
- HDU 2707 Steganography 字符串处理
- DWR使用总结