Skip to content
Home » Oracle Database » ALTER SYSTEM ARCHIVE LOG CURRENT Hangs ?

ALTER SYSTEM ARCHIVE LOG CURRENT Hangs ?

Since ALTER SYSTEM ARCHIVE LOG CURRENT is a synchronized fashion of switching redo logs, it has to synchronize the archive log completely to all archive log destinations including standby databases before returning the prompt to you. It could seem dead, but actually, the background process is transporting the archived log to standbys.

If any one of the standbys is remote from the primary server in terms of network speed, you have to wait several minutes to see the result, especially the size of this online redo logs is big.

So how can we know the transportation of archived log is still in action? You may check the standby like this:

SQL> select process, status, sequence#, block#, blocks from v$managed_standby;

PROCESS   STATUS        SEQUENCE#     BLOCK#     BLOCKS
--------- ------------ ---------- ---------- ----------
MRP0      WAIT_FOR_LOG      52275          0          0
RFS       RECEIVING         52270    2097150    2097150
RFS       RECEIVING         52274    2097150    2097150
RFS       WRITING           52275     626688    1823183

One RFS of the standby is busy writing logs about in a half way. All you can do is wait, don't interrupt the operation. Please note that, column BLOCKS is not the data block (usually 8KB), it's a redo log block in 512 bytes.

A question for you, do you know the differences between ALTER SYSTEM ARCHIVE LOG CURRENT and ALTER SYSTEM SWITCH LOGFILE?

Leave a Reply

Your email address will not be published. Required fields are marked *