IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

START DATABASE command error


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Rijit

Active User


Joined: 15 Apr 2010
Posts: 168
Location: Pune

PostPosted: Wed Apr 27, 2011 7:09 pm
Reply with quote

Although the below start database step did not run successfully but still the step gave a return code of 0. I have given the JCL for the step below and also the erro message we got in the log.

The JCL for the step is below:

40 //START002 EXEC STARTDB,
// AC=FORCE,
// DB=IA0042I,
// SYSTEM=DSN,
// TS=WTA1
41 XXSTARTDB PROC SYSTEM='#',DB='#',TS='#',AC='#'
42 XXSTARTDB EXEC PGM=IKJEFT01,DYNAMNBR=20,
XX PARM='STARTDB SYSTEM(&SYSTEM) DB(&DB) TS(&TS) AC(&AC)'
IEFC653I SUBSTITUTION JCL - PGM=IKJEFT01,DYNAMNBR=20,PARM='STARTDB
AC(FORCE)'
43 XXSYSPROC DD DISP=SHR,DSN=DBA1.CMDLIB
44 XXSYSTSPRT DD SYSOUT=*
45 XXSYSUDUMP DD SYSOUT=P
46 XXSYSTSIN DD DUMMY
//*

The step completed with return code 0 see below:
JES2 ALLOCATED TO SYSUDUMP
DMY ALLOCATED TO SYSTSIN
POP2050D STARTDB START002 - STEP WAS EXECUTED - COND CODE 0000
DBA1.CMDLIB KEPT

But we have an error in the log and the table was left in the copy pending status only and was not reset to RW status. See below log info:

---------------ERROR MESSAGE----------------------

-START DATABASE(IA0042I) SPACENAM(WTA1) ACCESS(FORCE)
DSNI002I - DSNISTFO UNABLE TO START
OBJECT-TYPE 00000200
OBJECT-NAME IA0042I .WTA1
REASON 00C900A8
TYPE 00000200
NAME IA0042I .WTA1
DSN9023I - DSNTDDIS 'START DATABASE' ABNORMAL COMPLETION
-DISPLAY DATABASE(IA0042I) SPACENAM(WTA1) LIMIT(*) LOCKS
DSNT360I - ***********************************
DSNT361I - * DISPLAY DATABASE SUMMARY
* GLOBAL LOCKS
DSNT360I - ***********************************
DSNT362I - DATABASE = IA0042I STATUS = RW
DBD LENGTH = 16142
DSNT397I -
NAME TYPE PART STATUS CONNID CORRID LOCKINFO
-------- ---- ----- ----------------- -------- ------------ ---------
WTA1 TS RW,COPY
******* DISPLAY OF DATABASE IA0042I ENDED **********************
DSN9022I - DSNTDDIS 'DISPLAY DATABASE' NORMAL COMPLETION
END
READY
END

Please advise what has caused the step to have a return code 0 although it was not successful. And what might have caused this issue.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Wed Apr 27, 2011 8:15 pm
Reply with quote

The command was run under IKJEFT01, the TSO terminal monitor program. IKJEFT01 did not fail, so the RC was zero. It does not care that the command failed. Search the archives; there have been many threads on the topic of return codes and IKJEFT01.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Apr 27, 2011 8:20 pm
Reply with quote

I think the much bigger issue is why is there not a process in place to check for this event, maybe looking for one of the messages:

DSNI002I - DSNISTFO UNABLE TO START
DSN9023I - DSNTDDIS 'START DATABASE' ABNORMAL COMPLETION

and taking an appropriate course of action.
Back to top
View user's profile Send private message
Rijit

Active User


Joined: 15 Apr 2010
Posts: 168
Location: Pune

PostPosted: Wed Apr 27, 2011 8:29 pm
Reply with quote

DSNI002I :

The resource identified could not be started because it was unavailable.
The resource could be a database, a table space, an index space, or a
partition within a table space or an index space.

In our case it was a table space IA0042I .WTA1 which was held by some other job or user as implied by the reason code 00C900A8

00C900A8 :
The table space, index, or partition could not be started because of a
failure to acquire the lock. Activity on the table space, index, or
partition must quiesce before the START DB ACCESS(FORCE) command can acquire the necessary lock.

But I am facing 2 challenges here:
======================

1. How to make sure that this type of error does not happen. i.e. Need a mechanism to check if the START DB command fails I am able to track it. The return code is zero. I would be glad if anyone can advise on this.

2. Unable to find out what was holding up the tablespace when the START DB command was run which caused the command to fail

Any suggestions are most welcome icon_smile.gif

Thanks,
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Apr 27, 2011 9:14 pm
Reply with quote

104 posts and you still are talking instead of reading.
don leahy pointed out something very important,
which would allow you to easily implement what keven suggested.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Apr 27, 2011 9:22 pm
Reply with quote

Place to start with...

publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db2.doc.codes/src/tpc/00c900a8.htm
Back to top
View user's profile Send private message
Rijit

Active User


Joined: 15 Apr 2010
Posts: 168
Location: Pune

PostPosted: Wed Apr 27, 2011 11:01 pm
Reply with quote

I am nt understanding icon_confused.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
Search our Forums:

Back to Top