Compiling scripts containing additional SQL commands

lvanek

Member
The standard for writing scripts in our company is to put some boilerplate around the actual object declaration. For example, the following comes after the declaration of a package spec:

show errors;

PROMPT =========================================================================
PROMPT Creating SYNONYM Dbk_Img_Object_Xref
PROMPT =========================================================================
DROP PUBLIC SYNONYM Dbk_Img_Object_Xref;
CREATE PUBLIC SYNONYM Dbk_Img_Object_Xref FOR da.Dbk_Img_Object_Xref;
GRANT EXECUTE ON Dbk_Img_Object_Xref TO cmic_role_all;

PROMPT =========================================================================
PROMPT Completed Dbk_Img_Object_Xref.ps
PROMPT =========================================================================

And the following comes after the package body:

show errors;

PROMPT =========================================================================
PROMPT Created PACKAGE BODY Dbk_Img_Object_Xref
PROMPT =========================================================================

Through your forum I learned to check the
 
Your company's standard of wholesale public synonyming and grants is a little scary - but here's a cool tip, use:

CREATE OR REPLACE PUBLIC SYNONYM syn FOR obj;

It let's bypass at least on error the first time you are executing your boilerplate.
 
Back
Top