CREATE USER from within a trigger: get ORA-03001: unimplemented feature
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: CREATE USER from within a trigger: get ORA-03001: unimplemented feature

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Location
    Oxford, UK
    Posts
    2

    CREATE USER from within a trigger: get ORA-03001: unimplemented feature

    hello

    I am trying to do a CREATE USER from a trigger, and get an ORA-03001 error.

    I am using a very recently installed Oracle 10g on Linux (SUSE 9)

    Alex

    The error code
    Code:
    INSERT INTO password( User_Id, Password) VALUES ( 'u0001','desk' )
                *
    ERROR at line 1:
    ORA-03001: unimplemented feature
    ORA-06512: at "HOSP.CREATE_USER", line 5
    ORA-06512: at "HOSP.PASSWORD_AFTER_INSERT", line 2
    ORA-04088: error during execution of trigger 'HOSP.PASSWORD_AFTER_INSERT'
    The trigger is:
    Code:
    CREATE OR REPLACE TRIGGER password_after_insert
    AFTER INSERT ON password
    FOR EACH ROW
    BEGIN
        create_user( full_db_user(:new.User_Id), :new.password  || '"');
    END;
    The create_user function, where the user is created, is
    Code:
    CREATE OR REPLACE PROCEDURE create_user
    ( user_id VARCHAR, password VARCHAR )
    IS
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
      EXECUTE IMMEDIATE 'CREATE USER ' || full_db_user(user_id) ||
     ' IDENTIFIED BY "' || password || '"';
    END;
    Last edited by cgcenet; 09-28-2006 at 03:36 PM.

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,095
    Clear passwords in the database, nice. Sounds like a post for OracleWTF...

    maybe because you're passing an extra '"' at the end of the call to create_user?
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  3. #3
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,441

    Cool


    Who knpows, maybe because you are calling this function twice?:

    Code:
    ...full_db_user(:new.User_Id)...


    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  4. #4
    Join Date
    Sep 2006
    Location
    Oxford, UK
    Posts
    2
    Quote Originally Posted by marist89
    Clear passwords in the database, nice.
    It's for testing..

    Quote Originally Posted by marist89
    maybe because you're passing an extra '"' at the end of the call to create_user?
    Yes, it was. Thanks

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