關於ORACLE RESTRICT模式,以及START OPEN RECOVER

gaopengtttt發表於2014-09-15


關於ORACLE RESTRICT模式,以及START OPEN RECOVER 


說明如下:
Restricting Access to an Instance at Startup
You can start an instance, and optionally mount and open a database, in restricted 
mode so that the instance is available onlyto administrative personnel (not general 
database users). Use this mode of instance startup when you must accomplish one of 
the following tasks:
■ Perform an export or import of data
■ Perform a data load (with SQL*Loader)
■ Temporarily prevent typical users from using data
■ Perform certain migration or upgrade operations
Typically, all users with the CREATE SESSIONsystem privilege can connect to an open 
database. Opening a database in restricted mode allows database access only to users 
with both the CREATE SESSIONand RESTRICTED SESSIONsystem privilege. Only 
database administrators should have the RESTRICTED SESSIONsystem privilege. 


關於如上文件,說明受限模式可以再你想做一些維護的時候,而不想其他非restrict許可權使用者登入的時候使用。
可以和STARTUP進行搭配啟動例項
startup [nomount|mount|open} restrict;
而ORACLE RESTART也可以使用
srvctl start database -d db_unique_name-o restrict


同時在正常資料庫使用期間也可以使用
SQL> ALTER SYSTEM DISABLE RESTRICTED SESSION;
 
System altered
 
SQL> ALTER SYSTEM enable RESTRICTED SESSION;
 
System altered


來啟用和禁用。但是注意經過測試,這個操作知識影響隨後的會話。已經連線的會話不受影響




關於open recover 說明如下:
If you know that media recovery is required, you can start an instance, mount a 
database to the instance, and have the recovery process automatically start by using 
one of these commands:
也就是說如果你確定需要進行介質恢復的時候可以使用,而代替RECOVER DATABASE。但是用處不大
恢復是一件嚴肅的事情,一般不會交由自動處理。


使用如下命令啟動:
STARTUP OPEN RECOVER 
而ORACLE RESTART也可以使用
srvctl start database -d db_unique_name-o "open,recover"


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7728585/viewspace-1270116/,如需轉載,請註明出處,否則將追究法律責任。

相關文章