Oracle數(shù)據(jù)庫的啟動(dòng)和關(guān)閉方式
Oracle數(shù)據(jù)庫的啟動(dòng)和關(guān)閉方式
一、幾種啟動(dòng)方式:
1、startup nomount非安裝啟動(dòng),這種方式啟動(dòng)下可執(zhí)行:重建控制文件、重建數(shù)據(jù)庫
啟動(dòng)instance,即啟動(dòng)SGA和后臺(tái)進(jìn)程,這種啟動(dòng)只需要init.ora文件。
2、startup mount dbname
安裝啟動(dòng),這種方式啟動(dòng)下可執(zhí)行:數(shù)據(jù)庫日志歸檔、數(shù)據(jù)庫恢復(fù)、重新命名一些數(shù)據(jù)庫文件
執(zhí)行“nomount”,然后打開控制文件。
3、startup open dbname先執(zhí)行“nomount”,然后執(zhí)行“mount”,再打開包括Redo log文件在內(nèi)的所有數(shù)據(jù)庫文件,
這種方式下可訪問數(shù)據(jù)庫中的數(shù)據(jù)。
4、startup,等于以下三個(gè)命令startup nomount
alter database mount
alter database open
5、startup restrict約束方式啟動(dòng)
這種方式能夠啟動(dòng)數(shù)據(jù)庫,但只允許具有一定特權(quán)的用戶訪問
非特權(quán)用戶訪問時(shí),會(huì)出現(xiàn)以下提示:
ERROR:
ORA-01035: ORACLE 只允許具有 RESTRICTED SESSION 權(quán)限的用戶使用
6、startup force強(qiáng)制啟動(dòng)方式
當(dāng)不能關(guān)閉數(shù)據(jù)庫時(shí),可以用startup force來完成數(shù)據(jù)庫的關(guān)閉
先關(guān)閉數(shù)據(jù)庫,再執(zhí)行正常啟動(dòng)數(shù)據(jù)庫命令
7、startup pfile=參數(shù)文件名
帶初始化參數(shù)文件的啟動(dòng)方式
先讀取參數(shù)文件,再按參數(shù)文件中的設(shè)置啟動(dòng)數(shù)據(jù)庫
例:startup pfile=E:Oracleadminoradbpfileinit.ora
8、startup EXCLUSIVE
二、幾種關(guān)閉方式:
1、shutdown normal
正常方式關(guān)閉數(shù)據(jù)庫。
2、shutdown immediate
立即方式關(guān)閉數(shù)據(jù)庫。
在SVRMGRL中執(zhí)行shutdown immediate,數(shù)據(jù)庫并不立即關(guān)閉,
而是在Oracle執(zhí)行某些清除工作后才關(guān)閉(終止會(huì)話、釋放會(huì)話資源),
當(dāng)使用shutdown不能關(guān)閉數(shù)據(jù)庫時(shí),shutdown immediate可以完成數(shù)據(jù)庫關(guān)閉的操作。
3、shutdown abort
直接關(guān)閉數(shù)據(jù)庫,正在訪問數(shù)據(jù)庫的會(huì)話會(huì)被突然終止,
如果數(shù)據(jù)庫中有大量操作正在執(zhí)行,這時(shí)執(zhí)行shutdown abort后,重新啟動(dòng)數(shù)據(jù)庫需要很長時(shí)間。
相關(guān)文章:
1. 導(dǎo)出錯(cuò)誤編碼的mysql數(shù)據(jù)庫2. DB2數(shù)據(jù)庫的隔離級解讀與試驗(yàn)3. 在Oracle數(shù)據(jù)庫中移動(dòng)數(shù)據(jù)文件的具體方法4. Mysql入門系列:對MYSQL查詢中有疑問的數(shù)據(jù)進(jìn)行編碼5. mysql啟動(dòng)時(shí)報(bào)錯(cuò) ERROR! Manager of pid-file quit without6. MySql導(dǎo)出后再導(dǎo)入數(shù)據(jù)時(shí)出錯(cuò)問題7. Centos7 下mysql重新啟動(dòng)MariaDB篇8. SQL Server數(shù)據(jù)庫超級管理員賬號防護(hù)知識(shí)9. Db2數(shù)據(jù)庫中常見的堵塞問題分析與處理方法10. Oracle數(shù)據(jù)庫中臨時(shí)表的進(jìn)一步深入研究
