alter system switch logfile和alter system archive log current的區別
<div id="article_content" class="article_content">
<p>
alter system switch logfile 是強制日誌切換,不一定就歸檔當前的重做日誌檔案(若自動歸檔開啟,就歸檔前的重做日誌,若自動歸檔沒有開啟,就不歸檔當前重做日誌。)<br />
alter system archive log current 是歸檔當前的重做日誌檔案,不管自動歸檔有沒有打都歸檔。<br />
主要的區別在於:<br />
ALTER SYSTEM SWITCH LOGFILE對單例項資料庫或RAC中的當前例項執行日誌切換;<br />
而ALTER SYSTEM ARCHIVE LOG CURRENT會對資料庫中的所有例項執行日誌切換。
</p>
<p>
為什麼執行熱備後要執行alter system archive log current 這個語句,看到很多指令碼都是這樣寫的。<br />
是不是必須的?
</p>
<p>
一般的RMAN指令碼都是這樣寫的,因為RMAN是可以備份歸檔日誌的。alter system archive log current 這樣後就可以將所有的歸檔都備份出來了。這樣做是為了保證資料的完整和一致。
</p>
<p>
ALTER SYSTEM SWITCH LOGFILE ;<br />
SWITCH LOGFILE Clause<br />
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.
</p>
<p>
ALTER SYSTEM ARCHIVE LOG CURRENT ;<br />
CURRENT Clause<br />
Specify
CURRENT to manually archive the current redo log file group of the
specified thread(instance), forcing a log switch. If you omit the THREAD
parameter, then Oracle archives all redo log file groups from all
enabled threads(instances), including logs previous to current logs. You
can specify CURRENT only when the database is open.
</p>
<p>
ALTER SYSTEM ARCHIVE LOG CURRENT NOSWITCH;<br />
NOSWITCH<br />
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.
</p>
<p>
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.
</p>
</div>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30496894/viewspace-2087801/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- alter system switch logfile 和 alter system archive log current 的區別Hive
- alter system archive log current和alter system switch logfileHive
- [轉]alter system switch logfile和alter system archive log current的區別Hive
- zt:alter system switch logfile與ALTER SYSTEM ARCHIVE LOG CURRENT的區別Hive
- ALTER SYSTEM SWITCH LOGFILE ALTER SYSTEM ARCHIVELOG CURRENT 區別Hive
- alter system archive log current / all / switch logfileHive
- alter system switch log file 與 archive log current/all 區別Hive
- alter system archive log current noswitch!!Hive
- [alter system dump學習1]alter system dump logfile
- alter system switch logfile hang住的一種可能
- alter system switch logfile的執行時間是多久。
- alter database和alter system和alter session的區別DatabaseSession
- alter system events與alter system event的區別
- alter system switch logfile手工日誌切換小記
- 忍不住問下alter system 和alter database的區別Database
- oracle switch logfile日誌切換及alter system checkpoint作了什麼Oracle
- alter system set event和set events的區別
- Alter system in OracleOracle
- ALTER SYSTEM 中 SCOPE=SPFILE/MEMORY/BOTH 的區別:
- 在oracle10g執行alter system switch logfile並未開啟自動歸檔Oracle
- alter system kill sessionSession
- 在使用alter system switch log的時候無時間限制的等待
- alter system check datafiles 命令
- alter session|system set eventsSession
- 通過 alter system dump logfile語句dump REDO及歸檔日誌資訊示例
- alter system dump datafile headerHeader
- ALTER SYSTEM DISCONNECT SESSION ClauseSession
- ALTER DATABASE CLEAR UNARCHIVED LOGFILE的使用DatabaseHive
- Alter system suspend/resume 導致的bug和特性
- oracle中Alter system 命令的總結Oracle
- alter system kill session 不成功Session
- alter table move 和 alter table shrink space的區別
- alter system set events 相關知識
- alter system set events 知識 [final]
- alter system set events相關知識:
- alter system set events相關知識
- UNRECOVERABLE DATAFILE clause in the ALTER DATABASE CLEAR LOGFILE statementDatabase
- 【Oracle】alter system set events 相關知識Oracle