Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Renaming a table on-the-fly

RE: Renaming a table on-the-fly

From: H, Linda <lindah_at_epocrates.com>
Date: Wed, 6 Dec 2000 10:45:31 -0800
Message-Id: <10702.123817@fatcity.com>


This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01C05FB4.B63056F0
Content-Type: text/plain;

        charset="iso-8859-1"

Could a snapshot replace the rename process? Both tables would be available at all times, and the snapshot delta update could be executed every few minutes/hours, as required.

Regards, Linda
-----Original Message-----
From: Kirsch, Walter J, PERSCOM [mailto:kirschw_at_hoffman.army.mil] Sent: Wednesday, December 06, 2000 8:31 AM To: Multiple recipients of list ORACLE-L Subject: Renaming a table on-the-fly

Oracle 8.1.6 on HP-UX 11.0

The application requirements demand that I refresh a medium sized table (2,000,000 rows) once a day. The refresh is a complete replacement. The on-line table is subject to inserts, but not updates, by the application during normal operations.

I have two versions of the table: one is on-line; the other is off-line and the target of the refresh. When the refresh is complete, I "swap" the tables by re-pointing the alias from the on-line table to the off-line table. (Actually, I rename the tables, because the application doesn't understand aliases.)

The application manager wants me to accomplish the swap without bringing the database down, but I'm concerned about errors during the swap:

Any suggestions on how to accomplish this would be appreciated.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Kirsch, Walter J, PERSCOM
  INET: kirschw_at_hoffman.army.mil

------_=_NextPart_001_01C05FB4.B63056F0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2650.12">
<TITLE>RE: Renaming a table on-the-fly</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Could a snapshot replace the rename process?&nbsp; =
Both tables would be available at all times, and the snapshot delta = update could be executed every few minutes/hours, as required. =
</FONT></P>

<P><FONT SIZE=3D2>Regards, Linda </FONT>
<BR><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Kirsch, Walter J, PERSCOM [<A =
HREF=3D"mailto:kirschw_at_hoffman.army.mil">mailto:kirschw_at_hoffman.army.mil=
</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Wednesday, December 06, 2000 8:31 AM</FONT>
<BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT>
<BR><FONT SIZE=3D2>Subject: Renaming a table on-the-fly</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Oracle 8.1.6 on HP-UX 11.0</FONT>
</P>

<P><FONT SIZE=3D2>The application requirements demand that I refresh a =
medium sized table</FONT>
<BR><FONT SIZE=3D2>(2,000,000 rows) once a day.&nbsp; The refresh is a =
complete replacement. The</FONT>
<BR><FONT SIZE=3D2>on-line table is subject to inserts, but not =
updates, by the application</FONT>
<BR><FONT SIZE=3D2>during normal operations.</FONT>
</P>

<P><FONT SIZE=3D2>I have two versions of the table: one is on-line; the =
other is off-line and</FONT>
<BR><FONT SIZE=3D2>the target of the refresh.&nbsp; When the refresh is =
complete, I &quot;swap&quot; the</FONT>
<BR><FONT SIZE=3D2>tables by re-pointing the alias from the on-line =
table to the off-line</FONT>
<BR><FONT SIZE=3D2>table. (Actually, I rename the tables, because the =
application doesn't</FONT>
<BR><FONT SIZE=3D2>understand aliases.)</FONT>
</P>

<P><FONT SIZE=3D2>The application manager wants me to accomplish the =
swap without bringing the</FONT>
<BR><FONT SIZE=3D2>database down, but I'm concerned about errors during =
the swap:</FONT>
<BR><FONT SIZE=3D2>&nbsp; - inserts just before the rename might cause =
the rename to fail</FONT>
<BR><FONT SIZE=3D2>&nbsp; - renames just before the insert might cause =
the insert into the wrong</FONT>
<BR><FONT SIZE=3D2>table</FONT>
</P>

<P><FONT SIZE=3D2>Any suggestions on how to accomplish this would be =
appreciated.</FONT>
</P>

<P><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Please see the official ORACLE-L FAQ: <A =
HREF=3D"http://www.orafaq.com" = TARGET=3D"_blank">http://www.orafaq.com</A></FONT>
<BR><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Author: Kirsch, Walter J, PERSCOM</FONT>
<BR><FONT SIZE=3D2>&nbsp; INET: kirschw_at_hoffman.army.mil</FONT>
Received on Wed Dec 06 2000 - 12:45:31 CST

Original text of this message

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