DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Help on delete trigger

  1. #1
    Join Date
    Jan 2001
    Posts
    216
    Hi

    I have the following delete trigger

    CREATE OR REPLACE TRIGGER db_admin_delete
    BEFORE DELETE ON ADMININFO
    FOR EACH ROW
    DECLARE
    pragma AUTONOMOUS_TRANSACTION;
    BEGIN
    execute immediate 'drop user ' || ld.username || ' cascade';
    END;
    /

    I have similar triggers for add and update, they work fine. But the above delete trigger gives the following exception:

    ERROR at line 1:
    ORA-01403: no data found

    Can anyone please help me out here

    Thanks
    Neelima

  2. #2
    Join Date
    Nov 2000
    Posts
    344
    I think you need to grant the DROP USER privilege to the trigger owner, even if the user has a powerful role like DBA.

    I ran into something like this with a stored proc and execute immediate.

    -John

  3. #3
    Join Date
    Jan 2001
    Posts
    216
    I have granted the trigger owner drop user privilege.


Posting Permissions

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


Click Here to Expand Forum to Full Width