Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: How to pass the connect clause to connect as a database user

RE: How to pass the connect clause to connect as a database user

From: Andor, Gyula <gy.andor_at_euromacc.hu>
Date: Tue, 29 May 2001 00:55:28 -0700
Message-ID: <F001.00311757.20010529005603@fatcity.com>

> 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.

I think you don't need to connect as the just-created user. Istead of this you can create table set by this kind of create table statement:

create table [newusername].[tablename] .....

I hope this helps.

Gyula

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Andor, Gyula
  INET: gy.andor_at_euromacc.hu

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: ListGuru_at_fatcity.com (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).
Received on Tue May 29 2001 - 02:55:28 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US