1 2 Previous Next 16 Replies Latest reply: Oct 7, 2013 7:25 AM by Umesh P Go to original post RSS
      • 15. Re: How to get SP body inside Database Trigger
        padders

        Your code appears to be confusing 'PACKAGE_BODY' (dbms_metadata) and 'PACKAGE BODY' (all_source). This may be affecting your logic.

         

        Don't create objects in sys schema, it is not supported.

         

        Don't write queries against sys.obj$, it is not supported.

         

        Don't expect other people to test objects created as SYS.

        • 16. Re: How to get SP body inside Database Trigger
          Umesh P

          [Query]: I have a Database Trigger (AFTER CREATE) and I wish to retrieve newly created Stored Procedure's body.

           

          One possible way is :

          you can check user_objects table for latest procedure object created using "Create date" and "Time Stamp".

          Using Object name from "user_objects" table you can check "user_source" table to get the body of stored procedure created.

          1 2 Previous Next