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: Oracle Table Rename

Re: Oracle Table Rename

From: Michael Ho <infoage_at_hk.super.net>
Date: 1997/04/05
Message-ID: <33452E2A.4905@hk.super.net>#1/1

Wesley M. Stephens wrote:
>
> I have a situation in which I would like to maintain two identical
> tables (same definition, but different names). I would like to have
> applications reference one or the other of these tables through either a
> synonym or a view. For example, I would like to have synonym T and have
> it point to either table T1 or T2. Whenever the synonym T points to T1,
> all application queries would be using the data in T1. During a window
> of serveral hours every night I will be truncating and loading new data
> into table T2. When that load is complete I would like to redirect the
> synonym to point to T2 so that applications would immediately get the
> new data. In this fashion I hope to minimize the time the table is
> "unavailable" during the reload.
>
> My problem is of course that re-establihing the synonym to point to the
> new table invalidates all the procedures etc. that use the synonym.
> What I need is a mechanims for accomplishing this sleight-of-hand that
> does not invalidate anything?
>
> Does anyone have any ideas? This is a simple process with a file system
> in that files can simply be renamed. I can't, however, come up with an
> approach that looks like it will work with Oracle...it's working
> entirely too hard to protect me from myself...
>
> Thanks,

Why you use different name, you can use same name under different schema.
Also, actually you can write a procedure to compile all the invalid procedures.
It's not that clumsy to execute a procedure.

Michael Received on Sat Apr 05 1997 - 00:00:00 CST

Original text of this message

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