Return-Path: <ml-errors@fatcity.com>
Received: from ensim.rackshack.net (root@localhost)
 by orafaq.net (8.11.6/8.11.6) with ESMTP id h7KJ8gk16741
 for <oracle-l@orafaq.net>; Wed, 20 Aug 2003 14:08:42 -0500
X-ClientAddr: 66.27.56.213
Received: from www2.fatcity.com (rrcs-west-66-27-56-213.biz.rr.com [66.27.56.213])
 by ensim.rackshack.net (8.11.6/8.11.6) with ESMTP id h7KJ8fp16736
 for <oracle-l@orafaq.net>; Wed, 20 Aug 2003 14:08:41 -0500
Received: (from root@localhost)
 by www2.fatcity.com (8.11.6/8.11.6) id h7KGeoc17311
 for oracle-l@orafaq.net; Wed, 20 Aug 2003 09:40:50 -0700
Received: by fatcity.com (05-Jun-2003/v1.0g-b73/bab) via fatcity.com id 005CBC8C; Wed, 20 Aug 2003 09:34:24 -0800
Message-ID: <F001.005CBC8C.20030820093424@fatcity.com>
Date: Wed, 20 Aug 2003 09:34:24 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: <rgaffuri@cox.net>
Sender: ml-errors@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: <rgaffuri@cox.net>
Subject: Re: RE: possible to dynamicly connect to a different user in pl/sql?
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 73; ListGuru (c) 1996-2003 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

the user would be sys. I need to create grants to DBA_ views on the fly so we can scale an application. We add new users and some of them need access to these to run a load process properly. 

ill just run it from unix. 
> 
> From: "Pardee, Roy E" <roy.e.pardee@lmco.com>
> Date: 2003/08/20 Wed PM 01:24:25 EDT
> To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
> Subject: RE: possible to dynamicly connect to a different user in pl/sql?
> 
> My guess is that 'connect' is a sql*plus command (rather than a pl/sql command) & so wouldn't work with execute immediate.
> 
> But maybe you could break out the portions of your code that need to run as a different user into a separate package, owned by that user?
> 
> HTH,
> 
> -Roy
> 
> Roy Pardee
> Programmer/Analyst/DBA
> SWFPAC Lockheed Martin IT
> Extension 8487
> 
> -----Original Message-----
> Sent: Wednesday, August 20, 2003 8:22 AM
> To: Multiple recipients of list ORACLE-L
> 
> 
> I doubt it... but this could save me from coding it into a unix script and keeping all my code in my package. I tried
> 
> execute immediate 'connect user/password; and it failed.
> 
> is this doable? 
> 
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> -- 
> Author: <rgaffuri@cox.net
>   INET: rgaffuri@cox.net
> 
> Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
> San Diego, California        -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru@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).
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> -- 
> Author: Pardee, Roy E
>   INET: roy.e.pardee@lmco.com
> 
> Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
> San Diego, California        -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru@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).
> 

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: <rgaffuri@cox.net
  INET: rgaffuri@cox.net

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@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).

