Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Error while INSERT with SQLCODE = -904

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
mailsaurabh.tripathi

New User


Joined: 22 May 2008
Posts: 56
Location: hyderabad

PostPosted: Mon Jul 14, 2008 12:43 pm    Post subject: Error while INSERT with SQLCODE = -904
Reply with quote

WHEN I' TRYING TO INSERT DATA IN MY TABLE, I'M GETTING FOLLOWING ERROR:

DSNT408I SQLCODE = -904, ERROR: UNSUCCESSFUL EXECUTION CAUSED BY AN
UNAVAILABLE RESOURCE. REASON 00C900A3, TYPE OF RESOURCE 00000200, AND
RESOURCE NAME DEDBS01 .STU



STU IS MY TABLESPACE, which is existing< even the table is existing
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Jul 14, 2008 12:50 pm    Post subject:
Reply with quote

This is a theme that has many many threads in this forum.

you need to look at the reason code.

Besides, if the table did not exist, you would have received a different message.
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Mon Jul 14, 2008 4:35 pm    Post subject: Reply to: PROBLEM IN INSERT
Reply with quote

I guess your tablespace or index space is check pending status. You have to reset the checkpending flag

Try this in a JCl you should be getting rid of this error

SET TABLESPACE dbname.tsname NOCHECKPEND
Back to top
View user's profile Send private message
ruodeer

New User


Joined: 06 Jul 2007
Posts: 59
Location: home

PostPosted: Tue Jul 15, 2008 8:20 am    Post subject:
Reply with quote

you can use DB2 command -DIS DATABASE(yourdatabase) to show what the status your tablespace is ,then you will find your TS is in abnormal status due to your resource is unavailable.
Back to top
View user's profile Send private message
sriram.mukundan

New User


Joined: 20 Nov 2007
Posts: 28
Location: chennai

PostPosted: Tue Jul 15, 2008 10:24 am    Post subject:
Reply with quote

Hi,

pls use option 7 ( db2 commands) and enter the following command.

Quote:
-DISPLAY DATABASE(DBname) SPACENAM(Spacename)


Ruodeer also mentioned the same. It is Image copy pending state ( Check pending status RECAP )

The following status will be available once u issue the command:

Code:
DSNT360I  -TDB2 ***********************************                   
DSNT361I  -TDB2 *  DISPLAY DATABASE SUMMARY                           
                *    GLOBAL                                           
DSNT360I  -TDB2 ***********************************                   
DSNT362I  -TDB2     DATABASE = DATABASE NAME  STATUS = RW,RECP         
                   DBD LENGTH = 4028                                   
DSNT397I  -TDB2                                                       
NAME     TYPE PART  STATUS            PHYERRLO PHYERRHI CATALOG  PIECE
-------- ---- ----- ----------------- -------- -------- -------- -----
Spacename     TS         RW,RECP
                                                 
******* DISPLAY OF DATABASE DBANAME ENDED      **********************
DSN9022I  -TDB2 DSNTDDIS 'DISPLAY DATABASE' NORMAL COMPLETION         
***   



if its RECP mode, then either you can stop the Database and Start database if the DB is meant for testing purpose.

we also had the same issue, we did this only. it was working fine.. but Stop of a database will take more time.

before Stopping the DB pls Ensure that whether the tables are not used by anyone and it is not being used by anyprogram.


Another way is you can drop the tabel, create the table in the TS by specifying the option NOCHECKPEND

I hope this information will help you.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Tue Jul 15, 2008 12:45 pm    Post subject:
Reply with quote

Ram,

Quote:
if its RECP mode, then either you can stop the Database and Start database if the DB is meant for testing purpose.


In my day to day DBA BAU activities, I always recovered the TS.

I never knew, stopping and starting the DB will resolve this. Thanks for the 'wrong' guidance.

Quote:
before Stopping the DB pls Ensure that whether the tables are not used by anyone and it is not being used by anyprogram.

Do you think this is possible when TS is recp.

Quote:
Another way is you can drop the tabel, create the table in the TS by specifying the option NOCHECKPEND

Good idea to DROP a 'live' table. Try it in your shop once.

Quote:
I hope this information will help you.

No is my answer.
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Tue Jul 15, 2008 1:58 pm    Post subject: Reply to: Error while INSERT with SQLCODE = -904
Reply with quote

Hey,

If you DB admin previlage you can easily reset the checking pending flag through a JCL or your DB adminstrators can easily make it for you.
Back to top
View user's profile Send private message
sriram.mukundan

New User


Joined: 20 Nov 2007
Posts: 28
Location: chennai

PostPosted: Tue Jul 15, 2008 3:41 pm    Post subject:
Reply with quote

Hi Murali,


Quote:
I never knew, stopping and starting the DB will resolve this. Thanks for the 'wrong' guidance.
icon_eek.gif

I'm not misguiding or giving a wrong suggestion. I told very specifically if the TS contains only one table and only one TS available for the DB you can Stop and Start again.

Because i had the same issue last week, one of my friend in this forum helped me saying to Stop the DB and start it again. It was working fine. then i can able to insert or update or what ever may be. since we have only table in that database only one table space. so we did like that. Do you think he misguided me.??

Quote:
Good idea to DROP a 'live' table


I told very specifically in the beginning if your using for testing purposes you can drop the table and try it once.

or else you can even use this JCL to remove the RECP mode.
Code:
//*------------------------------------------------------
//* JCL FOR REMOVING COPY PENDING STATUS OF A TABLE     
//*------------------------------------------------------
//COPY   EXEC DSNUPROC,SYSTEM='SYSTEMNAME'                     
//SYSIN  DD *                                           
LISTDEF  COPYLIST  INCLUDE TABLESPACE DBNAME.SPACENAME
COPY LIST COPYLIST COPYDDN(XXXCOPY)                     
                   SHRLEVEL(CHANGE)                     
/* 


Or even you can use the following commands in option 7 ( db2 commands)

-Dis util(*)

It will give the UTILID.
and then you can use the following command

-TERM util(utilid)


Hope this information helps.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts INVOKE WEBSERVICE error danik56 CICS 11 Thu Mar 09, 2017 11:52 am
No new posts Row not found Sql error GaganGarg DB2 7 Tue Mar 07, 2017 6:29 am
No new posts DB2 SQL Error: SQLCODE=-440, SQLSTATE... kishpra DB2 1 Sat Feb 18, 2017 2:31 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us