RE: How do I restore a single table?
Posted in 2000
Other solution which is slightly complicated and time consuming is to
restore the database on some other system and then unload that table
and load it back on to the desired db.
Vivek Chaudhary
______________________________ Reply Separator _________________________________
Subject: RE: How do I restore a single table?
Author: sblack (sblack@elsouth.com) at internet
Date: 5/23/00 7:32 AM
-----Original Message-----
From: sleesingchan@my-deja.com [mailto:sleesingchan@my-deja.com]
Sent: Tuesday, May 23, 2000 9:02 AM
Posted To: informix
Conversation: How do I restore a single table?
Subject: How do I restore a single table?
Hello,
Does anyone know of an easy way to restore a single table from an
Informix ontape backup?
[SB] Is the table in question the only one in a particular dbspace? If
so, I'm pretty sure you can restore just one dbspace (though I've never
tried it). If not, I don't know of a way with your current backup other
than the method you've suggested. But perhaps I can suggest a method
for going forward. See below.
[clipped]
I can't believe that Informix has overlooked this very important task.
[SB] The problem with restoring a single table is data integrity.
Informix has no way of knowing if restoring a single table to some prior
point would violate any constraints. (It almost certainly would)
How have others been coping with this shortcoming (by Informix)?
[SB] That having been said, I have had the need to do this same sort of
thing. In fact, I have to restore our customer table now to retrieve a
single record that someone has deleted. I don't know of any method
Informix has for this (assuming you have more than one table in a
dbspace). So I have written a simple script that does a select from
systables to get every table name, and then does an 'unload' to disk of
each table it finds (I could send the code if you're interested, but
it's really very simple). It compresses each table as it goes to save
space. Each week when I do a system backup, these tables are copied to
tape. So I can (and have to for the example above) go back as many
weeks as I want, restore the table.Z file, uncompress it, grep for
whatever record(s) I need, and 'load' it (them) back into the database.
Depending on the size of your database(s), this could be cumbersome to
do in a timely manner. But it can be a life saver if you can manage it.
HTH
[clipped]
Sent via Deja.com http://www.deja.com/
Before you buy.