亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 1100 | 回復(fù): 0
打印 上一主題 下一主題

Oracle數(shù)據(jù)庫日志切換時(shí)的區(qū)別 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2011-12-20 09:48 |只看該作者 |倒序?yàn)g覽

alter system switch logfile 是強(qiáng)制日志切換,不一定就歸檔當(dāng)前的重做日志文件

(若自動(dòng)歸檔打開,就歸檔前的重做日志,若自動(dòng)歸檔沒有打開,就不歸檔當(dāng)前重做日志。)
alter system archive log current 是歸檔當(dāng)前的重做日志文件,不管自動(dòng)歸檔有沒有打都?xì)w檔。
主要的區(qū)別在于:
ALTER SYSTEM SWITCH LOGFILE對單實(shí)例數(shù)據(jù)庫或RAC中的當(dāng)前實(shí)例執(zhí)行日志切換;
而ALTER SYSTEM ARCHIVE LOG CURRENT會(huì)對數(shù)據(jù)庫中的所有實(shí)例執(zhí)行日志切換。

為什么執(zhí)行熱備后要執(zhí)行alter system archive log current 這個(gè)語句,看到很多腳本都是這樣寫的。
是不是必須的?

一般的RMAN腳本都是這樣寫的,因?yàn)镽MAN是可以備份歸檔日志的。

alter system archive log current 這樣后就可以將所有的歸檔都備份出來了。這樣做是為了保證數(shù)據(jù)的完整和一致。

 

ALTER SYSTEM SWITCH LOGFILE ;
SWITCH LOGFILE Clause

TheSWITCHLOGFILEclause 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

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


ALTER SYSTEM ARCHIVE LOG CURRENT NOSWITCH;
NOSWITCH

SpecifyNOSWITCHif 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 theNOSWITCHclause 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

您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP