oracle之受限模式修改

liqilin0429發表於2012-02-23
修改 登入的限制模式
restricted是資料庫受限模式,在這個模式下只有RESTRICTED SESSION 許可權的人才可以登陸,一般用與資料庫維護的時候使用。
首先檢查scott使用者,確認其沒有restricted session許可權
select grantee,granted_role from dba_role_privs where grantee='SCOTT'union
select grantee,privilege from dba_sys_privs where grantee='SCOTT';
 
GRANTEE GRANTED_ROLE
------------------------------ ----------------------------------------
SCOTT CONNECT
SCOTT RESOURCE
SCOTT UNLIMITED TABLESPACE
conn scott/tiger
ERROR:
ORA-01035: ORACLE only available to users with RESTRICTED SESSION privilege
Warning: You are no longer connected to ORACLE.
登入資料庫失敗,因為其沒有restricted session許可權

為使用者scott授予restricted session許可權,再次登入資料庫,可以登入
grant restricted session to scott;
SP2-0640: Not connected
conn / as sysdba
Connected.
grant restricted session to scott;
Grant succeeded.
 
conn scott/tiger
Connected.

將資料庫修改為正常模式(即退出限制模式)
conn / as sysdba
Connected.
alter system disable restricted session;
System altered.

由正常模式切換到限制模式的方法
alter system enable restricted session;

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

相關文章