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: Is there a wildcard for synonyms?

Re: Is there a wildcard for synonyms?

From: Gump <phefford_at_gmail.com>
Date: 1 Jun 2006 23:17:36 -0700
Message-ID: <1149229056.258134.231800@f6g2000cwb.googlegroups.com>


I don't think you will have to do anything. Look up the following topic in Oracle documentation - "How Oracle Resolves Schema Object References".

When you refer to an object in a SQL statement, Oracle considers the context of the SQL statement and locates the object in the appropriate namespace. If your code references an unqualified table, view, procedure, function or package, Oracle will look for the refeferenced object in the following order:

Make your private copies of the development schema's tables and go for it.

No, CREATE TABLE ... AS SELECT won't capture all the constraints. Perhaps use export/import.

mehaase_at_gmail.com wrote:
> I have a schema for development which is shared with several other
> people. I'm writing some code which reads a bunch (maybe 30-40) of the
> tables and uses other things like types, sequences, stored procedures,
> etc. I'd like to be able to run this code in a private schema...so I
> need to create synonyms to all the objects...but there's several
> hundred of them. Is there some kind of wildcard schema that just says
> "look first in my schema and if you don't find the object there then
> look in this other schema?"
>
> Then...I will be inserting/updating to a handful of tables (6-7). I'd
> like not to alter the development schema's tables at all, so I'm
> planning to make private copies, as in
>
> CREATE TABLE test AS SELECT * FROM DEV_SCHEMA.test;
>
> etc...
>
> But this won't capture any constraints on the table, will it? Is there
> a way to copy a table such that you keep all of the contraints,
> indices, etc.?
Received on Fri Jun 02 2006 - 01:17:36 CDT

Original text of this message

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