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

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

Chinaunix

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

[Hive] alter system switch logfile 和 alter system archive [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2011-12-21 08:44 |只看該作者 |倒序?yàn)g覽
<p><font size="2" face="Verdana">主要區(qū)別:</font></p><p><font size="2" face="Verdana">ALTER SYSTEM <a target="_self"><u><strong>SWITCH</strong></u></a> <a target="_self"><u><strong>LOGFILE</strong></u></a> 對(duì)單實(shí)例<a target="_self"><u><strong>數(shù)據(jù)庫</strong></u></a>或RAC中的當(dāng)前實(shí)例執(zhí)行日志切換。<br>ALTER SYSTEM ARCHIVE LOG CURRENT 會(huì)對(duì)數(shù)據(jù)庫中的所有實(shí)例執(zhí)行日志切換。</font></p><br><p><font size="2" face="Verdana">詳細(xì)解釋:</font></p><p><font size="2" face="Verdana">-------------------------</font></p><p><font size="2" face="Verdana">我們都知道在自動(dòng)歸檔的數(shù)據(jù)庫中,這兩個(gè)命令幾乎產(chǎn)生的結(jié)果是一樣的。來看看<a target="_self"><u><strong>oracle</strong></u></a>的解釋:</font></p><div><font size="2" face="Verdana"><font style="BACKGROUND-COLOR: #a6a6a6" color="#660000">ALTER SYSTEM SWITCH LOGFILE ;<br></font>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 <a target="_self"><u><strong>database</strong></u></a> open.</font></div><div><font size="2" face="Verdana">ALTER SYSTEM ARCHIVE LOG CURRENT ;<br>CURRENT Clause<br>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.</font></div><div><font size="2" face="Verdana"><font style="BACKGROUND-COLOR: #a6a6a6" color="#660000">ALTER SYSTEM ARCHIVE LOG CURRENT NOSWITCH;</font><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.</font></div><div><font size="2" face="Verdana">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</font></div><div><br><font size="2" face="Verdana">我們首先要明白兩個(gè)事實(shí):<br>一個(gè)就是在logfile switch的時(shí)候會(huì)觸發(fā)arch進(jìn)程,即通知?dú)w檔進(jìn)程說那個(gè)日志可以歸檔了。<br>另
一個(gè)是logfile
switch的時(shí)候會(huì)觸發(fā)ckpt進(jìn)程。而ckpt進(jìn)程又會(huì)觸發(fā)dbwr進(jìn)程。dbwr進(jìn)程會(huì)把上一個(gè)redo中保護(hù)的儲(chǔ)藏在buffer
cache中的dirty buffer全部寫回磁盤。然后,ckpt進(jìn)程紀(jì)錄scn到controlfile中,這時(shí)會(huì)把redo
log的狀態(tài)由active 變成inactive。</font></div><div><font size="2" face="Verdana">由此我們可以看出處于inactive狀態(tài)的redo log對(duì)于instance recovery是沒有用處了。但是它可能對(duì)于meda recovery還有用處,因?yàn)樘幱趇nactive狀態(tài)的redo log可能已經(jīng)歸檔,也可能沒有歸檔。</font></div><div><font size="2" face="Verdana">出現(xiàn) checkpoint not complete,unable to allocate new redo log file的錯(cuò)誤,是因?yàn)閘gwr要覆蓋一個(gè)其上檢查點(diǎn)過程沒有結(jié)束的日志文件,lgwr會(huì)<a class="qs_highlight1" id="hl_0" style="FONT-SIZE: 1em" href="http://clk.qunsee.com/click/click.php?cpid=12&amp;ads_id=77&amp;pid=99002480&amp;cid=2487&amp;url=http%3A//otr.samsung.com.cn/&amp;k=%u7B49%u5F85&amp;s=http%3A//www.ixdba.net/article/88/1260.html&amp;rn=861797&amp;v=1&amp;ref=http%3A//www.google.cn/search%3Fcomplete%3D1%26hl%3Dzh-CN%26newwindow%3D1%26q%3Dlog+file+switch%26revid%3D2081610865%26sa%3DX%26oi%3Drevisions_inline%26resnum%3D0%26ct%3Dbroad-revision%26cd%3D4&amp;province=%u798F%u5EFA&amp;city=%u798F%u5DDE" target="_blank">等待</a>dbwr完成,同時(shí)出現(xiàn)此錯(cuò)誤。出現(xiàn)這個(gè)錯(cuò)誤的原因,大概有幾點(diǎn),一個(gè)是dbwr寫出速度太慢,一個(gè)是buffer cache中的臟數(shù)據(jù)太多。即事務(wù)太頻繁,另一個(gè)也可能是日志太小,或日志組太少導(dǎo)致的。</font></div><div><p><font size="2" face="Verdana"><strong><a target="_self"><u><strong>備份</strong></u></a>恢復(fù)中用到的幾個(gè)操作:</strong></font></p><p><font size="2" face="Verdana">alter system checkpoint;<br>alter system archive log all;<br>alter system archive log current<br>alter system switch logfile;</font></p><p><font size="2" face="Verdana">1:alter system checkpoint;</font></p><p><font size="2" face="Verdana">Specify
CHECKPOINT to explicitly force Oracle to perform. a checkpoint,
ensuring that all changes made by committed transactions are written to
datafiles on disk. You can specify this clause only when your instance
has the database open. Oracle does not return control to you until the
checkpoint is complete.<font size="2" face="Verdana"><a href="http://www.ixdba.net/"><font color="#ecf4f5" size="2" face="Verdana"><strong>區(qū)</strong></font></a></font><br>強(qiáng)迫oracle進(jìn)行以次檢查點(diǎn),確保所有提交的事務(wù)的改變都被寫到磁盤數(shù)據(jù)文件上。</font></p><p><font size="2">2: alter system archive log all;</font></p><p><font size="2" face="Verdana">手工歸檔所有的日志文件組</font></p><p><font size="2" face="Verdana">3:alter system archive log current</font></p><p><font size="2" face="Verdana">手工歸檔<a class="qs_highlight1" id="hl_1" style="FONT-SIZE: 1em" href="http://clk.qunsee.com/click/click.php?cpid=1021&amp;ads_id=941&amp;pid=99002480&amp;cid=2487&amp;url=http%3A//www.chanet.com.cn/click.cgi%3Fa%3D59068%26d%3D36229%26u%3D%26e%3D&amp;k=%u6D3B%u52A8&amp;s=http%3A//www.ixdba.net/article/88/1260%242.html&amp;rn=998285&amp;v=1&amp;ref=http%3A//www.ixdba.net/article/88/1260.html&amp;province=%u798F%u5EFA&amp;city=%u798F%u5DDE" target="_blank">活動(dòng)</a>的日志文件組。<br>4: alter system switch logfile;<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.<br>開始寫新的日志文件組。不管當(dāng)前日志文件組是否滿了。</font></p></div>
               
               
               
               
您需要登錄后才可以回帖 登錄 | 注冊(cè)

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

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):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)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP