DB2 sets tablespace as Backup Pending state after loading data into a table in linear logging database(that is, logretain or userexit is on), whatever the load is successful or failed. the reason is that the load process will not write log file. from the begin time of loading to the end time of loading, there will be a blank segment in log file, and the rollforward recovery can Not jump over the blank segment to apply the later log file.

so database needs a backup after loading to make sure db2 have recovery capicibility.

it's able to use [COPY YES|NO]  or [NONRECOVERABLE] to prevent tablespace go into Backup Pending state. COPY YES will do the backup automatically after loading, and COPY NO and NONRECOVERABLE will give up this backup that means db2 will be not able to recover the database once an serious error occured.


Thinking more

how if specified NONRECOVERABLE at load insert but not specified it at load terminate or load restart?

 

how if give an increamental backup instead of a full backup after tablespace goes into Backup Pending state by a loading? 

it is not allowed, you must give a full backup after going into Backup Pending state by a loading. but a full online backup works as well as a full offline backup.

a full tablespace backup doesn't works for above.

Commands reference 

$ db2 load client from "loadfile.del" of del insert into table_name [nonrecoverable | copy yes]

$ db2 load query table table_name to msgfile.txt

$ db2 load client from "loadfile.del" of del terminate into table_name [nonrecoverable | copy yes]

$ db2 load client from "loadfile.del" of del restart into table_name [nonrecoverable | copy yes]

[nonrecoverable | copy yes] to prevent the tablespace go into backup pending status after successful of failed load.
 

Post a comment

mail.png


相似文章|Related Entries

最近更新|Recent Entries

不定期更新|Handy Entries

相似标签|Related Tags

分类栏目|Categories

按月归档|By Month

2008
01
2007
12
10
07
06
05
04
03
02
01
2006
12
11
10
09
08
07
06
05
04
03
02
01
2005
11
10
09
08
07
04
03
2004
12
11
10
09
08
07
06
05
04
03
02
01
2003
12
10
09
08
06
2002
09
08
04
03
02
2001
12
09
07
06
05

站内链接|Site Links

Powered by
Movable Type 3.34