View user use permissions on an object

xiaoxiao2021-03-06  37

View the user's use rights on an object You can use the data dictionary table DBA_TAB_PRIVS. The table structure is as follows: Name Null? Type ------------------------- --- -------- ---------------------------- Grantee Not Null Varchar2 (30) <== Permissions Owner NOT NULL VARCHAR2 (30) Table_name Not Null Varchar2 (30) GRANTOR NOT NULL VARCHAR2 (30) <- Permissions Award PRIVILEGE NOTABLE VARCHAR2 (40) Grantable Varchar2 (3) <- Permissions Whether Grant others

Permissions Return by command Grant Retro: Grant SELECT, INSERT, UPDATE, DELETE, REFERENCES ON MY_TABLE TO USER_JOE; Revoke Insert, DELETE ON MY_TABLIC User_joe; Grant Create Public Synynym To user_joe;

Other security-related rights data dictionary table has: ALL_TAB_PRIVS ALL_TAB_PRIVS_MADE ALL_TAB_PRIVS_RECD DBA_SYS_PRIVS DBA_ROLES DBA_ROLE_PRIVS ROLE_ROLE_PRIVS ROLE_SYS_PRIVS ROLE_TAB_PRIVS SESSION_PRIVS SESSION_ROLES USER_SYS_PRIVS USER_TAB_PRIV

After completing the EXP / IMP, the permissions need to be re-awarded to the following scripts:

SET Echo Off Rem 19980729 M D Powell New Script. Rem Set Verify Off SET PageSize 0 Set Feedback Off Spool GRT_ && owner ._ && Table_name..sql

SELECT 'Rem Grants on && owner .. && Table_name' from sys.dual;

SELECT 'GRANT' || "|| | || || | || @Name) || | '|| grante || Decode (Grantable,' Yes ​​',' with Grant Option ', NULL) ||'; 'from sys.dba_tab_privs where owner = Upper (' && owner ') And Table_Name = Upper (' && Table_name ') Order by Grantee, Privilege;

Spool off undefine ooner undefine table_name

转载请注明原文地址:https://www.9cbs.com/read-58291.html

New Post(0)