Oracle資料庫的啟動和關閉方式電腦知識

來源:果殼範文吧 1.1W

一、幾種啟動方式:

Oracle資料庫的啟動和關閉方式電腦知識

1、startup nomount非安裝啟動,這種方式啟動下可執行:重建控制檔案、重建資料庫

啟動instance,即啟動SGA和後臺程序,這種啟動只需要檔案。

2、startup mount dbname

安裝啟動,這種方式啟動下可執行:資料庫日誌歸檔、資料庫恢復、重新命名一些資料庫檔案

執行“nomount”,然後開啟控制檔案。

3、startup open dbname先執行“nomount”,然後執行“mount”,再開啟包括Redo log檔案在內的所有資料庫檔案,

這種方式下可訪問資料庫中的資料。

4、startup,等於以下三個命令startup nomount

alter database mount

alter database open

5、startup restrict約束方式啟動

這種方式能夠啟動資料庫,但只允許具有一定特權的使用者訪問

非特權使用者訪問時,會出現以下提示:

ERROR:

ORA-01035: ORACLE 只允許具有 RESTRICTED SESSION 許可權的使用者使用

6、startup force強制啟動方式

當不能關閉資料庫時,可以用startup force來完成資料庫的關閉

先關閉資料庫,再執行正常啟動資料庫命令

7、startup pfile=引數檔名

帶初始化引數檔案的啟動方式

先讀取引數檔案,再按引數檔案中的'設定啟動資料庫

例:startup pfile=E:

8、startup EXCLUSIVE

二、幾種關閉方式:

1、shutdown normal

正常方式關閉資料庫。

2、shutdown immediate

立即方式關閉資料庫。

在SVRMGRL中執行shutdown immediate,資料庫並不立即關閉,

而是在Oracle執行某些清除工作後才關閉(終止會話、釋放會話資源),

當使用shutdown不能關閉資料庫時,shutdown immediate可以完成資料庫關閉的操作。

3、shutdown abort

直接關閉資料庫,正在訪問資料庫的會話會被突然終止,

如果資料庫中有大量操作正在執行,這時執行shutdown abort後,重新啟動資料庫需要很長時間。

熱門標籤