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: Question Using Synonyms

Re: Question Using Synonyms

From: Thomas Olszewicki <ThomasO_at_cpas.com>
Date: Sat, 08 Jan 2000 06:46:44 GMT
Message-ID: <o3Bd4.9092$eQ2.267191@news1.rdc2.on.home.com>


You can use table name , view name , packages and procedures without using Owner's Name.
Simply in issue a statement : ALTER SESSION SET CURRENT_SCHEMA=<Owner>.

Example :
connect john/password_at_mydatabase
create table TestJohn ( A1 VARCHAR2 );
GRANT SELECT,UPDATE,... TO PUBLIC -- or any other group, user,...

Connect mary/password_at_mydatabase
SELECT * from TestJohn;
Oops : table does not exist...
ALTER SESSION SET CURRENT_SCHEMA=John;
SELECT * from TestJohn;
Hey ; It works...

HTH
Thomas Olszewicki
ThomasO_at_cpas.com
www.cpas.com

<gsgoo_at_my-deja.com> wrote in message news:8507hd$cnt$1_at_nnrp1.deja.com...
> Please advise,
>
> We're converting our database applications to Oracle and are trying to
> decide if it would be better to always query tables by using the
> <Owner>.<Table Name> syntax instead of relying on Synonyms? We thought
> some software might have a problem accessing a table's meta-data if it
> searched only by the Table's Name without using its Owner's Name? Has
> anyone had any negative experiences with Third Party development tools
> and Oracle's Synonyms?
>
> Please let me know what you think.
> Thanks.
> Greg Goodman
> ggoodman_at_pscu.net
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Sat Jan 08 2000 - 00:46:44 CST

Original text of this message

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