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

Home -> Community -> Usenet -> c.d.o.server -> Re: Retrieving data without specifying table owner

Re: Retrieving data without specifying table owner

From: Ben Ryan <benryan_at_my-deja.com>
Date: Thu, 11 Nov 1999 17:40:18 GMT
Message-ID: <80ev20$3sl$1@nnrp1.deja.com>


In article <lFBW3.4468$T4.1217661_at_news1.rdc1.on.wave.home.com>,   "Jeff Van Dusseldorp" <jeff.van_at_bigfoot.com> wrote:
> Is there anyway to make Oracle find the tables without specifying
> the owner name.
>
> CONNECT SampleUser/password;
> SELECT * FROM Student;
>
> The following error will occur:
> ERROR at line 1:
> ORA-00942: table or view does not exist
>

Creating either a private or public synonym for SystemOwner.Student will allow Oracle, when connected as SampleUser, to find Student.

> Now, good programming technique would probably insist that you
> specify the table owner in each select.

Disagree. When we develop applications we need to have three or four "environments" for the purposes of, say, development, QA, training and production. Typically, development, QA and Training will be in the same instance of Oracle as separate "table owning" schemas. Therefore, we do not want to see the owner name specified in every select, insert, update and delete statement, even though there are three versions of every table that make up the application. A user account for QA purposes will have synonyms for tables in the QA owning schema, etc.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Nov 11 1999 - 11:40:18 CST

Original text of this message

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