从all_tab_privs中删除数据安全吗?



select distinct grantor, table_schema from all_tab_privs where granter = '';

我发现当前用户可能授予另一个用户访问权限,这是错误的。那么我可以直接删除这些角色from all_tab_privs吗?

同样当我运行

delete from all_tab_privs where grantor = 'username';

我得到

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.

所以我需要添加一些角色到当前用户来完成删除吗?

您不能(也不应该)从任何数据字典表中删除数据。

如果要撤销特权,需要使用REVOKE命令。就像

REVOKE SELECT ON scott.emp FROM bob

如果您想撤销用户bob在scott模式下从emp表中选择数据的能力

最新更新