RE: DBD::Oracle Schema different than User question

John Scoles <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <[email protected]>

----------------------------------------
> Date: Mon, 12 Nov 2012 19:04:56 +0000
> From: [email protected]
> To: [email protected]
> CC: [email protected]
> Subject: Fwd: DBD::Oracle Schema different than User question
>
> Hi Kevin,
>
> I've forwarded your email on to the dbi-users list. See
> http://dbi.perl.org and look at the support page. Sorry for top posting
> but my email client is having some sort of fit with your email. I don't
> have any issue with any well formed patch to set the schema but I'll
> wait to see what others say as personally I've never had to change it.
>
> Martin
>
>
> -------- Original Message --------
> Subject: DBD::Oracle Schema different than User question
> Date: Mon, 12 Nov 2012 13:04:05 -0500
> From: Kevin L. Kane <[email protected]>
> To: Tim Bunce <[email protected]>, Yanick Champoux <[email protected]>,
> "Martin J. Evans" <[email protected]>
>
> Hi all,
> I am running into a problem and was planning on modifying my local
> DBD::Oracle to add support for a "schema=<mySchema>" construct in the
> connect string. Specifically, I want to connect as user X but set
> current_schema to Y. 

Sounds like someone tried to creata a MySQL type DB schema on Oracle again;)

Anyway if you want to log in wiht 1 generic user then change the 'schema'  just issue
an sql something like this

exec sql execute immediate  ALTER SESSION SET CURRENT_SCHEM=sss



> Another solution i've toyed with is having a
> trigger that switches my schema when I log in but I need to do this
> for a lot of different schemas and I will always be the same user. It
> seems weird to me that support for this isn't included in DBD::Oracle
> currently.
>
> If I do this in a sane way are you at all interested in the patch? 

IF if you come up with a patch we will have a look at it.

> Am I just missing something and this functionality is already there? Or
> should this functionality not exist in the first place and why?
>

I don't think it should be there because what oracle thinks a schema is different thatn other DB??  
A schema to an Oracle DB is the set of all tables and other objects owned by a user account if I am not mistaken 
not the grouping of all the table under an app or alike

Anyway off the top of head I do not think there is a way with OCI to change the shcema without loging in again as there
 is only OCISession begin OCIlogin2 neither take any shcema params???


Cheers
John
> Thanks,
> Kevin
> --
> Kevin L. Kane
> kevin.kane at gmail.com
>
>
>
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.