среда, 25 октября 2017 г.

Flashback archive grants

You cant find grants for flashback archive tables in DBA_TAB_PRIVS. To determine which users have grants to flashback archives given with

GRANT FLASHBACK ARCHIVE ON SOME_FDA TO SOME_USER;

you have to use query

SELECT u.username, a.*
FROM sys.SYS_FBA_USERS au, dba_users u, dba_flashback_archive a
WHERE u.user_id = au.user#
  AND au.fa# = a.flashback_archive#;

NB: using dba_users is enough, because you can’t grant Flashback archive to role

GRANT FLASHBACK ARCHIVE ON FDA TO FDA_ROLE;
ORA-55625: Cannot grant Flashback Archive privilege to a role

понедельник, 2 октября 2017 г.

dbms_metadata necessary privs

  1. Object owner
  2. SELECT_CATALOG_ROLE
  3. SYS
    Otherwise you’ll receive
ORA-31603: object "XXX" of type VIEW not found in schema "AAA"
ORA-06512: at "SYS.DBMS_METADATA", line 5805
ORA-06512: at "SYS.DBMS_METADATA", line 8344
ORA-06512: at line 1