var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Dropped table recovery
db2 9.7 fp 9- DPF
OS : linux
accidentally table has been dropped from database. Can some guide me how to recovere the table without interrupting other tables in the tablespace. More than 100 tables are there in tablespace.
Please let me know if you need any more information.
Have you carried out the instructions in the documentation ?
Yes the tablespace is recoverable. But here my doubt is if we restore the tablespace whether it will be effect to other tables that are there in same tablespace ?
you can restore (entire db, or just the tablespace concerned) to a different DB if you want, then copy table content to real target table. Can restore to a different machine also. You can use (remote-)load-from-cursor to copy table content to the real environment if connectivity allows. Or use export and load otherwise.
Here my problem is there is no second database and there is no tsm setup in pre prod.
I need to do it right way in prod. Thats why I am just checking whethere is there any impact to other tables ? or any other way ? please guide me
If you do a tablespace restore, then of course all objects in that tablespace are impacted during the restore and the rollforward(s). Normally this means a service outage.
If HPU or DB2 Recovery-Expert is available, they can extract data from a backup image. Recovery-Expert can generate the redo SQL.
How about using db2adutl to extract the backup image from TSM to disk, move it to the pre-prod system, restore the tablespace and extract the data
As this is DPF.
1) use db2adult to extract the last backup image for all of the nodes to disk
2) copy the backup images to your DR / pre prod server
3) on DR perform a restore rebuild of the syscatspace and the tablespaces that your table and associated indexes reside in.
- create a new instance or use an existing instance with the same number of nodes
- perform a restore of your catalog parition first (usually node 0), but using the rebuild option.
db2 restore db mydb from /db2backups rebuild with tablespaces (syscatspace, data, indx)
- perform a restore of the remaining nodes
db2_all "<<-0< db2 restore db mydb from /db2backup rebuild with tablespaces(data, indx)"
4) Copy the logs for all the nodes from just before the drop table to the DR server
5) On the catalog node rollforward the database to a point in time to just before the drop table
6) Connect to the restore database on DR and export the data, and use db2look to generate the table DDL.