Redeploying packages with EXECUTE IMMEDIATE

136 Views Asked by At

I wish to redeploy some packages. Here the simplified code:

vCode CLOB;
SELECT DBMS_METADATA.GET_DDL('PACKAGE_BODY', 'MY_PACKAGE', USER) INTO vCode FROM DUAL t;
  
EXECUTE IMMEDIATE CONVERT(vCode, 'WE8MSWIN1252', 'US8PC437');

Would it be possible to check if the code would be compiled without errors? And if so, run the EXECUTE IMMEDIATE command? Many thanks!

0

There are 0 best solutions below