Alter system switch logfile
It is asynchronous. This command is fast to
return to the invoking program because the writing of the redo log to the OS
filesystem is done in the background. Some scripts will place a “sleep
60” command in their backup script to allow time for the redo to complete
writing, but this is not a best practice. There is a very small risk in
cases where the ARCH process cannot complete writing the redo log, such as
cases where the OS archivelog file directory is out of space. It is also risky
because the calling script may move on to a subsequent step, assuming that the
redo has been written.
Note:
This
statement execute if database Archivelog & NO Archivelog mode,
Just switch logfile from one Group to other Group
Alter system archivelog current
Alter system archivelog current
It is synchronous. This is fast because this
command waits until the online redo log has completed the writing of the redo
log file to the filesystem. This command is safer because it waits for the OS
to acknowledge (ACK) that the redo log has been successfully written. Hence,
“alter system archivelog current” is the best practice for production backup
scripts with RMAN.
Note:
This
statement execute if database in Archivelog mode. It will work in RAC
database