We are trying to use the DB2 Load function for our tables and often get problems with the jobs hanging. Looking at the db2 log:
Code: Select all
Type = LOAD
Database Name = DEDW
Partition Number = 0
Description = OFFLINE LOAD ASC AUTOMATIC INDEXING INSERT COPY NO EDW_IDS_DVP.PARTY
Start Time = 16-03-2007 12:53:44.246125
State = Executing
Invocation Type = User
Progress Monitoring:
Phase Number = 1
Description = SETUP
Total Work = 0 bytes
Completed Work = 0 bytes
Start Time = 16-03-2007 12:53:44.246141
Phase Number [Current] = 2
Description = LOAD
Total Work = 0 rows
Completed Work = 0 rows
Start Time = 16-03-2007 12:55:20.725991
Phase Number = 3
Description = BUILD
Total Work = 2 indexes
Completed Work = 0 indexes
Start Time = Not Started
Code: Select all
DB_IDS_Table_ins,0: DB2 Load Binary Error.
DB_IDS_Table_ins,0: SQLCODE = -911; SQLSTATE=40001/data/edw/Ascential/DataStage/Scratch
DB_IDS_Table_ins,0: SQL0911N The current transaction has been rolled back because of a deadlock or timeout. Reason code "68". SQLSTATE=40001
My question is, what is the best way to check if a dataset has data in it, and then use that to control whether a load job runs?
Pre-warning, we are already trying to use with limited success the dsrecords command to evaluate datasets. All this returns is a warning that the dataset does not exist, when we can clearly find it and browse it using Dataset Management...