oracle之受限模式修改

修改 登录的限制模式
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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/20976446/viewspace-717024/

你可能感兴趣的:(oracle之受限模式修改)