授权 Scott 使用更高级数据库管理员的权限:
权限分为系统权限和对象权限。
-
授予连接权限:grant connect to scott;
-
授予创建表等基本权限:grant resource to scott;
-
授予dba:grant dba to scott;
-
授予使用空间权限:grant unlimited on tablespace to scott;alter user scott quota unlimited on tablespace_name;
-
知识延展:
权限管理,一般指根据系统设置的安全规则或者安全策略,用户可以访问而且只能访问自己被授权的资源,不多不少。
权限管理几乎出现在任何系统里面,只要有用户和密码的系统,很多人,常将“用户身份认证”、“密码加密”、“系统管理”等概念与权限管理概念混淆。
系统权限是针对oracle系统操作而言,例如登陆“create session”,创建表“create table”等,对象权限是针对对象操作的,例如查询“select”,更新“update”等。
取消 对scott的授权:
这是scott本来的权限,是两个角色
用有sysdba权限的账户登录
SELECT * FROM DBA_TAB_PRIVS WHERE grantee='SCOTT';--查看scott权限
SELECT * FROM DBA_ROLE_PRIVS WHERE GRANTEE='SCOTT';--查看scott角色
把多余的角色和权限删除
revoke 权限/角色 from scott; --删除权限
另scott账户本来是锁定的
alter user <username> account lock;--锁定账户
alter user <username> account unlock;--解锁账户