Problem with procedure to connect as anouther user
Hi I always get an error when executing this procedure
CREATE OR REPLACE PROCEDURE NEWCON1
cursor_handle INTEGER := DBMS_SQL.OPEN_CURSOR;
seq_sql VARCHAR(200) := 'connect user/pass';
DBMS_SQL.parse (cursor_handle,seq_sql, DBMS_SQL.NATIVE);
execute_ddl := DBMS_SQL.execute (cursor_handle);
I don't think you can connect as another user within a procedure (unless you do so via a database link).
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!
"Connect user/pass" is a SQL*Plus command, not a SQL or PL/SQL command, you cannot use it outside SQL*Plus.
The whole difference between a little boy and an adult man is the price of toys
You can use java store procedure to connect as a diffrent user or to check user name and password.
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.
Click Here to Expand Forum to Full Width