欧美亚洲中文,在线国自产视频,欧洲一区在线观看视频,亚洲综合中文字幕在线观看

      1. <dfn id="rfwes"></dfn>
          <object id="rfwes"></object>
        1. 站長(zhǎng)資訊網(wǎng)
          最全最豐富的資訊網(wǎng)站

          十分鐘搞懂oracle數(shù)據(jù)庫的開啟和關(guān)閉

          本篇文章給大家?guī)砹岁P(guān)于oracle數(shù)據(jù)庫的開啟和關(guān)閉的相關(guān)知識(shí),希望對(duì)大家有幫助。

          十分鐘搞懂oracle數(shù)據(jù)庫的開啟和關(guān)閉

          關(guān)于數(shù)據(jù)庫的各種啟動(dòng)和關(guān)閉命令一直感覺有些混亂,現(xiàn)整理一下。

          一、數(shù)據(jù)庫的啟動(dòng) :

          Oracle 的啟動(dòng)分為三個(gè)步驟:分別是啟動(dòng)實(shí)例、加載數(shù)據(jù)庫 、打開數(shù)據(jù)庫??梢愿鶕?jù)自己的實(shí)際需要來開啟數(shù)據(jù)庫

          語法是startup

          1、nomount 模式

          SQL> startup nomount ORACLE instance started.  Total System Global Area  830930944 bytes Fixed Size                  2257800 bytes Variable Size             536874104 bytes Database Buffers          285212672 bytes Redo Buffers                6586368 bytes

          這種啟動(dòng)方式只創(chuàng)建實(shí)例(即創(chuàng)建Oracle實(shí)例的各種內(nèi)存結(jié)構(gòu)和服務(wù)進(jìn)程),并不加載數(shù)據(jù)庫也不會(huì)打開數(shù)據(jù)文件。

          這種模式一般適用于在創(chuàng)建數(shù)據(jù)庫和控制文件。

          2、mount 模式

          SQL> startup mount ORACLE instance started.  Total System Global Area  830930944 bytes Fixed Size                  2257800 bytes Variable Size             536874104 bytes Database Buffers          285212672 bytes Redo Buffers                6586368 bytes Database mounted.

          這種模式將啟動(dòng)實(shí)例,加載數(shù)據(jù)庫并保存數(shù)據(jù)庫的關(guān)閉模式

          一般用于數(shù)據(jù)庫維護(hù)時(shí),比如:執(zhí)行數(shù)據(jù)庫完全恢復(fù)操作,更改數(shù)據(jù)庫的歸檔模式等

          3、open 模式

          SQL> startup ORACLE instance started.  Total System Global Area  830930944 bytes Fixed Size                  2257800 bytes Variable Size             536874104 bytes Database Buffers          285212672 bytes Redo Buffers                6586368 bytes Database mounted. Database opened.

          這種模式就是將啟動(dòng)實(shí)例,加載并打開數(shù)據(jù)庫。 這是常規(guī)的打開數(shù)據(jù)庫的方式,只要用戶想要對(duì)數(shù)據(jù)庫進(jìn)行多種操作,必須采取這種方式打開,(用open模式打開數(shù)據(jù)庫)startup后面不需要加參數(shù)的。

          4、force 模式

          SQL> startup force ORACLE instance started.  Total System Global Area  830930944 bytes Fixed Size                  2257800 bytes Variable Size             536874104 bytes Database Buffers          285212672 bytes Redo Buffers                6586368 bytes Database mounted. Database opened.

          這種模式將終止實(shí)例并重新啟動(dòng)數(shù)據(jù)庫(open),這種模式具有一定的強(qiáng)制性(比如在其他啟動(dòng)模式失效的時(shí)候可以嘗試這種模式)

          二 、數(shù)據(jù)庫的關(guān)閉:

          關(guān)閉也分為三步,包括:關(guān)閉數(shù)據(jù)庫、卸載數(shù)據(jù)庫、關(guān)閉Oracle實(shí)例

          語法是shutdown

          1、normal

          SQL> shutdown normal Database closed. Database dismounted. ORACLE instance shut down.

          這種屬于正常關(guān)閉模式(前提沒有時(shí)間限制、通常會(huì)選擇這種方式來關(guān)閉數(shù)據(jù)庫)

          2、immediate

          SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down.

          這種方式成為立即關(guān)閉數(shù)據(jù)庫,盡可能在最短的時(shí)間里關(guān)閉數(shù)據(jù)庫。

          在這種關(guān)閉方式下,Oracle不但會(huì)立即中斷當(dāng)前用戶的連接,而且會(huì)強(qiáng)行終止用戶的當(dāng)前活動(dòng)事物,將未完成的事物回退,以立即關(guān)閉方式關(guān)閉數(shù)據(jù)庫。

          3、transactional

          SQL> shutdown transactional Database closed. Database dismounted. ORACLE instance shut down.

          這種方式稱作為事物關(guān)閉方式,它的首要任務(wù)是要能保證當(dāng)前所有的活動(dòng)事物都可以被提交并在最短的時(shí)間內(nèi)關(guān)閉數(shù)據(jù)庫。

          4、abort

          SQL> shutdown abort ORACLE instance shut down.   慎重!慎重!慎重!(重要的事情說三遍)

          這種方式被稱為終極關(guān)閉方式,終極關(guān)閉方式具有一定的強(qiáng)制性和破壞性,使用這種方式會(huì)強(qiáng)制中斷任何數(shù)據(jù)庫操作,這樣可能會(huì)丟失一部分?jǐn)?shù)據(jù)信息,影響到數(shù)據(jù)庫的完整性。

          (如果其他三種方法無法關(guān)閉時(shí)再使用此方法。 謹(jǐn)慎使用?。?/p>

          推薦教程:《Oracle教程》

          贊(0)
          分享到: 更多 (0)
          網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)