Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Posts
    22

    Unanswered: Delete Triggers/Procedures...

    What's the SQL statement that will allow me to delete all the triggers and procedures that I have created. (I don't remember the names of the procedures and triggers, but would like to clear everything). Thanks.

  2. #2
    Join Date
    Apr 2003
    Location
    Minneapolis, MN
    Posts
    273
    You have to drop it one by one.

    Get the list of all trigger and procedures created under your schema from user_source.
    Bhavin

    MS Computer Science
    OCP DBA 9i/8i

  3. #3
    Join Date
    Nov 2003
    Location
    Rotterdam, Netherlands
    Posts
    127
    You should write an sql statement that generates a scripts and then execute the generated script

    some thing like this
    **********************
    spool c:\script.sql

    select 'DROP TRIGGER' || TRIGGER_NAME ||';' FROM
    USER_TRIGGERS;

    SPOOL OFF
    @C:\SCRIPT.SQL
    **************************
    PUT THE ABOVE SCRIPT IN A FILE AND RUN IT.

  4. #4
    Join Date
    Apr 2003
    Location
    Minneapolis, MN
    Posts
    273
    Hi shelva,

    How will you get the nemaes of all procedures. User_triggers provides only trigger_name., not the procedure name

    So you have to user user_source
    Bhavin

    MS Computer Science
    OCP DBA 9i/8i

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •