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: Question-Synonym/View Definition Modifications

Re: Question-Synonym/View Definition Modifications

From: Jared Hecker <jared_at_hwai.com>
Date: 1997/03/27
Message-ID: <333abd3b.16175859@news.planet.net>#1/1

Wesley -

The problem, as you are well aware, is that you are trying to switch dependencies among objects without recompiling them. If a set of stored procedures were used for access and put together as a package, you could recompile the package body that provided table access without having to recompile the header.

 For example, you might cron a job that periodically recompiles the access s.p.'s to point to the desired table, A or A1. The app doesn't know the difference (thought you would have to rig up a mechanism to periodically quiesce the app until the package bodies were recompiled, but this is normally very quick), and you can then rebuild the table.

hth -

Regards,
jh

On Thu, 27 Mar 1997 08:18:25 -0500, "Wesley M. Stephens" <wms_at_ornl.gov> wrote:

>I have a situation where I need to perform a periodic reload of a set of
>tables. I am flush with disk space and I would like to keep two copies
>of each table - say A1 and A2. The tables have identical definitions.
>I would like for my applications to use the data in table A1 but to know
>the table as simply A. I realize I can use either a synonym (best
>choice) or a view to accomplish this.
>
>My problem is this. I want to completely reload the second table (A2)
>while my applications are using A1, and when the reload has been
>verified as being good, I want to redo the synonym or view to point to
>A2. In this manner the applications experience minimum "downtime"
>because of the reload. Of course when I redo the synonym or view
>definition virtually every object that references the synonym or view is
>marked as invalid, pending re-compiliation.
>
>Does anyone know how I can accomplish this "table rename" in a smooth
>manner? It is analagous to the ancient method of renaming master files
>after an update was performed on them - a simple thing to do with a file
>system but seemingly impossible with an Oracle database!
>
>Thanks for any help...
>
>-wesley
>
>--
>+-------------------------------------------------------------------+
>| Wesley M. Stephens Phone: (423) 576-1933 |
>| Lockheed Martin Energy Systems Fax: (423) 576-0099 |
>| P.O. Box 2009 Email: wms_at_ornl.gov |
>| 701 Scarboro |
>| Oak Ridge, Tennessee, 37831-8227 |
>+-------------------------------------------------------------------+
Received on Thu Mar 27 1997 - 00:00:00 CST

Original text of this message

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