RE: Re[2]: change a database connection in a stored procedure?

2002-05-07 Thread kranti pushkarna
Hi Alexandre, I am writing a procedure to create a user, grant privilleges to the user nad then connect as that user and create schema in that user. I want this whole process to be automated. That is why I want to change a database connection. Anyway I have done it using batch file. Thanks

Re: change a database connection in a stored procedure?

2002-05-07 Thread Daniel Wisser
hi! i don't quite understand the problem, but it seems that while running a script you want to build a second connection you can do this if you build the connection with HOST SQLPLUS xxx/yyy@zzz with the first EXIT you disconnect from connection 2 and with the second one from connection 1 by

Re: Re[2]: change a database connection in a stored procedure?

2002-05-07 Thread Alexandre Gorbatchev
Hi Kranti, First of all, think about what you wanna do. This looks like logical mistake if you need session change in PL/SQL. When you change the session, what happens with the first one? Session is establised by client requesting the server, so you can only do it from client. If you just want t

Re[2]: change a database connection in a stored procedure?

2002-05-07 Thread Sergey V Dolgov
Hello kranti, I made a mistake. You can't change your database connection at all from stored procedure (there is no such SQL command "connect" it's a sqlplus directive). When I gave the answer I thought about database link. You can drop and create it using dynamic SQL. Tuesday, May 07, 2002, 2:0

RE: change a database connection in a stored procedure?

2002-05-06 Thread kranti pushkarna
Hi Sergey, I am using dynamic SQL but it is returing error for connect statement. Can u give me some example code. Rgds Kranti -Original Message- Sent: Tuesday, May 07, 2002 7:38 AM To: Multiple recipients of list ORACLE-L Hello kranti, Use dynamic SQL. Monday, May 06, 2002, 8:23:29 P

Re: change a database connection in a stored procedure?

2002-05-06 Thread Sergey V Dolgov
Hello kranti, Use dynamic SQL. Monday, May 06, 2002, 8:23:29 PM, you wrote: kp> Hi List, kp> Can someone tell me is it possible to change a database connection kp> in a stored procedure? if so how? kp> TIA kp> Kranti -- Best regards, Sergeymailto:[EMAIL

change a database connection in a stored procedure?

2002-05-06 Thread kranti pushkarna
Hi List, Can someone tell me is it possible to change a database connection in a stored procedure? if so how? TIA Kranti -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: kranti pushkarna INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051