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

Thread: Problem with procedure to connect as anouther user

  1. #1
    Join Date
    May 2001
    Location
    Cape Town, South Africa
    Posts
    52

    Angry Problem with procedure to connect as anouther user

    Hi I always get an error when executing this procedure


    CREATE OR REPLACE PROCEDURE NEWCON1
    AS
    cursor_handle INTEGER := DBMS_SQL.OPEN_CURSOR;
    seq_sql VARCHAR(200) := 'connect user/pass';
    execute_ddl INTEGER;
    BEGIN
    DBMS_SQL.parse (cursor_handle,seq_sql, DBMS_SQL.NATIVE);
    execute_ddl := DBMS_SQL.execute (cursor_handle);
    DBMS_SQL.close_cursor (cursor_handle);
    exception
    when others
    then
    raise;

    END;
    /

  2. #2
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    I don't think you can connect as another user within a procedure (unless you do so via a database link).

    Regards
    Jim
    Oracle Certified Professional
    "Build your reputation by helping other people build theirs."

    "Sarcasm may be the lowest form of wit but its still funny"

    Click HERE to vist my website!

  3. #3
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    "Connect user/pass" is a SQL*Plus command, not a SQL or PL/SQL command, you cannot use it outside SQL*Plus.
    Ales
    The whole difference between a little boy and an adult man is the price of toys

  4. #4
    Join Date
    Oct 2001
    Location
    GA, USA
    Posts
    79
    You can use java store procedure to connect as a diffrent user or to check user name and password.

    Minesh
    Circumstances do not rise to meet our expectation. Embrace what you actually get. Open your eyes. See things for what they really are Thereby sparing yourself the pain of false attachements.

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