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: alias for long object name

Re: alias for long object name

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Fri, 25 Jul 2003 17:10:10 GMT
Message-ID: <MPG.198b044b47125b92989808@news.la.sbcglobal.net>


Hi Christoph Seidel, thanks for writing this:
> Hi,
>
> is it possible to use an alias for an object name like schema.table_at_linkname
> without creating a synomym? I have a stored proc which references this long
> name very offen and i do not want to type it again and again.
>

I can understand your reluctance to type schema.table_at_linkname over and over, but I'm not sure why you are reluctant to use a synonym. Think of the flexibility a synonym offers:

  1. Suppose something happens to the db at linkname. The DBA restores the db to another host, so your linkname is no longer valid. Simply change the synonym to use a different linkname and - presto! - no code changes to your stored procedure.
  2. Suppose someone decides to move table from schema=john to schema=jane. Simply change the synonym to use jane's schema and - presto! - no code changes to your stored procedure.

PS - Do you get the feeling I like to use the word "presto?"

-- 
[:%s/Karsten Farrell/Oracle DBA/g]
Received on Fri Jul 25 2003 - 12:10:10 CDT

Original text of this message

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