Pular para o conteúdo

Fóruns Banco de dados Oracle permissões permissões

#97171
Ishii
Participante

    Olá,

    Tente esse script, substituindo o campo por uma role:


    set lines 1000
    set pagesize 0

    spool xgrants.sql

    select 'GRANT '||
    decode(a.object_type,
    'VIEW','SELECT',
    'ALL')||
    ' ON '||a.object_name||
    decode(a.object_type,
    'TABLE',' TO with grant option;',
    'VIEW',' with grant option',
    ' TO ;') statement
    from all_objects a
    where user in () AND
    a.owner in () AND
    a.object_type in ('TABLE',
    'VIEW',
    'PROCEDURE',
    'FUNCTION',
    'PACKAGE',
    'PACKAGE BODY',
    'SEQUENCE');

    spool off;

    @xgrants.sql

    spool xgrants.sql;

    []s Ishii