RE: Informix Online Table Recovery: How?
Posted in 1996
Depending on the size and the way the tables are laid out across =
dbspaces, an easier solution may exist.
In 7.x, dbspace level restore is supported through not only on-archive, =
but also ontape. If this may be useful, I suggest consulting TFM, in =
particular the "Archive and Backup Guide"
Jon
-----------------------------------------------------------------------
Jon C. Vemo
jvemo@cyberspace.com
Bothell, WA USA
----------
From: David Williams[SMTP:djw@smooth1.demon.co.uk]
Sent: Tuesday, August 20, 1996 1:30 PM
To: informix-list@rmy.emory.edu
Subject: Re: Informix Online Table Recovery: How?
In article <4v8mj2$u6t@netnews.upenn.edu>, John Eichelberger <jon@pathol
ogy.dental.upenn.edu> writes
>Scenario: A user has accidentally removed 20 rows from a table and =
needs
>to get them back. You are running Informix Online 7.12 with raw =
partitions
>(not cooked files).
>
>Question: How?
>
>Informix's suggestion was:
>(1) Save your whole db to a tape (I would be using level-0 onarchive).
>(2) Restore an archive that had the 20 rows that were lost.
>(3) Unload the 20 rows.
>(4) Restore the db you just dumped to tape.
>
>There has to be an easier way. Basically, what I am looking for is the
>ability to restore a single table, under a different name if possible.
>
>In Informix-SE with cooked files we would do the following:
>(1) Get a dbschema of the table currently in the database (e.g., =
realtab).
>(2) Change the name of the table (e.g., faketab) on the dbschema output =
file.
>(3) Create the table realtab using the dbschema's sql.
>(4) Restore the realtab.dat and realtab.idx file from a backup tape of =
the
> db to a scratch directory.
>(5) Rename (in a different directory) the realtab.dat and realtab.idx
> to faketab.dat and faketab.idx.
>(6) Move faketab.??? to the db directory and run bcheck on it.
>(7) Extract the data we want from faketab and put into realtab.
>(8) Drop faketab.
>
>So what about Online with raw partitions?
>
>Thanks.
>
>Jon Eichelberger
>P.S. Please don't tell me about something in a future release of =
Online.
Not possible since OnLine stores the data as chunks of raw disk with
it's own internal structure. i.e. tables are store in a propriertary
format. Informix's suggestion is correct - restore from backup to get
the rows back. To decode the contents of a level-0 archive and then
apply level-1's / level 2's on top would be a nightmare.=20
That is the price you pay for greater performance/ being able to
guarantee data gets written to disk.=20
Currently there is nothing available. Hhhm sounds like an idea for a=20
pet project!! Anyone know the format for an tbtape style archive??
Maybe I could write something to treat a level-0 archive as if it were a =
collection of chunks and dump a table to a file?
--=20
David Williams