通过使用
select distinct grantor, table_schema from all_tab_privs where granter = '';
Run Code Online (Sandbox Code Playgroud)
我发现当前用户可能会授予其他用户访问权限,这是错误的.那么我可以简单地删除那些角色from all_tab_privs吗?
当我跑的时候
delete from all_tab_privs where grantor = 'username';
Run Code Online (Sandbox Code Playgroud)
我明白了
SQL Error: ORA-01031: insufficient privileges
01031. 00000 - "insufficient privileges"
*Cause: An attempt was made to change the current username or password
without the appropriate privilege.
Run Code Online (Sandbox Code Playgroud)
那么我需要为当前用户添加一些角色来完成删除吗?
您不能(也不应该)从任何数据字典表中删除数据.
如果要撤消权限,则需要使用该REVOKE命令.就像是
REVOKE SELECT ON scott.emp FROM bob
Run Code Online (Sandbox Code Playgroud)
如果要撤消用户bob从架构中的emp表中选择数据的能力scott.
| 归档时间: |
|
| 查看次数: |
226 次 |
| 最近记录: |