Using DBMS_DDL Package To Compile

Today I like post a different way to compile. We can use the DBMS_DDL package to compile objects, in this case I show the example of a trigger that is invalid status, using the DBMS_DDL package We compile it get a valid status.

 

INFO*ANTO> r
  1* select OWNER, status from dba_objects where object_name ='TG_BU_INCENT_AGENTS'

OWNER     STATUS
_________ _______________  

INFO      INVALID

1 row selected.

INFO*ANTO> EXEC DBMS_DDL.alter_compile('TRIGGER','INFO','TG_BU_INCENT_AGENTS');

Procedimiento PL/SQL terminado correctamente.

INFO*ANTO> select OWNER, status from dba_objects where object_name ='TG_BU_INCENT_AGENTS';

OWNER     STATUS
_________ _______________  

INFO      VALID

1 row selected.

HTH – Antonio NAVARRO

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s