当前位置:  数据库>oracle

验证DG最大性能模式下使用ARCH/LGWR及STANDBY LOG的不同情况

    来源: 互联网  发布时间:2017-06-04

    本文导语:  1.主库配置及日志:主库:SQL> select protection_mode,database_role,protection_level from v$database;PROTECTION_MODE DATABASE_ROLE PROTECTION_LEVEL-------------------- ---------------- --------------------MAXIMUM PERFORMANCE PRIMARY MAXIMUM PERFORMANCE15:47:43 SQL> show parameter log_ar...

1.主库配置及日志:
主库:
SQL> select protection_mode,database_role,protection_level from v$database;
PROTECTION_MODE DATABASE_ROLE PROTECTION_LEVEL
-------------------- ---------------- --------------------
MAXIMUM PERFORMANCE PRIMARY MAXIMUM PERFORMANCE
15:47:43 SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string SERVICE=prod1 arch async VALI
D_FOR=(ONLINE_LOGFILES,PRIMARY
_ROLE) DB_UNIQUE_NAME=prod1
15:47:49 SQL> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
27
备库:
SQL> select protection_mode,database_role,protection_level from v$database;
PROTECTION_MODE DATABASE_ROLE PROTECTION_LEVEL
-------------------- ---------------- --------------------
MAXIMUM PERFORMANCE PHYSICAL STANDBY MAXIMUM PERFORMANCE

03:48:02 SQL> select group#,thread#,bytes/1024/1024 mb,status from v$standby_log;
no rows selected

03:48:05 SQL> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
27
####################
2.主库做REDO日志切换并查看日志:
15:48:18 SQL> alter system switch logfile;
System altered.
15:49:33 SQL> alter system switch logfile;
System altered.
15:50:11 SQL> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
29
备库已经接收:
03:49:48 SQL> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
29
主库日志:
[oracle@ocm1 ~]$ tail -f alert_PROD.log

Sun Apr 20 15:49:33 2014
Thread 1 advanced to log sequence 29
Current log# 2 seq# 29 mem# 0: /u01/app/oracle/prod/disk1/redo02.log
Current log# 2 seq# 29 mem# 1: /u01/app/oracle/prod/disk2/log2b.log
Sun Apr 20 15:50:11 2014
Thread 1 advanced to log sequence 30
Current log# 3 seq# 30 mem# 0: /u01/app/oracle/prod/disk1/redo03.log
Current log# 3 seq# 30 mem# 1: /u01/app/oracle/prod/disk2/log3b.log
备库日志:
[oracle@ocm2 ~]$ tail -f alert_PROD1.log
RFS[4]: Archived Log: '/u01/app/oracle/prod/arch/1_28_844894247.arc'
Sun Apr 20 03:49:30 2014
Media Recovery Log /u01/app/oracle/prod/arch/1_28_844894247.arc
Media Recovery Waiting for thread 1 sequence 29
Sun Apr 20 03:50:07 2014
RFS[4]: No standby redo logfiles created
RFS[4]: Archived Log: '/u01/app/oracle/prod/arch/1_29_844894247.arc'
Sun Apr 20 03:50:10 2014
Media Recovery Log /u01/app/oracle/prod/arch/1_29_844894247.arc
Media Recovery Waiting for thread 1 sequence 30
##########################################################

主库配置不变。
备库增加STANDBY LOG:
03:55:04 SQL> alter database recover managed standby database cancel;
Database altered.
03:56:39 SQL> alter database add standby logfile '/u01/app/oracle/prod/disk1/standbylog1.log' size 100m;
Database altered.
03:56:50 SQL> alter database add standby logfile '/u01/app/oracle/prod/disk1/standbylog2.log' size 100m;
Database altered.
03:56:55 SQL> alter database add standby logfile '/u01/app/oracle/prod/disk1/standbylog3.log' size 100m;
Database altered.
03:57:00 SQL> alter database add standby logfile '/u01/app/oracle/prod/disk1/standbylog4.log' size 100m;
Database altered.
03:57:05 SQL> select group#,thread#,bytes/1024/1024 mb,status from v$standby_log;
GROUP# THREAD# MB STATUS
---------- ---------- ---------- ----------
4 0 100 UNASSIGNED
5 0 100 UNASSIGNED
6 0 100 UNASSIGNED
7 0 100 UNASSIGNED
04:13:33 SQL> alter database recover managed standby database disconnect from session;
Database altered.
04:14:12 SQL> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
38
###在主库切换日志:
16:15:40 SQL> alter system switch logfile;
System altered.
16:15:53 SQL> alter system switch logfile;
System altered.
16:16:10 SQL> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
40
备库查询:
04:02:47 SQL> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
32
04:02:49 SQL>

