Bom dia pessoal! Hoje me deparei com um cliente com a seguinte situação:
Ao realizar o impdp várias TRIGGERS e PROCEDURES ficaram invalidadas.
Resolvendo erro ORA-3902
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
ORA-39082: Object type PROCEDURE:"NAME"."STP_GRAVATABLOG" created with compilation warnings ORA-39082: Object type PROCEDURE:"NAME"."STP_GRAVA_TSIPARLOG" created with compilation warnings ORA-39082: Object type PROCEDURE:"NAME"."DESABILITA_TRG_TAB" created with compilation warnings ORA-39082: Object type PROCEDURE:"NAME"."HABILITA_TRG_TAB" created with compilation warnings ORA-39082: Object type PROCEDURE:"NAME"."STP_GRAVATABLOG" created with compilation warnings ORA-39082: Object type PROCEDURE:"NAME"."STP_GRAVA_TSIPARLOG" created with compilation warnings ORA-39082: Object type PROCEDURE:"NAME"."DESABILITA_TRG_TAB" created with compilation warnings ORA-39082: Object type PROCEDURE:"NAME"."HABILITA_TRG_TAB" created with compilation warnings ORA-39082: Object type TRIGGER:"NAME"."TRG_DLT_TGFFIN_EXCLUSAO" created with compilation warnings ORA-39082: Object type TRIGGER:"NAME"."TRG_UPD_DLT_TGMTME_EXCLUSAO" created with compilation warnings ORA-39082: Object type TRIGGER:"NAME"."TRG_DLT_TGFMBC_EXCLUSAO" created with compilation warnings ORA-39082: Object type TRIGGER:"NAME"."TRG_DLT_TGFLIV_EXC" created with compilation warnings ORA-39082: Object type TRIGGER:"NAME"."TRG_INS_TGWLOG" created with compilation warnings ORA-39082: Object type TRIGGER:"NAME"."TRG_INS_TSILOG" created with compilation warnings ORA-39082: Object type TRIGGER:"NAME"."TRG_DLT_TGFITE" created with compilation warnings ORA-39082: Object type TRIGGER:"NAME"."TRG_DLT_TGFTEF_EXCLUSAO" created with compilation warnings ORA-39082: Object type TRIGGER:"NAME"."TRG_INC_UPD_DLT_TFPVPS_LOG" created with compilation warnings ORA-39082: Object type TRIGGER:"NAME"."TRG_DLT_TGFCAB" created with compilation warnings ORA-39082: Object type TRIGGER:"NAME"."TRG_TSIPAR_LOG" created with compilation warnings ORA-39082: Object type TRIGGER:"NAME"."TRG_UPD_DLT_TGMMSG_EXCLUSAO" created with compilation warnings ORA-39082: Object type TRIGGER:"NAME"."TRG_DLT_TGFNUM" created with compilation warnings |
Concedendo permissões para o usuário NAME
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
GRANT SELECT ON V_$SESSION TO NAME / GRANT SELECT ON DBA_TABLES TO NAME / GRANT CREATE SESSION TO NAME / GRANT SELECT ON DBA_TAB_COLUMNS TO NAME / GRANT SELECT ON DBA_CONSTRAINTS TO NAME / GRANT SELECT ON DBA_TRIGGERS TO NAME / GRANT SELECT ON DBA_INDEXES TO NAME / GRANT SELECT ON DBA_VIEWS TO NAME / GRANT SELECT ON DBA_IND_COLUMNS TO NAME / GRANT SELECT ON DBA_OBJECTS TO NAME / GRANT EXP_FULL_DATABASE TO NAME / GRANT IMP_FULL_DATABASE TO NAME |
Rebuild objetos inválidos
1 |
EXEC DBMS_UTILITY.compile_schema(schema => 'NAME') |