alter system archive log current noswitch!!

oracle_ace發表於2007-12-27
剛才犯了一個低階的錯誤。
為了歸檔我的日誌,我不小心加上了一個noswitch引數,而且我的資料庫不是standby的,這個操作導致資料庫被close了。幸虧即時開啟,不然又得忙活了.......

alter system switch logfile
alter system archive log current
alter system archive log noswitch

的具體解釋如下,記錄於此以警視自己。

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 whether the files in the current redo log file group are full. When you force a log switch, Oracle begins to perform. a checkpoint but returns control to you immediately rather than when the checkpoint is complete. To use this clause, your instance must have the database open.

ALTER SYSTEM ARCHIVE LOG CURRENT ; CURRENT Clause

Specify CURRENT to manually archive the current redo log file group of the specified thread, forcing a log switch. If you omit the THREAD parameter, then Oracle archives all redo log file groups from all enabled threads, including logs previous to current logs. You can specify CURRENT only when the database is open.

ALTER SYSTEM ARCHIVE LOG CURRENT NOSWITCH; NOSWITCH

Specify NOSWITCH if you want to manually archive the current redo log file group without forcing a log switch. This setting is used primarily with standby databases to prevent data divergence when the primary database shuts down. Divergence implies the possibility of data loss in case of primary database failure.

You can use the NOSWITCH clause only when your instance has the database mounted but not open. If the database is open, then this operation closes the database automatically. You must then manually shut down the database before you can reopen it

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12361284/viewspace-7631/,如需轉載,請註明出處,否則將追究法律責任。

相關文章