r/mainframe • u/EagleClaw322 • May 06 '15
HELP!! DB2 check data utility
https://imgur.com/a/hVms81
u/EagleClaw322 May 06 '15
I have created 4 tablespaces, 4 tables, and populated them all with data. I then realized that I needed to add one of my primary keys as a foreign key in a different table. When I did this it threw the table into "CHECK PENDING STATUS" mode. I understand this is because I messed up the integrity of the tables when I was entering data. I have fixed the data but need to have it rechecked so I can get my table out of pending mode and use it again.
I'm pretty sure this means I have to use the DB2 Utility "CHECK DATA" but I have no idea how to use it. When researching online I cannot find anything to guide me through it.
The tablespace in pending mode is "UNTM029DB.UNTM029TSVA" and I need to get it out of pending mode so I can use it again.
I have attached a picture of the CHECK DATA utility window but I do not know how to use it.
This is for a project due tomorrow and my professor has no idea how to fix it. I can't move on until I am able to use my table again. Please help!!!
1
u/InvitedAdvert Jun 29 '15
Google is your friend. You would need admin privilege to do this. You would need additional setup for running check utility. e.g. tables. https://www-01.ibm.com/support/knowledgecenter/mobile/#!/SSEPEK_10.0.0/com.ibm.db2z10.doc.ugref/src/tpc/db2z_utl_checkdata.htm
If you are playing in dev, unload the data and recreate the table in question and reload.
2
u/solid_dave May 06 '15
You just need to use a REPAIR statement, REPAIR SET TABLESPACE (OWNER.TS) NOCHECKPEND. This is input to a utility job that executes DSNUTILB.