MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

image copy failing on check pending status

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
vmbigot
Beginner


Joined: 17 Jun 2004
Posts: 36
Topics: 14
Location: westminster, california

PostPosted: Fri Mar 30, 2007 11:12 am    Post subject: image copy failing on check pending status Reply with quote

We have a production backup job that uses a LISTDEF parm to include all tablespaces in a database that need to have an image copy created. See below for an example:
Code:
LISTDEF PCSYLIST INCLUDE TABLESPACE FDBEL.*           
                 INCLUDE TABLESPACE FDBHRS.*                   
                 EXCLUDE TABLESPACE FDBHRS.FTSHUGE   
                                                     
TEMPLATE PCSYTMPL DSN   'PC.SY.BKDISK.IC.&TS.(+1)'   
                  GDGLIMIT (25)                       
                                                     
COPY LIST PCSYLIST COPYDDN PCSYTMPL FULL NO           


The problem with this way of creating image copies is that if one tablespace has a check pending status against it, it fails with the following messages:
Code:
DSNU321I  -DB2P DSNUGDTC - CHECK PENDING ON TABLESPACE FDBMD.FTSPRSS PROHIBITS PROCESSING


From this point on no other tablespaces are backed up as the utility terminates with a return code 8. The manual states that the only resolution is to fix the table with a check pending status and rerun the utility. In a test database environment there could be many tablespaces with this status with no way of knowing which tablespace is in check pending status without displaying each one before executing the image copy utility!

Is there a way to continue to use the code provided above and still have the utility continue to the next tablespace without terminating?
_________________
Inside every older man is a young boy asking this question. What the heck happened?!?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Fri Mar 30, 2007 12:33 pm    Post subject: Reply with quote

vmbigot,

Can't you just issue "stop database" command before the image copy and restart them after you have finished the imagecopy?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vini_srcna
Beginner


Joined: 17 Jul 2005
Posts: 9
Topics: 0

PostPosted: Sat Mar 31, 2007 5:17 am    Post subject: Reply with quote

CHECK PENDING is a restricted state. If the tablespace is in CHKPND status it will not allow any DML issued against it.

I'm not sure, if the STOP DATABASE command can bring the tablspace back into normal state. I think you have to go for REPAIR or CHECK DATA utitlity which depends upon the importance of data. REPAIR would just reset the flag without checking the data.
_________________
Thanks,
Vinay Kumar,
IBM Certified DB2 UDB Database Administrator for Z/OS.
IBM Certified Application Developer for DB2 V8 Family.
Back to top
View user's profile Send private message
videlord
Beginner


Joined: 09 Dec 2004
Posts: 147
Topics: 19

PostPosted: Mon Apr 02, 2007 1:09 pm    Post subject: Reply with quote

Koluso,
IMAGE COPY is a DB2 online utility
Are you sure it can be run when tablespace in stopped mode?

And Stop and Start will not remove the CHKP status

vmbigot,
You should run check data utility first. If there are some RI confilist, you have to deal with it (may delete the inconsistant data)

Get the CHKP tablespace list by the following command:
-DIS DB(*) SP(*) RES(CHKP)
Back to top
View user's profile Send private message
vmbigot
Beginner


Joined: 17 Jun 2004
Posts: 36
Topics: 14
Location: westminster, california

PostPosted: Mon Apr 02, 2007 4:45 pm    Post subject: Reply with quote

I do thank everyone for their quick response to my post and your suggestions are very helpful.

However, the suggestions from you and IBM require manual intervention and repair before the backups run. These backup jobs run after hours with no operator intervention, so I am looking for a way to either bypass those tablespaces that have a check pending or other status that would cause an image copy to fail. So far the only way I can see to get around this is to create a script (using an example given in a reply to this post) that checks the status of all tablespaces in a database and outputs it to a flat file, edit that file and create EXCLUDE statements that would be concatenated to my SYSIN stream.

Do you agree or is there a better way?
_________________
Inside every older man is a young boy asking this question. What the heck happened?!?
Back to top
View user's profile Send private message
vini_srcna
Beginner


Joined: 17 Jul 2005
Posts: 9
Topics: 0

PostPosted: Tue Apr 03, 2007 12:09 am    Post subject: Reply with quote

Firstly, Why do you decide to compromise with the restricted states..?
All you have got to do is, to know why the tablespaces are in pending status.
What jobs are running before your image copy jobs..?
If there is any RI and was there any load jobs ran on those tables..?
There could be N no of reasons. When u do a load on parent table all of the child tables will go to check pending status.
Check constraints defined on the table would be another reason.

I think you have some work here. Some times just taking the image copy will not do.
_________________
Thanks,
Vinay Kumar,
IBM Certified DB2 UDB Database Administrator for Z/OS.
IBM Certified Application Developer for DB2 V8 Family.
Back to top
View user's profile Send private message
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Wed Apr 11, 2007 9:35 am    Post subject: Reply with quote

vmbigot,

I think what you essentially want is a way to skip over some items in a list when using LISTDEF. The ITEMERROR option will do that for you.

Here is the link -

http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db2.doc.ugref/cuoptns.htm

Regards,
Manas
_________________
There is no path to peace. Peace is the path.
- Mahatma Gandhi (1869-1948)
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
vmbigot
Beginner


Joined: 17 Jun 2004
Posts: 36
Topics: 14
Location: westminster, california

PostPosted: Thu Apr 12, 2007 10:52 am    Post subject: Reply with quote

Manas,

That is exactly what I was looking for. The ITEMERROR option worked perfectly.

In our test database environments, the programmers often leave their test tablespaces in a check pending status when they leave for the day. Our nightly batch cycle includes backups of all test databases and if one tablespace is left in a check pending status the backup would stop at that point, resulting in all tablespaces following it in the list to not get backed up. I would then have to log in, exclude the offending tablespace in the backup job, and then resubmit the backup job. This option alleviates the need to verify at the end of each day that developers have not left their test tables in odd states.

Again, thanks for your assistance!!! Mr. Green

vmbigot
_________________
Inside every older man is a young boy asking this question. What the heck happened?!?
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Apr 12, 2007 12:25 pm    Post subject: Reply with quote

vmbigot,

have you
  • told the programmers their tablespaces will not be backed-up if a table is in check pending status
  • provided them with a utility or instructions to change the check-pending status?

_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
vmbigot
Beginner


Joined: 17 Jun 2004
Posts: 36
Topics: 14
Location: westminster, california

PostPosted: Thu Apr 12, 2007 3:21 pm    Post subject: Reply with quote

Dick,

Yes to both. My developers are well aware that if they leave their tables in weird states that they will not be backed up. The first time they need to restore a table from the previous night's backup and they realize they don't have a valid copy will be a lesson well learned on the value of keeping things clean! Embarassed

Thanks,
vmbigot
_________________
Inside every older man is a young boy asking this question. What the heck happened?!?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group