standby db (clearing_current) status‏
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: standby db (clearing_current) status‏

  1. #1
    Join Date
    Feb 2009
    Posts
    91

    standby db (clearing_current) status‏

    All:

    Can somebody please explain why this happens or if this is normal behavior.
    I am running version Oracle 10.2.0.3 version of the Oracle database.

    When in managed recovery mode (been running like this for a week or so).
    I see my status as "CLEARING_CURRENT"

    SQL> select * from v$log;
    GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
    ---------- ---------- ---------- ---------- ---------- --- ----------------
    FIRST_CHANGE# FIRST_TIM
    ------------- ---------
    1 1 517 5242880 1 YES CLEARING_CURRENT
    1096021 09-MAY-09
    2 1 515 5242880 1 YES CLEARING
    1087538 09-MAY-09
    3 1 516 5242880 1 YES CLEARING
    1091468 09-MAY-09

    I take DB out of managed recovery mode and into read only mode and clear
    log files and everything looks okay now.

    SQL> RECOVER MANAGED STANDBY DATABASE CANCEL;
    Media recovery complete.
    SQL> alter database open read only;

    complete.


    SQL> alter database clear unarchived logfile group 1;
    Database altered.
    SQL> alter database clear unarchived logfile group 2;
    Database altered.
    SQL> alter database clear unarchived logfile group 3;
    Database altered.

    SQL> select * from v$log;
    GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
    ---------- ---------- ---------- ---------- ---------- --- ----------------
    FIRST_CHANGE# FIRST_TIM
    ------------- ---------
    1 1 0 5242880 1 YES CURRENT
    1096021 09-MAY-09
    2 1 0 5242880 1 YES UNUSED
    1087538 09-MAY-09
    3 1 0 5242880 1 YES UNUSED
    1091468 09-MAY-09


    I go back into recovery mode and my status says clearing_current. Is this
    the expected behavior?

    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
    Database altered.
    SQL> select * from v$log;
    GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
    ---------- ---------- ---------- ---------- ---------- --- ----------------
    FIRST_CHANGE# FIRST_TIM
    ------------- ---------
    1 1 517 5242880 1 YES CLEARING_CURRENT
    1096021 09-MAY-09
    3 1 0 5242880 1 YES UNUSED
    1091468 09-MAY-09
    2 1 0 5242880 1 YES UNUSED
    1087538 09-MAY-09

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,483

    Cool Duh!

    YES.
    .
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  3. #3
    Join Date
    Feb 2009
    Posts
    91
    Thanks for the response, I guess what I should have really asked is why does this happen?

  4. #4
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,483

    Talking Check primary.

    If you check the primary, you would find something like the following result:
    Code:
    SQL> select * from v$log;
    GROUP#     THREAD#    SEQUENCE#   BYTES     MEMBERS ARC STATUS
    ---------- ---------- ---------- ---------- ------- --- -------
             1          1        517    5242880       1 NO  CURRENT
    Last edited by LKBrwn_DBA; 05-11-2009 at 03:16 PM.
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  5. #5
    Join Date
    Feb 2009
    Posts
    91
    Quote Originally Posted by LKBrwn_DBA View Post
    If you check the primary, you would find something like the following result:
    Code:
    SQL> select * from v$log;
    GROUP#     THREAD#    SEQUENCE#   BYTES     MEMBERS ARC STATUS
    ---------- ---------- ---------- ---------- ------- --- -------
             1          1        517    5242880       1 NO  CURRENT
    You are correct my primary DB does say current (see below) but your not answering my question. Why does my status switch back to clearing_current after I cleared it and go back into recovery mode. I would have expected it to say current or am I missing something.

    Thanks



    SQL> select * from v$log;

    GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
    ---------- ---------- ---------- ---------- ---------- --- ----------------
    FIRST_CHANGE# FIRST_TIM
    ------------- ---------
    1 1 529 5242880 1 YES INACTIVE
    1108113 11-MAY-09

    2 1 530 5242880 1 NO CURRENT
    1108151 11-MAY-09

    3 1 528 5242880 1 YES INACTIVE
    1108095 11-MAY-09

  6. #6
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,483

    Talking Take a closer look

    If you look at this:
    SQL> alter database clear unarchived logfile group 1;
    Database altered.
    SQL> alter database clear unarchived logfile group 2;
    Database altered.
    SQL> alter database clear unarchived logfile group 3;
    Database altered.

    SQL> select * from v$log;
    GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
    ---------- ---------- ---------- ---------- ---------- --- ----------------
    FIRST_CHANGE# FIRST_TIM
    ------------- ---------
    1 1 0 5242880 1 YES CURRENT
    1096021 09-MAY-09
    2 1 0 5242880 1 YES UNUSED
    1087538 09-MAY-09
    3 1 0 5242880 1 YES UNUSED
    1091468 09-MAY-09
    It's NOT the same as this:
    I go back into recovery mode and my status says clearing_current. Is this
    the expected behavior?

    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
    Database altered.
    SQL> select * from v$log;
    GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
    ---------- ---------- ---------- ---------- ---------- --- ----------------
    FIRST_CHANGE# FIRST_TIM
    ------------- ---------
    1 1 517 5242880 1 YES CLEARING_CURRENT
    1096021 09-MAY-09
    3 1 0 5242880 1 YES UNUSED
    1091468 09-MAY-09
    2 1 0 5242880 1 YES UNUSED
    1087538 09-MAY-09
    The 517 sequence number is still in transition.
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  7. #7
    Join Date
    Feb 2009
    Posts
    91
    Quote Originally Posted by LKBrwn_DBA View Post
    If you look at this:

    It's NOT the same as this:

    The 517 sequence number is still in transition.

    Thank you for the clarificaiton, I was so concerned about the status I failed to look at the rest of the data. When you stay transistion, what exactly do you mean? Are the changes being applied, is the DB waiting to get more informaiton from the prim? .... Will one of the logs always be in transition mode as long as I am in media recovery.

    Thanks for all your help

  8. #8
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,483

    Cool Oui, Da, Si, Yah, Yes.

    Quote Originally Posted by PaulH View Post
    ... Are the changes being applied, is the DB waiting to get more informaiton from the prim? .... Will one of the logs always be in transition mode as long as I am in media recovery.
    Yes and yes.

    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width