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

Home -> Community -> Usenet -> c.d.o.misc -> Re: OraOLEDB.Oracle

Re: OraOLEDB.Oracle

From: Sunil <zunilp_at_gmail.com>
Date: 13 Sep 2004 01:13:35 -0700
Message-ID: <8e0c3fab.0409130013.195fac7c@posting.google.com>


sybrandb_at_yahoo.com wrote in message news:<a1d154f4.0409100317.2898d20f_at_posting.google.com>...
> zunilp_at_gmail.com (Sunil) wrote in message news:<8e0c3fab.0409092153.35571c6b_at_posting.google.com>...
> > Hi,
> > We are having a database connector program which uses various OLEDB
> > providers to connect to various DB Servers.
> > But we rae facing some issues with OraOLEDB.Oracle. I am havin an
> > oracle user who is a DBA.
> > Is there anyway with OraOLEDB to connect to a tableschema of another
> > user during initialisation so that there is no need of using
> > schema.tablename in DML statements?
> > For example SQLOLEDB supports DBPROP_INIT_CATALOG property in
> > DBPROPSET_DBINIT propset. So while starting of the connection, if we
> > set this all requests will be directed to only that catalog. But
> > OraOLEDB doesn't support this even if we set.
> > Is there any way to achieve this either through
> > DBPROP_INIT_PROVIDERSTRING property or some other property.
> >
> > Now we are using ALTER SESSION command to set the schema.
> > Regards
> > Zunil
> > Cordys
>
>
> The problem is that you didn't set up (public) synonyms in the Oracle
> database.
> Your problem is not the Oledb driver, but your lack of knowledge of
> Oracle (using a DBA account to connect via jdbc to Oracle is
> definitely a *bad* idea)
>
> Sybrand Bakker
> Senior Oracle DBA

Hi,

I think you didn't get my qusetion correctly. Ours is a multi user environment.
Sometimes the DBA wants to connect to database using our generic client program and execute some queries in some other schema.

In SQLServer, using SQLOLEDB, I can set DBPROP_INIT_CATALOG property to tell which database I want to connect. After that all my requests will be directed to that database only. I don't have to prefix catalogname.username.tablename.

Is there any such facility available in OraOLEDB so that during connection itself I will tell I want to access one particular schema?

In oracle ALTER SESSION SET CURRENT_SCHEMA =<schema> will do the job. But that requires another roundtrip to database after connection is made.

Is there any other way to do this as in SQLServer? Regards
Zunil
Cordys Received on Mon Sep 13 2004 - 03:13:35 CDT

Original text of this message

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