签到成功

知道了

CNDBA社区CNDBA社区

How to Add/Drop/Resize Redo Log with Physical Standby in place. [ID 473442.1]

2016-11-25 15:59 2459 0 原创 Oracle 11g
作者: dave

 

How to Add/Drop/Resize Redo Log with Physical Standby in place. [ID 473442.1]http://www.cndba.cn/Dave/article/1437


 

Modified 12-AUG-2009     Type HOWTO     Status REVIEWED

 

In this Document
  Goal
  Solution
http://www.cndba.cn/Dave/article/1437


Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 10.2.0.5
Information in this document applies to any platform.
http://www.cndba.cn/Dave/article/1437http://www.cndba.cn/Dave/article/1437http://www.cndba.cn/Dave/article/1437http://www.cndba.cn/Dave/article/1437http://www.cndba.cn/Dave/article/1437

Goal

To Add/Drop/Resize online redo logs in the primary site with physical standby database in place. What are the steps to be done on standby if any?

Solution

Changing the size of redo involves adding the new sized log and dropping the unwanted old log. There is no resize command as such. You can add or drop online redo log file groups or members to the primary database without affecting the standby database. Similarly, you can drop log file groups or members from the primary database without affecting your standby database. However, these changes do affect the performance of the standby database after a role transition. So it is best advised whenever you add an online redo log file to the primary database, you should add corresponding online and standby redo
log files to the standby database.

http://www.cndba.cn/Dave/article/1437

To resize redo logs the steps are as follows:

At the primary site

=============

1. Set STANDBY_FILE_MANAGEMENT to MANUAL.
SQL> ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT='MANUAL';


2. Add the new redo logfile groups of the required sizes.
SQL> ALTER DATABASE ADD LOGFILE GROUP 4 ('/U01/oracle/modg1/redo04.log') SIZE 50M;


3. Drop the old groups, this may involve performing log switches to ensure the old logs have been archived correctly or could be performed later once oracle has finished with the logs.
SQL>ALTER DATABASE DROP LOGFILE GROUP 2;

4. Set STANDBY_FILE_MANAGEMENT to AUTO.
SQL> ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT='AUTO';

http://www.cndba.cn/Dave/article/1437


At the standby site

=============
1. Stop Redo apply:

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

2. Set STANDBY_FILE_MANAGEMENT to MANUAL.
SQL> ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT='MANUAL';

3. Add Redolog File Group:
SQL> ALTER DATABASE ADD LOGFILE GROUP 4 ('/U01/oracle/modg1/redo04.log') SIZE 50M;

Add as many Redo Logfile Groups (or Members) you want to add.

4. Set STANDBY_FILE_MANAGEMENT to AUTO.
SQL> ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT='AUTO';

5. Check the Status of the Online Redolog Group.
SQL> SELECT GROUP#, STATUS FROM V$LOG;

GROUP# STATUS
---------- ----------------
1 CLEARING_CURRENT
3 CLEARING
2 CLEARING

If Status is CLEARING_CURRENT then you cannot drop Online Redolog Group. You will get ORA-01623 if you try to drop a Redolog Group with Status CLEARING_CURRENT.


For Status CLEARING, UNUSED, INACTIVE please follow below steps.

6. Clear the Online Redo Logfile Group:
SQL> ALTER DATABASE CLEAR LOGFILE GROUP 2;

7. Drop the Online Redo Logfile Group:
SQL>ALTER DATABASE DROP LOGFILE GROUP 2;

If you have skipped Step 4 then you will get ORA-01624 while droping the Online Redolog Group with Status CLEARING.

8. Set STANDBY_FILE_MANAGEMENT to AUTO.
SQL> ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT='AUTO';

9. Start Redo Apply:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;


 

 http://www.cndba.cn/Dave/article/1437

------------------------------------------------------------------------------

Blog http://blog.csdn.net/tianlesoftware

网上资源: http://tianlesoftware.download.csdn.net

相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx

DBA1 群:62697716(); DBA2 群:62697977()

DBA3 群:62697850   DBA 超级群:63306533;    

聊天 群:40132017

--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请

版权声明:本文为博主原创文章,未经博主允许不得转载。

oracle 11g

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
dave

dave

关注

人的一生应该是这样度过的:当他回首往事的时候,他不会因为虚度年华而悔恨,也不会因为碌碌无为而羞耻;这样,在临死的时候,他就能够说:“我的整个生命和全部精力,都已经献给世界上最壮丽的事业....."

  • 2272
    原创
  • 3
    翻译
  • 579
    转载
  • 194
    评论
  • 访问:8143414次
  • 积分:4383
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