11g文件學習3----啟動關閉暫停
Oracle? Database Administrator's Guide
11g Release 2 (11.2)
E25494-05
3 Starting Up and Shutting Down
一、Starting Up a Database
資料庫啟動時讀取平臺預設位置上引數的順序;
spfileORACLE_SID.ora
spfile.ora
initORACLE_SID.ora
資料庫啟動讀取指定位置的引數檔案:
SQLPLUS方式:
STARTUP PFILE = /u01/oracle/dbs/init.ora
SRVCTL方式:
(1):srvctl modify database -d db_unique_name -p spfile_path
(2):srvctl start database -d db_unique_name [options]
資料庫啟動可選擇的狀態
NOMOUNT—Start the instance without mounting a database. This does not allow access to the database and usually would be done only for database creation or the re-creation of control files.
MOUNT—Start the instance and mount the database, but leave it closed. This state allows for certain DBA activities, but does not allow general access to the database.
OPEN—Start the instance, and mount and open the database. This can be done in unrestricted mode, allowing access to all users, or in restricted mode, allowing access for database administrators only.
FORCE—Force the instance to start after a startup or shutdown problem.類似shutdown abort然後startup;
OPEN RECOVER—Start the instance and have complete media recovery begin immediately.
各種啟動狀態命令
open
SQL*PLUS:STARTUP
SRVCTL:srvctl start database -d db_unique_name
NOMOUNT
SQLPLUS:STARTUP NOMOUNT
SRVCTL:srvctl start database -d db_unique_name -o nomount
MOUNT
SQLPLUS:STARTUP MOUNT
SRVCTL:srvctl start database -d db_unique_name -o mount
RESTRICT
SQLPLUS:STARTUP RESTRICT
SRVCTL:srvctl start database -d db_unique_name -o restrict
在mount, nomount, and open 模式下都可切換RESTRICT模式;
切換到正常模式:ALTER SYSTEM DISABLE RESTRICTED SESSION;
切換到RESTRICT模式:ALTER SYSTEM ENABLE RESTRICTED SESSION
FORCE
SQLPLUS:STARTUP FORCE
SRVCTL:srvctl start database -d db_unique_name -o force
RECOVER
SQLPLUS:STARTUP OPEN RECOVER
SRVCTL:srvctl start database -d db_unique_name -o "open,recover"
二、Altering Database Availability
STARTUP NOMOUNT;
ALTER DATABASE MOUNT;
ALTER DATABASE OPEN;
ALTER DATABASE OPEN READ ONLY;
ALTER DATABASE OPEN READ WRITE;
三、Shutting Down a Database
關閉資料庫各種方式
Normal Mode
SQL*Plus:SHUTDOWN [NORMAL] ---預設
SRVCTL:srvctl stop database -d db_unique_name -o normal ---預設是immediate
Immediate Mode
SQL*Plus:SHUTDOWN IMMEDIATE
SRVCTL:srvctl stop database -d db_unique_name -o immediate
Transactional Mode
SQL*Plus:SHUTDOWN TRANSACTIONAL
SRVCTL:srvctl stop database -d db_unique_name -o transactional
Abort Mode
SQL*Plus:SHUTDOWN ABORT
SRVCTL:srvctl stop database -d db_unique_name -o abort
四、Quiescing a Database
停頓一個資料庫是一個較小的限制,因為它消除了中斷使用者和相關的停機關閉和重新啟動資料庫。
此模式只允許DBA進行查詢、呼叫、獲取,只允許sys或system操作進入該模式,其他使用者即使有dba許可權也不行;
進入停頓狀態命令:
ALTER SYSTEM QUIESCE RESTRICTED;
執行該命令後,所有非DBA使用者的程式執行完後從active變成inactive,直到非DBA使用者的程式全inactive了,資料庫才進入quiesced 狀態;
查詢阻塞停頓的會話語句:
select bl.sid, user, osuser, type, program from v$blocking_quiesce bl, v$session se where bl.sid = se.sid;
恢復正常狀態命令:
ALTER SYSTEM UNQUIESCE;
查詢當前資料庫狀態:
select active_state from v$instance;
狀態說明:
NORMAL: Normal unquiesced state.
QUIESCING: Being quiesced, but some non-DBA sessions are still active.
QUIESCED: Quiesced; no non-DBA sessions are active or allowed.
五、Suspending and Resuming a Database
suspend狀態將將前面的I/0操作完成,新的I/0操作進入排隊狀態,停止所有的I/0操作,包括資料庫檔案和控制檔案,所有的操
suspend命令針對叢集內所有例項,但命令執行後剛啟動的例項不受影響;
suspend命令適合於映象磁碟或斷開映象磁碟時;不能使用者備份表空間,但可在執行suspend命令前先執行ALTER TABLESPACE BEGIN BACKUP;
相關命令:
ALTER SYSTEM SUSPEND;
ALTER SYSTEM RESUME;
select active_state,database_status from v$instance;
11g Release 2 (11.2)
E25494-05
3 Starting Up and Shutting Down
一、Starting Up a Database
資料庫啟動時讀取平臺預設位置上引數的順序;
spfileORACLE_SID.ora
spfile.ora
initORACLE_SID.ora
資料庫啟動讀取指定位置的引數檔案:
SQLPLUS方式:
STARTUP PFILE = /u01/oracle/dbs/init.ora
SRVCTL方式:
(1):srvctl modify database -d db_unique_name -p spfile_path
(2):srvctl start database -d db_unique_name [options]
資料庫啟動可選擇的狀態
NOMOUNT—Start the instance without mounting a database. This does not allow access to the database and usually would be done only for database creation or the re-creation of control files.
MOUNT—Start the instance and mount the database, but leave it closed. This state allows for certain DBA activities, but does not allow general access to the database.
OPEN—Start the instance, and mount and open the database. This can be done in unrestricted mode, allowing access to all users, or in restricted mode, allowing access for database administrators only.
FORCE—Force the instance to start after a startup or shutdown problem.類似shutdown abort然後startup;
OPEN RECOVER—Start the instance and have complete media recovery begin immediately.
各種啟動狀態命令
open
SQL*PLUS:STARTUP
SRVCTL:srvctl start database -d db_unique_name
NOMOUNT
SQLPLUS:STARTUP NOMOUNT
SRVCTL:srvctl start database -d db_unique_name -o nomount
MOUNT
SQLPLUS:STARTUP MOUNT
SRVCTL:srvctl start database -d db_unique_name -o mount
RESTRICT
SQLPLUS:STARTUP RESTRICT
SRVCTL:srvctl start database -d db_unique_name -o restrict
在mount, nomount, and open 模式下都可切換RESTRICT模式;
切換到正常模式:ALTER SYSTEM DISABLE RESTRICTED SESSION;
切換到RESTRICT模式:ALTER SYSTEM ENABLE RESTRICTED SESSION
FORCE
SQLPLUS:STARTUP FORCE
SRVCTL:srvctl start database -d db_unique_name -o force
RECOVER
SQLPLUS:STARTUP OPEN RECOVER
SRVCTL:srvctl start database -d db_unique_name -o "open,recover"
二、Altering Database Availability
STARTUP NOMOUNT;
ALTER DATABASE MOUNT;
ALTER DATABASE OPEN;
ALTER DATABASE OPEN READ ONLY;
ALTER DATABASE OPEN READ WRITE;
三、Shutting Down a Database
關閉資料庫各種方式
Normal Mode
SQL*Plus:SHUTDOWN [NORMAL] ---預設
SRVCTL:srvctl stop database -d db_unique_name -o normal ---預設是immediate
Immediate Mode
SQL*Plus:SHUTDOWN IMMEDIATE
SRVCTL:srvctl stop database -d db_unique_name -o immediate
Transactional Mode
SQL*Plus:SHUTDOWN TRANSACTIONAL
SRVCTL:srvctl stop database -d db_unique_name -o transactional
Abort Mode
SQL*Plus:SHUTDOWN ABORT
SRVCTL:srvctl stop database -d db_unique_name -o abort
四、Quiescing a Database
停頓一個資料庫是一個較小的限制,因為它消除了中斷使用者和相關的停機關閉和重新啟動資料庫。
此模式只允許DBA進行查詢、呼叫、獲取,只允許sys或system操作進入該模式,其他使用者即使有dba許可權也不行;
進入停頓狀態命令:
ALTER SYSTEM QUIESCE RESTRICTED;
執行該命令後,所有非DBA使用者的程式執行完後從active變成inactive,直到非DBA使用者的程式全inactive了,資料庫才進入quiesced 狀態;
查詢阻塞停頓的會話語句:
select bl.sid, user, osuser, type, program from v$blocking_quiesce bl, v$session se where bl.sid = se.sid;
恢復正常狀態命令:
ALTER SYSTEM UNQUIESCE;
查詢當前資料庫狀態:
select active_state from v$instance;
狀態說明:
NORMAL: Normal unquiesced state.
QUIESCING: Being quiesced, but some non-DBA sessions are still active.
QUIESCED: Quiesced; no non-DBA sessions are active or allowed.
五、Suspending and Resuming a Database
suspend狀態將將前面的I/0操作完成,新的I/0操作進入排隊狀態,停止所有的I/0操作,包括資料庫檔案和控制檔案,所有的操
suspend命令針對叢集內所有例項,但命令執行後剛啟動的例項不受影響;
suspend命令適合於映象磁碟或斷開映象磁碟時;不能使用者備份表空間,但可在執行suspend命令前先執行ALTER TABLESPACE BEGIN BACKUP;
相關命令:
ALTER SYSTEM SUSPEND;
ALTER SYSTEM RESUME;
select active_state,database_status from v$instance;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29519108/viewspace-1427744/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 4.2.1.11 學習如何啟動和關閉CDB
- Oracle:RAC關閉、啟動、重啟步驟:10g、11gOracle
- Oracle 11g關閉開啟AWROracle
- 11g 啟用或關閉自動統計任務
- Oracle學習系列—Windows下資料庫程式的啟動和關閉OracleWindows資料庫
- oracle啟動與關閉Oracle
- ORACLE DataGuard 關閉啟動Oracle
- 啟動/關閉 dynamic viewView
- 11g啟用或關閉自動統計等任務
- mpvue小程式迴圈動畫開啟暫停Vue動畫
- nginx啟動,重啟,關閉命令Nginx
- 為什麼當系統啟動到Sendmail時會暫停(轉)AI
- 11g文件學習----sql連線SQL
- Oracle 11g linstener啟動後隔幾秒鐘自動關閉Oracle
- win10系統快速啟動怎麼關閉 關閉Windows快速啟動Win10Windows
- Oracle 11g RAC的啟動、關閉及修改歸檔總結Oracle
- centos下nginx啟動、重啟、關閉CentOSNginx
- mysql的啟動和關閉MySql
- ORACLE啟動模式及關閉Oracle模式
- Oracle RAC 啟動與關閉Oracle
- win10快速啟動怎麼關閉_win10如何關閉快速啟動Win10
- 資料庫自動啟動關閉資料庫
- windows 如何暫停更新Windows
- oracle 11g RAC 啟動和關閉和一些維護命令Oracle
- 11g文件學習----sysdba sysoper OSDBA OSOPER
- windows10怎麼關閉快速啟動_windows10關閉快速啟動的方法Windows
- nginx的啟動、關閉和平滑重啟(=)Nginx
- Oracle 11g Dataguard 暫停物理備庫的日誌傳輸Oracle
- Hadoop 2.7.4 關閉與啟動Hadoop
- linux svn啟動和關閉Linux
- MySQL Windows下關閉和啟動MySqlWindows
- SAP筆記-啟動關閉SAP筆記
- 資料庫啟動和關閉資料庫
- Oracle監聽啟動後自動關閉Oracle
- oracle自動啟動和關閉的方法Oracle
- win10 自動重啟關閉方法_win10自動重啟怎麼關閉Win10
- 如何關閉win10快速啟動_win10系統快速啟動怎麼關閉Win10
- mysql啟動與關閉(手動與自動)MySql