My client's db2 9.7 database (approx. 350 GB) was taking about 3.5 hours to complete every night. Last week it started to take 10 to 11 hours to complete. The only thing that changed besides normal daily usage, is I cleared data from a 1.3 GB table by using this command:
ALTER TABLE schema.tablename ACTIVATE NOT LOGGED INITIALLY WITH EMPTY TABLE;
Could the sudden increase in backup time have anything to do with fragmentation? And if so, how can I tell, and how can I correct it. The database was originally created under 9.5 the upgraded to 9.7.
Insufficient information. What is the exact DB2-backup command line? Is the backup going to local-disks, or to a tape-library subsystem? What's the operating-system? What is the fixpack of 9.7? What messages are are the db2diag around the time of the backup? What messages are in the admin notification log. Basic problem determination stuff.
su - db2inst1 -c "db2 backup database dbname online to \"$BUDIR\" with 2 buffers buffer 1024 parallelism 1 COMPRESS include logs without prompting"
DB21085I This instance or install (instance name, where applicable:
"db2inst1") uses "64" bits and DB2 code release "SQL09077" with level
Informational tokens are "DB2 v22.214.171.124", "s121002", "IP23367", and Fix Pack
Product is installed at "/opt/IBM/db2/V9.7".
There are no messages in the db2diag or admin notification logs