oracle數(shù)據(jù)庫(kù)怎么打開

oracle數(shù)據(jù)庫(kù)怎么打開

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

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

oracle 的啟動(dòng)分為三個(gè)步驟:分別是啟動(dòng)實(shí)例、加載數(shù)據(jù)庫(kù) 、打開數(shù)據(jù)庫(kù)。可以根據(jù)自己的實(shí)際需要來開啟數(shù)據(jù)庫(kù)

語(yǔ)法是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ù)庫(kù)也不會(huì)打開數(shù)據(jù)文件。

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

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ù)庫(kù)并保存數(shù)據(jù)庫(kù)的關(guān)閉模式

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

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ù)庫(kù)。 這是常規(guī)的打開數(shù)據(jù)庫(kù)的方式,只要用戶想要對(duì)數(shù)據(jù)庫(kù)進(jìn)行多種操作,必須采取這種方式打開,(用open模式打開數(shù)據(jù)庫(kù))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ù)庫(kù)(open),這種模式具有一定的強(qiáng)制性(比如在其他啟動(dòng)模式失效的時(shí)候可以嘗試這種模式)

推薦教程: 《Oracle教程

以上就是

? 版權(quán)聲明
THE END
喜歡就支持一下吧
點(diǎn)贊11 分享