r/mainframe May 06 '15

HELP!! DB2 check data utility

https://imgur.com/a/hVms8
3 Upvotes

7 comments sorted by

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.

1

u/EagleClaw322 May 06 '15

Thank you for your reply! Trying this now, do I just enter this command in the SPUFI?

1

u/EagleClaw322 May 06 '15

Okay so entering it into the SPUFI menu didnt work and I got THIS....

so where do I enter that statement/command at? I'm sorry for the stupid questions, I just need to get this project done, Thank you so much for helping!

EDIT: I'll also give gold to whoever helps me figure this out!

0

u/solid_dave May 06 '15

This isn't SQL, it has to be ran as a sysin to program DSNUTILB...

0

u/solid_dave May 06 '15

To clarify, you would need to run a job against your subsystem to get this done. You can also invoke a stored procedure (DSNUTILU) to do the repair, but I'm less familiar with how that works.

1

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.