SQLCODE = -904, ERROR: UNSUCCESSFUL EXECUTION



IBM's flagship relational database management system

SQLCODE = -904, ERROR: UNSUCCESSFUL EXECUTION

Postby thiagorr » Wed Nov 26, 2008 9:47 am

Hi!
I'm creating 6 tables on a DB, with a few indexes and constraints...
When I'm almost finishing, I can't use nothing else on these tables!
Not the INSERT, neither INSERT commands are allowed!
This is the return when a try de SELECT command, for example:
DSNE610I NUMBER OF ROWS DISPLAYED IS 0                                         
DSNT408I SQLCODE = -904, ERROR:  UNSUCCESSFUL EXECUTION CAUSED BY AN           
         UNAVAILABLE RESOURCE. REASON 00C900A3, TYPE OF RESOURCE 00000200, AND
         RESOURCE NAME SMDB026 .SMTS026                                       
DSNT418I SQLSTATE   = 57011 SQLSTATE RETURN CODE                               
DSNT415I SQLERRP    = DSNXRRC SQL PROCEDURE DETECTING ERROR                   
DSNT416I SQLERRD    = 102  13172746  0  13223106  -974970878  12714050 SQL     
         DIAGNOSTIC INFORMATION                                               
DSNT416I SQLERRD    = X'00000066'  X'00C9000A'  X'00000000'  X'00C9C4C2'
DSNE618I ROLLBACK PERFORMED, SQLCODE IS 0                       
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0       
---------+---------+---------+---------+---------+---------+-----
DSNE601I SQL STATEMENTS ASSUMED TO BE BETWEEN COLUMNS 1 AND 72   
DSNE620I NUMBER OF SQL STATEMENTS PROCESSED IS 1                 
DSNE621I NUMBER OF INPUT RECORDS READ IS 4                       
DSNE622I NUMBER OF OUTPUT RECORDS WRITTEN IS 26                       


I tried to use the CHECK DATA utility, but I think I must be doing something wrong.
Could someone help me, please!
thiagorr
 
Posts: 12
Joined: Wed Sep 10, 2008 11:23 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DATA CHECK

Postby dick scherrer » Wed Nov 26, 2008 10:17 am

:? Hello,

I'm creating 6 tables on a DB, with a few indexes and constraints...
Were the tables created successfully? Post the output that shows the successful creaton of the tables.

When I'm almost finishing, I can't use nothing else on these tables!
What does this tell me :? Please clarify.

Not the INSERT, neither INSERT commands are allowed!
If you create table and do not insert any data, you will not be able to select any rows. The best you could hope for is a 100 sqlcode. . .

The -904 sounds like a load was running and failed. Or the load is still running.

Suggest you talk with the dba to get on the right track.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: SQLCODE = -904, ERROR: UNSUCCESSFUL EXECUTION

Postby thiagorr » Wed Nov 26, 2008 6:50 pm

So..
I've created a new table as a test with the following code:
CREATE TABLE ZCON026.TEST
(TESTVAR VAR(3),
NAME(VARCHAR(30),
PRIMARY KEY(TESTVAR))
IN SMDB026.SMTS026;

and that was successful.

But when I try to insert data, as below, I got the error message:

---------+---------+---------+---------+---------+---------+---------+---------+
INSERT INTO ZCON026.TEST                                                00010099
VALUES('001','THIAGO RIBAS');                                           00011099
---------+---------+---------+---------+---------+---------+---------+---------+
DSNT408I SQLCODE = -540, ERROR:  THE DEFINITION OF TABLE ZCON026.TEST IS       
         INCOMPLETE BECAUSE IT LACKS A PRIMARY INDEX OR A REQUIRED UNIQUE INDEX
DSNT418I SQLSTATE   = 57001 SQLSTATE RETURN CODE                               
DSNT415I SQLERRP    = DSNXOTL SQL PROCEDURE DETECTING ERROR                     
DSNT416I SQLERRD    = -550  0  0  -1  0  0 SQL DIAGNOSTIC INFORMATION           
DSNT416I SQLERRD    = X'FFFFFDDA'  X'00000000'  X'00000000'  X'FFFFFFFF'       
         X'00000000'  X'00000000' SQL DIAGNOSTIC INFORMATION                   
---------+---------+---------+---------+---------+---------+---------+---------+
DSNE618I ROLLBACK PERFORMED, SQLCODE IS 0                                       
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0                       
---------+---------+---------+---------+---------+---------+---------+---------+
DSNE601I SQL STATEMENTS ASSUMED TO BE BETWEEN COLUMNS 1 AND 72                 
DSNE620I NUMBER OF SQL STATEMENTS PROCESSED IS 1                               


Any idea?

Thanks again!
thiagorr
 
Posts: 12
Joined: Wed Sep 10, 2008 11:23 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SQLCODE = -904, ERROR: UNSUCCESSFUL EXECUTION

Postby dick scherrer » Wed Nov 26, 2008 10:33 pm

Hello,

Post the output from the create.

Did you look up the 540 in the db2 messages and codes manual?
http://publibz.boulder.ibm.com/cgi-bin/ ... /2.1.7.165?

This is what IBM says for the 540:
Explanation: The table named was defined with a PRIMARY KEY clause or a UNIQUE clause. Its definition is incomplete, and it cannot be used until a unique index is defined for the primary key (the primary index) and for each set of columns in any UNIQUE clause (the required unique indexes). An attempt was made to use the table in a FOREIGN KEY clause or in an SQL manipulative statement.


The link you should bookmark - you will use it frequently ;)
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: SQLCODE = -904, ERROR: UNSUCCESSFUL EXECUTION

Postby thiagorr » Wed Nov 26, 2008 11:08 pm

Hi dick!
Now the url is bookmarked!!

I fixed the problem!
I think could be some mistake on the craetion of a INDEX. What I thought strange was that all of my tables got "blocked"!
I droped the entire database at once and created it again, step by step.
Yesterday, I've dropped table by table..
Now it's working!

Thanks for your support!
TRR.
thiagorr
 
Posts: 12
Joined: Wed Sep 10, 2008 11:23 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SQLCODE = -904, ERROR: UNSUCCESSFUL EXECUTION

Postby dick scherrer » Thu Nov 27, 2008 10:51 am

Hello,

Now the url is bookmarked!!
When you click on the link, a new page is shown. Wile that page s shown, click on "Favorites" near the top of the page. When the dropdown appears, click "Add to favorites" and place the page in that favorites foldr. It won't take long and you'll have lots of favorites :) I re-organize mine rather often because of additions/changes.

Good to hear it is working - thanks for letting us know ;)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: SQLCODE = -904, ERROR: UNSUCCESSFUL EXECUTION

Postby thiagorr » Thu Nov 27, 2008 7:09 pm

Hi!
I think you underestood HOW.. but I wrote NOW!!! (related to bookmarks)
=D
That was funny!

Thanks for your time, anyway!
thiagorr
 
Posts: 12
Joined: Wed Sep 10, 2008 11:23 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SQLCODE = -904, ERROR: UNSUCCESSFUL EXECUTION

Postby dick scherrer » Fri Nov 28, 2008 3:47 am

You're welcome.

I think you underestood HOW..
Yup, i did. . Ooops :oops:

I need to read slower or buy stronger glasses :)
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post