ALTER system switch logfile is a force log switch that does not necessarily archive the current redo log file (if an automatic archive is turned on, the redo log before archiving, if the automatic archive is not open, do not archive the current redo log.) )
Alter system archive Log current is the archive of the present redo log files, regardless of whether the automatic archive has been filed.
The main difference is:
ALTER SYSTEM Switch logfile performs a log switch on the current instance in a single instance database or RAC;
Alter SYSTEM ARCHIVE log switch for all instances in the database.
Why do I perform the statement of ALTER system archive log current after hot standby, and see that many scripts are written like this.
was not necessary.
The general Rman script is written in this way, because Rman can back up the archive log. Alter system archive Log current enables you to back up all of your archives. This is done to ensure the integrity and consistency of the data.
ALTER SYSTEM SWITCH LOGFILE;
SWITCH LOGFILE Clause
The SWITCH LOGFILE clause lets you explicitly force Oracle to begin writing to a new redo log file group, regardless of wh Ether the files in the current redo log file group are full. When you are force a log switch, Oracle begins to perform a checkpoint but returns control to your immediately rather when The checkpoint is complete. To use this clause, your instance must have the database open.
ALTER SYSTEM ARCHIVE LOG current;
Current Clause
Specify manually archive the current redo log file group of the specified thread (instance), forcing a log switc H. If you are omit the THREAD parameter, then Oracle archives all redo log file groups to all-enabled threads (instances), in cluding logs previous to current logs. You can specify the ' when ' the database is open.
ALTER SYSTEM ARCHIVE LOG current noswitch;
Noswitch
Specify Noswitch If you are want to manually archive the current redo log file group without forcing a log switch. This setting are used primarily with standby databases to prevent data divergence the primary database. Divergence implies the possibility of data loss in case of primary database failure.
You can use the Noswitch clause only if your instance has the database mounted not open. If The database is open, then this operation closes the database automatically. Must then manually shut down the database before you can reopen it.