You can't, but you can use 'alter session set
current_schema = ...'. Similarly, if the procedure
you're building has all the power the create users/
create tables, then it will be able to put data in
that table, it can also be used to temporary create a
secondary procedure in the new schema to issue grants
if required.
There should not be a need to actually connect as that
account..
hth
connor
--- Ranganath K <[EMAIL PROTECTED]> wrote: >
Dear DBA Gurus,
>
> I want to create a stored procedure in which
> a name is passed as
> input parameter. The procedure should take the name
> as input parameter and
> create a user with the username and password same as
> name. Then I want to
> connect as the newly created user and create a set
> of tables. I know how to
> create a user and create tables in Pl/Sql using
> Execute immediate statement
> but I don't know how to pass the connect clause in
> stored procedure so that
> I can connect as the newly created user. Anybody
> knows how to to this? If
> so, please let me know. Any help in this regard
> will be very much
> appreciated.
>
> TIA and Regards,
>
> Ranganath
>
>
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> --
> Author: Ranganath K
> INET: [EMAIL PROTECTED]
>
> Fat City Network Services -- (858) 538-5051 FAX:
> (858) 538-5051
> San Diego, California -- Public Internet
> access / Mailing Lists
>
--------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from). You may
> also send the HELP command for other information
> (like subscribing).
=====
Connor McDonald
http://www.oracledba.co.uk (mirrored at
http://www.oradba.freeserve.co.uk)
"Some days you're the pigeon, some days you're the statue"
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: =?iso-8859-1?q?Connor=20McDonald?=
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).