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

Error while INSERT with SQLCODE = -904


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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
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: 58
Location: home

PostPosted: Tue Jul 15, 2008 8:20 am
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
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: 1436
Location: Bangalore,India

PostPosted: Tue Jul 15, 2008 12:45 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Insert header record with record coun... DFSORT/ICETOOL 14
Search our Forums:

Back to Top