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

Thread: ora-00900 invalid sql statement

  1. #1
    Join Date
    Sep 2002
    Posts
    4
    Hi,
    Following is the procedure I am talking abt.
    ******************PROCEDURE create_user2*************
    CREATE OR REPLACE procedure create_user2(v_username varchar2, password varchar2)
    IS
    username varchar2(200):=decrypt2(v_username,'magickey');
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    EXECUTE IMMEDIATE 'create user '||username||' identified by '||password||'
    default tablespace users temporary tablespace temp';
    execute immediate 'grant connect,resource to '||username||'';
    END;
    ***************************************************
    This procedure has been sucessfully created.


    I am running the above procedure from another user's
    schema as below:
    [It ran suceefully before 2 weeks.I wonder what happened?]
    exec prasanna.create_user2('lklkla','two');
    two is the parameter passed to the procedure create_user2.

    I am getting a error as:
    exec prasanna.create_user2('lklkla','two')
    *
    ERROR at line 1:
    ORA-00900: invalid SQL statement
    Please help me out to solve this.

    Regards
    Prasanna

  2. #2
    Join Date
    Feb 2002
    Posts
    70
    Do that schema is having privileges to execute this procedure. If not, you have to grant execute privilege on that procedure to the schema from where you are trying to execute.

    Check whether you can execute the procedure from its owner schema. Also check whether procedure is valid?

    Thanks
    ________________
    ShanDJ

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