on 01-28-2010 7:59 AM
Hi,
We are running db2 udb 9.5 wiht fixpack 2a and SP_BASIS 700 level 0020.
All records created before a certain date were deleted by mistake. We can get those records back from backups but how do we append those records?
Are there any tool i SAP for this, in in that case what format should the file with the records have?
or
Can we just append the records using db2 command line?
Hi Tomas,
did you delete records from one table only? If this is the case it should be possible to use DB2 EXPORT/IMPORT to restore the data from a restored backup to your productive database.
Before running the DB2 EXPORT and IMPORT utilities, you need to make sure that the correct codepage is set in your environment. Otherwise DB2 may perform unwanted codepage conversions. You can prevent codepage conversions by setting DB2CODEPAGE in your environment.
setenv DB2CODEPAGE 1208 on a unicode system
setenv DB2CODEPAGE 819 on a non-unicode system
The export command on your restored database looks like:
db2 "export to TAB.IXF of IXF select * from schema.table where timestamp < xxx "
The import command on your productive database looks like:
db2 "import from TAB.IXF of IXF insert into schema.table "
If the table contains LONG or LOB columns, the commands may become more complicated. You should use IXF format since the table may contain binary data.
Regards
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.