############################
第二次正常时的日志:
[oracle@ocm1 ~]$ tail -f alert_PROD.log

Sun Apr 20 16:18:21 2014
Thread 1 cannot allocate new log, sequence 42
Checkpoint not complete
Current log# 2 seq# 41 mem# 0: /u01/app/oracle/prod/disk1/redo02.log
Current log# 2 seq# 41 mem# 1: /u01/app/oracle/prod/disk2/log2b.log
Thread 1 advanced to log sequence 42
Current log# 3 seq# 42 mem# 0: /u01/app/oracle/prod/disk1/redo03.log
Current log# 3 seq# 42 mem# 1: /u01/app/oracle/prod/disk2/log3b.log
Sun Apr 20 16:19:08 2014
Thread 1 cannot allocate new log, sequence 43
Checkpoint not complete
Current log# 3 seq# 42 mem# 0: /u01/app/oracle/prod/disk1/redo03.log
Current log# 3 seq# 42 mem# 1: /u01/app/oracle/prod/disk2/log3b.log
Thread 1 advanced to log sequence 43
Current log# 1 seq# 43 mem# 0: /u01/app/oracle/prod/disk1/redo01.log
Current log# 1 seq# 43 mem# 1: /u01/app/oracle/prod/disk2/log1b.log
Sun Apr 20 16:20:41 2014
Expanded controlfile section 11 from 56 to 112 records
Requested to grow by 56 records; added 2 blocks of records
备库:
[oracle@ocm2 ~]$ tail -f alert_PROD1.log
Sun Apr 20 04:20:36 2014
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[8]: Assigned to RFS process 16069
RFS[8]: Identified database type as 'physical standby'
RFS[8]: Archived Log: '/u01/app/oracle/prod/arch/1_40_844894247.arc'
RFS[8]: Archived Log: '/u01/app/oracle/prod/arch/1_41_844894247.arc'
RFS[8]: Archived Log: '/u01/app/oracle/prod/arch/1_42_844894247.arc'
Sun Apr 20 04:20:37 2014
Media Recovery Log /u01/app/oracle/prod/arch/1_40_844894247.arc
Media Recovery Log /u01/app/oracle/prod/arch/1_41_844894247.arc
Media Recovery Log /u01/app/oracle/prod/arch/1_42_844894247.arc
Media Recovery Waiting for thread 1 sequence 43

更多详情见请继续阅读下一页的精彩内容:


    
 
 

您可能感兴趣的文章:

 
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • Uploadify 'uploadify.php'存在多个输入验证漏洞
  • JSP单选按钮验证、下拉框验证、复选框验证实现代码
  • 广告系统中weak-and算法原理及编码验证
  • sqlserver服务器验证改为混合验证模式步骤
  • MVC2 jQuery的验证时,关于客户端验证绑定复选框问题。
  • php验证码 php非预置图片生成验证码 iis7站长之家
  • 表单验证插件 Jquery表单验证插件
  • 我用了C写了MYSQL的登陆命令CONNECT()但它不验证就进入,该如何验证
  • MD5怎么验证?我下载了ISO文件具体怎么验证?急!
  • jquery表单验证框架提供的身份证验证方法(示例代码)
  • php验证码 php非预置图片生成验证码
  • C#代码验证sql语句是否正确(只验证不执行sql)的方法
  • java正则表达式表单验证类工具类(验证邮箱、手机号码、qq号码等)
  • php使用filter过滤器验证邮箱 ipv6地址 url验证
  • asp.net创建位图生成验证图片类(验证码类)
  • jquery内置验证(validate)使用方法示例(表单验证)
  • PHP验证码生成脚本 Securimage
  • python生成随机验证码(中文验证码)示例
  • jquery validate 自定义验证方法介绍 日期验证
  • VVC思想页面解耦合JS验证框架 vtor
  • jQuery表单验证插件 validVal


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,