ITPub博客

首页 > Linux操作系统 > Linux操作系统 > data guard关于standby_file_management参数的说明

data guard关于standby_file_management参数的说明

原创 Linux操作系统 作者:crpp0902 时间:2019-06-02 08:36:07 0 删除 编辑
前段时间对数据库进行了调整,把REDOLOG FILE的位置从RAID5的磁盘移到了RAID0下,从A 分区移到了B分区,并改变了其大小。根据以下的一篇文档,在STANDBY上进行相关操作:
Another example of a change on the primary that requires user intervention on the standby is any command that adds or alters online redo logs. While is it technically not necessary to keep the online redo logs the same between the primary and standby site, it is a good practice. Once you have added or dropped the online redo log on the primary, perform the following on the standby to bring it back into sync with the primary:

Step 1.  Stop managed recovery.

alter database recover managed standby database cancel;
Step 2.  Set the STANDBY_FILE_MANAGEMENT parameter to MANUAL.

alter system set standby_file_management=manual;
Step 3.  Issue the SQL to drop or add the online redo log on the standby database.

Step 4.  Set standby_file_management to AUTO.

alter system set standby_file_management=auto;
Step 5.  Restart managed recovery with the original options.

Be aware that if you add an online redo log on the primary, you should also add a standby redo log on the standby and primary to maintain the correct number to ensure their use.


在进行第三步的时候,报如下错误:
SQL> select * from v$logfile;

    GROUP# STATUS  TYPE    MEMBER
---------- ------- ------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
         3         ONLINE  /u02/app/oracle/oradata/sensky/redo131.log
         2         ONLINE  /u02/app/oracle/oradata/sensky/redo121.log
         1         ONLINE  /u02/app/oracle/oradata/sensky/redo111.log
         1         ONLINE  /u02/app/oracle/oradata/sensky/redo112.log
         2         ONLINE  /u02/app/oracle/oradata/sensky/redo122.log
         3         ONLINE  /u02/app/oracle/oradata/sensky/redo132.log
         7         STANDBY /u02/app/oracle/oradata/sensky/redo7s.rdo
         8         STANDBY /u02/app/oracle/oradata/sensky/redo8s.rdo
         9         STANDBY /u02/app/oracle/oradata/sensky/redo9s.rdo

9 rows selected.

SQL> select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
         1          1      17274  104857600          2 YES CLEARING            1845620480 18-JUL-05
         2          1      17275  104857600          2 YES CLEARING            1845672812 18-JUL-05
         3          1      17276  104857600          2 YES CLEARING_CURRENT    1845770739 18-JUL-05

SQL> alter database drop logfile group 1;
alter database drop logfile group 1
*
ERROR at line 1:
ORA-01624: log 1 needed for crash recovery of thread 1
ORA-00312: online log 1 thread 1: '/u02/app/oracle/oradata/sensky/redo111.log'
ORA-00312: online log 1 thread 1: '/u02/app/oracle/oradata/sensky/redo112.log'


SQL> alter database drop logfile group 2;
alter database drop logfile group 2
*
ERROR at line 1:
ORA-01624: log 2 needed for crash recovery of thread 1
ORA-00312: online log 2 thread 1: '/u02/app/oracle/oradata/sensky/redo121.log'
ORA-00312: online log 2 thread 1: '/u02/app/oracle/oradata/sensky/redo122.log'

难道还有一些参数要进行修改吗??

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28419/viewspace-613750/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2002-11-14

  • 博文量
    59
  • 访问量
    54496