[askdba] Re: how to change the schema in same session

  • From: Nisar Tareen <ntareen@xxxxxxxxx>
  • To: askdba@xxxxxxxxxxxxx
  • Date: Mon, 6 Aug 2007 09:11:49 -0700 (PDT)

Be aware of using  un-documented parameter in your production applications, 
It's okay to use them for your personnel use and test  environment but avoid to 
use them in production. 

Because Oracle and modify the fuction or remove them without any notice. 

Nisar Tareen 



----- Original Message ----
From: Thiagoo <thiagoodba@xxxxxxxxx>
To: askdba@xxxxxxxxxxxxx
Sent: Saturday, August 4, 2007 3:17:58 AM
Subject: [askdba] Re: how to change the schema in same session

Thanks Dan Petric & Thanks for sharing this..DrumilNarayan!

drumil narayan <drumilnarayan@xxxxxxxxx> wrote: 
Thanks Dan..
--- Dan Petric wrote:

> Use SET CURRENT_SCHEMA
> 
> Note that CURRENT_SCHEMA is not a documented
> parameter, and therefore
> its 
> functionality could be changed or the parameter
> could be made
> unavailable at 
> any time.
> 
> But this is how it works:
> 
> ALTER SESSION SET CURRENT_SCHEMA=:USER_ID;
> 
> For example:
> 
> If you are logged in as user "SCOTT" and want to
> access or create
> objects as 
> "TOM" but don't want to specify the schema or use
> synonyms each time,
> then 
> you would simply alter our current schema by:
> 
> ALTER SESSION SET CURRENT_SCHEMA=TOM;
> 
> This would allow you to access or even create
> objects in the schema
> 'TOM' 
> provided you have the correct privileges.
> 
> 
> Solution Explanation:
> =====================
> 
> CURRENT_SCHEMA only alters the current schema and
> allows you to access
> objects 
> in another schema, provided you have the privilege
> to do so.
> 
> 
> References
> ==========
> 
> - This is undocumented parameter, and functionality
> could
> change any time.
> 
> On Fri, 13 Jul 2007 16:52:58 +0100 (BST), "drumil
> narayan"
> said:
> > Hi ganesh and et al
> > 
> > How do I change the existing schema without
> altering
> > the same session.
> > eg. user a, user b
> > logged in as user a and want to execute some
> > privileged jobs of b without actually assigning
> any
> > grants or privilege to a.
> > 
> > this is was explained bysome of our dba on lazydba
> but
> > now am not able to find on lazydba 
> > 
> > kindly help..Drumil
> > 
> > 
> > --- Ganesh Raja wrote:
> > 
> > > Same here ... waiting for something to happen :)
> > > 
> > > On 5/17/07, Abraham Kurian 
> > > wrote:
> > > >
> > > > Dont think , it is !! , havent seen any
> activity
> > > on this group for a long
> > > > time now
> > > >
> > > >
> > > >
> > > > On 5/16/07, Chirag DBA 
> > > wrote:
> > > > >
> > > > > Is this group still active ?
> > > > >
> > > > > --
> > > > > Cheers,
> > > > > ------------------------
> > > > > Chirag Majmundar
> > > >
> > > >
> > > >
> > > 
> > > 
> > > -- 
> > >
> >
>
-----------------------------------------------------------
> > > http://iyertalks.blogspot.com/
> > > 
> > 
> > 
> > 
> > Why delete messages? Unlimited storage is
> just a click away. Go to
> > 
>
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html
> > 
> 
> -- 
> http://www.fastmail.fm - mmm... Fastmail...
> 
> 
> 



5, 50, 500, 5000. Store N number of mails in your inbox. Go to 
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html






==================================================
 
Thanks & Best Regards,
 
Thiagu
 
==================================================


Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out.


       
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/

Other related posts: