Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: "ALTER SYNONYM"?
Rick:
No. There is no "alter synonym" command in SQL (none that I can find or know of, at least). The way you describe is the only way to do it.
-- Jon Walthour, OCDBA Oracle DBA Computer Horizons Cincinnati, Ohio ----- Original Message ----- To: "Multiple recipients of list ORACLE-L" <ORACLE-L_at_fatcity.com> Sent: Saturday, June 30, 2001 4:56 PMReceived on Sun Jul 01 2001 - 12:41:05 CDT
> Is there a way to do what would be an ALTER SYNONYM?
>
> I've got a synonym created that rotates between pointing to two different
> tables. Sometimes it points to TABLE_A, sometimes to TABLE_B. (This is
> so that behind the scenes, I can truncate and reload TABLE_A, and then
> swap, etc. so the table "never disappears".)
>
> However, when I want to switch the SYNONYM from pointing to TABLE_A to
> pointing to TABLE_B, the only way is to:
>
> drop synonym table_syn;
> create synonym table_syn for table_b;
>
> Is there a way to make that instantaneous for the database? If someone
> does a select at the exact instant between those two commands, it'll error
> out, because the table "won't exist".
>
> -Rick
>
>
+--------------------------------------------------------------------------+
> | Rick Osterberg osterber_at_fas.harvard.edu
|
> | Database Applications Specialist FAS Computer Services
|
>
+--------------------------------------------------------------------------+
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Rick Osterberg
> INET: osterber_at_fas.harvard.edu
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jon Walthour INET: jonw_at_fuse.net Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).