Home » SQL & PL/SQL » SQL & PL/SQL » Can Use Connect statement into PL/SQL?
icon4.gif  Can Use Connect statement into PL/SQL? [message #205380] Fri, 24 November 2006 07:01 Go to next message
harpreetsinghkup
Messages: 52
Registered: May 2006
Location: Mumbai
Member

i want to use Connect Statement in Pl/Sql Block. for this
i written a block as below.
Begin
Execute immediate('Connect scott/tiger');
end;
-----
it is given to me statement error ORA-00900.
May i use connect statement in Pl/Sql Block.?
if Yes Then Please Tell me how?.
in the Waiting of your Great Responce.
Harpreet Singh
Re: Can Use Connect statement into PL/SQL? [message #205385 is a reply to message #205380] Fri, 24 November 2006 07:23 Go to previous messageGo to next message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Not really. That would be somewhat like trying to change a tire while driving on the highway at 100 mph.

The pl/sql runs IN the database UNDER the user account of the user, so you can't become another user in pl/sql.
Re: Can Use Connect statement into PL/SQL? [message #205439 is a reply to message #205385] Fri, 24 November 2006 16:51 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Although you CAN use a combination of Invoker Privileges and ALTER SESSION SET CURRENT USER to change the schema that you seem to be running things from.
Previous Topic: need help with converting unix timestamp column
Next Topic: Output text filename from sql query
Goto Forum:
  


Current Time: Wed Dec 07 18:55:18 CST 2016

Total time taken to generate the page: 0.11650 seconds