Início > Oracle > ORA-04023: Object DBSNMP.BSLN_INTERNAL could not be validated or authorized

ORA-04023: Object DBSNMP.BSLN_INTERNAL could not be validated or authorized

– Bom hoje também estava falhando o job abaixo em 1 ambiente de desenvolvimento, segue:

Sun Apr 15 00:00:09 2012
Errors in file /oracle/app/oracle/admin/des516/diag/rdbms/des516/des516/trace/des516_j001_3555364.trc:
ORA-12012: error on auto execute of job 12696
ORA-04023: Object DBSNMP.BSLN_INTERNAL could not be validated or authorized
ORA-06508: PL/SQL: could not find program unit being called: “DBSNMP.BSLN_INTERNAL”
ORA-06512: at line 1

Mais alguns detalhes encontra no trace gerado

/oracle/app/oracle/admin/des516/diag/rdbms/des516/des516/trace/des516_j001_3555364.trc

– Bom Verificado que a package body DBSNMP.BSLN_INTERNAL estava invalida, segue:

SQL> select * from dba_objects where OBJECT_NAME=’BSLN_INTERNAL’;

OWNER
——————————
OBJECT_NAME
——————————————————————————–
SUBOBJECT_NAME                  OBJECT_ID DATA_OBJECT_ID
—————————— ———- ————–
OBJECT_TYPE                                               CREATED
——————————————————— —————
LAST_DDL_TIME   TIMESTAMP
————— ———————————————————
STATUS                TEM GEN SEC  NAMESPACE EDITION_NAME
——————— — — — ———- ——————————
DBSNMP
BSLN_INTERNAL
12928
PACKAGE                                                   18-AUG-10
15-APR-12       2012-04-15:01:02:11
VALID                 N   N   N            1

DBSNMP
BSLN_INTERNAL
12929
PACKAGE BODY                                              18-AUG-10
15-APR-12       2012-04-15:01:02:11
INVALID               N   N   N            2

– Executado o UTLRP.sql porém ainda continuo invalido a Package, então vamos tenta-la compilar manualmente, segue:

SQL> alter package DBSNMP.BSLN_INTERNAL compile;

Warning: Package altered with compilation errors.

Verificado que estava gerando esses erros abaixo:

SQL> select * from dba_errors where OWNER=’DBSNMP’;

OWNER                          NAME
—————————— ——————————
TYPE                                   SEQUENCE       LINE   POSITION
———————————— ———- ———- ———-
TEXT
——————————————————————————–
ATTRIBUTE                   MESSAGE_NUMBER
————————— ————–
DBSNMP                         BSLN_INTERNAL
PACKAGE BODY                                  1       1942         20
PLS-00201: identifier ‘SYS.DBMS_MANAGEMENT_PACKS’ must be declared
ERROR                                  201

DBSNMP                         BSLN_INTERNAL
PACKAGE BODY                                  2       1941          5
PL/SQL: Statement ignored
ERROR                                    0

DBSNMP                         BSLN_INTERNAL
PACKAGE BODY                                  3       1994         20
PLS-00201: identifier ‘SYS.DBMS_MANAGEMENT_PACKS’ must be declared
ERROR                                  201

DBSNMP                         BSLN_INTERNAL
PACKAGE BODY                                  4       1993          5
PL/SQL: Statement ignored
ERROR                                    0

– Verificado que o objeto DBMS_MANAGEMENT_PACKS estava valido, segue:

SQL> select * from dba_objects where object_name=’DBMS_MANAGEMENT_PACKS’;

OWNER
——————————
OBJECT_NAME
——————————————————————————–
SUBOBJECT_NAME                  OBJECT_ID DATA_OBJECT_ID
—————————— ———- ————–
OBJECT_TYPE                                               CREATED
——————————————————— —————
LAST_DDL_TIME   TIMESTAMP
————— ———————————————————
STATUS                TEM GEN SEC  NAMESPACE EDITION_NAME
——————— — — — ———- ——————————
SYS
DBMS_MANAGEMENT_PACKS
8148
PACKAGE                                                   18-AUG-10
24-MAR-12       2010-08-18:09:08:00
VALID                 N   N   N            1

SYS
DBMS_MANAGEMENT_PACKS
11751
PACKAGE BODY                                              18-AUG-10
18-AUG-10       2010-08-18:09:13:16
VALID                 N   N   N            2

– Bom neste caso dei um grant para o objeto para o user DBSNMP, segue:

SQL> grant all on SYS.DBMS_MANAGEMENT_PACKS to DBSNMP;

Grant succeeded.

SQL> alter package DBSNMP.BSLN_INTERNAL compile;

Package altered.

Assim voltando ao executar o job normalmente
Abraço!

Categorias:Oracle
  1. Nenhum comentário ainda.
  1. No trackbacks yet.

Deixe uma resposta

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s

%d blogueiros gostam disto: