Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Fwd: DBD::Oracle Schema different than User question
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
"Martin J. Evans"  
View profile  
 More options Nov 12 2012, 2:15 pm
Newsgroups: perl.dbi.users
From: martin.ev...@easysoft.com ("Martin J. Evans")
Date: Mon, 12 Nov 2012 19:04:56 +0000
Local: Mon, Nov 12 2012 2:04 pm
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "DBD::Oracle Schema different than User question" by Matthew Musgrove
Matthew Musgrove  
View profile  
 More options Nov 12 2012, 2:30 pm
Newsgroups: perl.dbi.users
From: mr.musk...@gmail.com (Matthew Musgrove)
Date: Mon, 12 Nov 2012 13:12:45 -0600
Local: Mon, Nov 12 2012 2:12 pm
Subject: Re: DBD::Oracle Schema different than User question
I've never had a need to have it set in the connect string because our
logon trigger sets it for us based on a variety of criteria.

    execute immediate 'ALTER SESSION SET CURRENT_SCHEMA = SOMESCHEMA';

Matt

On Mon, Nov 12, 2012 at 1:04 PM, Martin J. Evans
<martin.ev...@easysoft.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Scoles  
View profile  
 More options Nov 12 2012, 3:45 pm
Newsgroups: perl.dbi.users
From: byter...@hotmail.com (John Scoles)
Date: Mon, 12 Nov 2012 15:32:13 -0500
Local: Mon, Nov 12 2012 3:32 pm
Subject: RE: DBD::Oracle Schema different than User question

----------------------------------------

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"Furst, Carl"  
View profile  
 More options Nov 12 2012, 4:15 pm
Newsgroups: perl.dbi.users
From: Carl.Fu...@mlb.com ("Furst, Carl")
Date: Mon, 12 Nov 2012 16:03:56 -0500
Local: Mon, Nov 12 2012 4:03 pm
Subject: Re: DBD::Oracle Schema different than User question
Switching schemas in Oracle makes no sense, because schemas are tied to
the user. In fact you don't login to oracle with a username but with a
schema name. Schema and username are the same things. It is not like MySQL
where you have Databases that denote these object groups and are separate
from users.

However, this is not something that is confined. If you track which
schemas you want to access, and have the proper grants issued.. You can
always access any object with the following notion:

schema_name.object_name

This is irregardless of which schema you are logged into. However, the
proper grants need to be issued and can only be issued if you are logged
into the schema that owns those objects.

For example..

Table A is in Schema X and Table B is in schema Y.. X wants to access B
and Y wants to access A..

So you have to login as Y and

GRANT SELECT,UPDATE,INSERT,DELETE ON B TO X;

Then login as X and

GRANT SELECT,UPDATE,INSERT,DELETE ON A TO Y;

Then if you are logged in as X you can do

SELECT * FROM Y.B;

And logged in as Y

SELECT * FROM X.A;

Hope that helps,
Carl Furst

On 11/12/12 3:32 PM, "John Scoles" <byter...@hotmail.com> wrote:

**********************************************************

MLB.com: Where Baseball is Always On


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Fwd: DBD::Oracle Schema different than User question" by &quot;Martin J. Evans&quot;
"Martin J. Evans"  
View profile  
 More options Nov 12 2012, 1:48 pm
Newsgroups: perl.dbi.users
From: boh...@ntlworld.com ("Martin J. Evans")
Date: Mon, 12 Nov 2012 18:48:55 +0000
Local: Mon, Nov 12 2012 1:48 pm
Subject: Fwd: DBD::Oracle Schema different than User question
Forwarded to dbi-users.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "DBD::Oracle Schema different than User question" by &quot;Kevin L. Kane&quot;
"Kevin L. Kane"  
View profile  
 More options Nov 12 2012, 4:27 pm
Newsgroups: perl.dbi.users
From: kevin.k...@gmail.com ("Kevin L. Kane")
Date: Mon, 12 Nov 2012 16:27:37 -0500
Local: Mon, Nov 12 2012 4:27 pm
Subject: Re: DBD::Oracle Schema different than User question
Yes I understand that what I am trying to do is "broken" from a Oracle
perspective.  The specific issue I am running into is that my
application environment is only allowed to connect to the DB as one
user/schema.  I want to use dbicdump on other schemas however, and its
not just like a couple.  Its going to be over 50.  So creating a
trigger in the DB to switch my schema on login is not really feasible,
Id like to be able to automate it more easily.  Passing a schema= to
the connect string seemed like the best option.

--
Kevin L. Kane
kevin.kane at gmail.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Charles Jardine  
View profile  
 More options Nov 15 2012, 6:30 am
Newsgroups: perl.dbi.users
From: c...@cam.ac.uk (Charles Jardine)
Date: Thu, 15 Nov 2012 11:14:11 +0000
Local: Thurs, Nov 15 2012 6:14 am
Subject: Re: DBD::Oracle Schema different than User question
On 12/11/12 21:27, Kevin L. Kane wrote:

> Yes I understand that what I am trying to do is "broken" from a Oracle
> perspective.  The specific issue I am running into is that my
> application environment is only allowed to connect to the DB as one
> user/schema.  I want to use dbicdump on other schemas however, and its
> not just like a couple.  Its going to be over 50.  So creating a
> trigger in the DB to switch my schema on login is not really feasible,
> Id like to be able to automate it more easily.  Passing a schema= to
> the connect string seemed like the best option.

You can change the default schema at any time after connecting to an Oracle
database by:

    $dbh->do("alter session set current_schema=$schema");

This changes the default schema used in subsequent DML (Data Manipulation
Language) statements which use partially qualified object names.

I can't see why changing this setting would have any effect on the behaviour
of  DBIx::Class::Schema::Loader, since this module will obtain all its data
from the  Data Dictionary, in schema SYS. You do not get the description
of a schema by querying objects in the schema itself.

If dbicdump does not provide a way of specifying a schema name different
from
the user name, it needs fixing.

--
Charles Jardine - Computing Service, University of Cambridge
c...@cam.ac.uk    Tel: +44 1223 334506, Fax: +44 1223 334679


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »