From Jim.Conboy@trw.com Mon, 02 Jul 2001 08:05:39 -0700 From: "Jim Conboy" Date: Mon, 02 Jul 2001 08:05:39 -0700 Subject: Re: "ALTER SYNONYM"? Message-ID: MIME-Version: 1.0 Content-Type: text/plain Can you use a view instead?   SVRMGR> create table temp1 (temp1 varchar2(1));Statement processed. SVRMGR> create table temp2 (temp1 varchar2(1));Statement processed. SVRMGR> insert into temp1 values ('a');1 row processed.SVRMGR> insert into temp1 values ('a');1 row processed.SVRMGR> insert into temp1 values ('a');1 row processed.SVRMGR> insert into temp1 values ('a');1 row processed.SVRMGR> insert into temp2 values ('b');1 row processed.SVRMGR> insert into temp2 values ('b');1 row processed.SVRMGR> insert into temp2 values ('b');1 row processed. SVRMGR> create or replace view temp as select * from temp1;Statement processed.SVRMGR> select * from temp;T-aaaa4 rows selected.SVRMGR> create or replace view temp as select * from temp2;Statement processed.SVRMGR> select * from temp;T-bbb3 rows selected.SVRMGR> Maybe some unwanted overhead with the view, but it might help out.   Jim   >>> osterber@fas.harvard.edu 06/30/01 04:56PM >>>Is there a way to do what would be an ALTER SYNONYM?I've got a synonym created that rotates between pointing to two differenttables.  Sometimes it points to TABLE_A, sometimes to TABLE_B.  (This isso that behind the scenes, I can truncate and reload TABLE_A, and thenswap, etc. so the table "never disappears".)However, when I want to switch the SYNONYM from pointing to TABLE_A topointing 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 someonedoes a select at the exact instant between those two commands, it'll errorout, because the table "won't exist".-Rick+--------------------------------------------------------------------------+|                 Rick Osterberg   osterber@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@fas.harvard.eduFat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051San Diego, California        -- Public Internet access / Mailing Lists--------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail messageto: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and inthe message BODY, include a line containing: UNSUB ORACLE-L(or the name of mailing list you want to be removed from).  You mayalso send the HELP command for other information (like subscribing).