Xref: alice comp.databases.oracle.server:73570
Path: alice!news-feed.fnsi.net!news.idt.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail
From: Ben Ryan <benryan@my-deja.com>
Newsgroups: comp.databases.oracle.server
Subject: Re: Retrieving data without specifying table owner
Date: Thu, 11 Nov 1999 17:40:18 GMT
Organization: Deja.com - Before you buy.
Lines: 32
Message-ID: <80ev20$3sl$1@nnrp1.deja.com>
References: <lFBW3.4468$T4.1217661@news1.rdc1.on.wave.home.com>
To: jeff.van@bigfoot.com
X-Article-Creation-Date: Thu Nov 11 17:40:18 1999 GMT
X-Http-User-Agent: Mozilla/4.51 [en] (Win98; U)
X-Http-Proxy: 1.0 x29.deja.com:80 (Squid/1.1.22) for client 24.113.130.175
X-MyDeja-Info: XMYDJUIDbenryan

In article <lFBW3.4468$T4.1217661@news1.rdc1.on.wave.home.com>,
  "Jeff Van Dusseldorp" <jeff.van@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.
