What is -904 sql code? How to resolve it?

Answer Posted / balne

When querying or retrieving items or importing new items,
the library server returns [LS RC = 7015, SQL RC = -904]

DGL5050A: SQL error executing query. XQPE query: /ITA
[@SEMANTICTYPE
BETWEEN 1 AND 2].
Return code: 7015. Reason code: 0. Extended return code: -
904.
Extended reason code: 0.
(STATE) : [LS RC = 7015, SQL RC = -904] There is also a
warning in the library server log:

< DSNT404I SQLCODE = 162, SQLSTATE = >
ICMPLSCP handleForeignKeys 06174 03/09 06:25:24.457 GMT
;09045111471478 16:10285a68c22:X7ea2 IFVTE WARNING--
Please perform CHECK DATA command on z/OS.
Possible cause
When adding a foreign key to an existing component type
table (ICMUTnnnnnsss), SQLCode 162 is returned. DB2® places
a table space into CHECK PENDING state if:

Any table in that table space has ever been populated at
any time.
A foreign key is added or modified for any table in the
table space.
The library server performs and commits the foreign key
creation. However, a warning message is written to the
library server log to remind you to run the CHECK DATA DB2
utility so that tables and views in this table space can be
accessed.

Action
Perform the CHECK DATA command: CHECK DATA TABLESPACE
DATABASE NAME TABLESPACE NAME

Additional information

DB2 messages:

SQLCode 162
+162 TABLESPACE database-name.tablespace-name HAS BEEN
PLACED IN CHECK PENDING
Explanation: The indicated table space is in check pending
status because the ALTER TABLE statement was used to
specify a referential constraint or a check constraint
(while special register CURRENT RULES = 'DB2') on a
populated table. The table space is not generally available
until the check pending status is removed from the table
space.

System Action: The table space was placed in check pending
status.

Programmer Response: Run the CHECK DATA utility. The
enforcement of the referential constraint or the check
constraint is deferred until the CHECK DATA utility is run.

SQLCode -904
-904 UNSUCCESSFUL EXECUTION CAUSED BY AN UNAVAILABLE
RESOURCE. REASON reason-code, TYPE OF RESOURCE resource-
type, AND RESOURCE NAME reason-name
Explanation: The SQL statement could not be executed
because resource resource-name of type resource-type was
not available at the time for the reason indicated by
reason-code.

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which component is responsible for processing sql statements and selecting access paths?

650


Where can you declare a cursor in a cobol-db2 program?

598


What does sqlcabc has?

625


by using cursors , we can access particular records from the table based on some condition, i want to delete those selected records, how can we write a query for this in the program?

7478


What does runstats do in db2?

602






Is db2 free?

678


What is dclgen (declaration generator)?

593


How would you find out the total number of rows in a db2 table?

571


What is the physical storage length of the data types: date, time, timestamp in the db2 database?

636


Explain the function of data manager.

630


What kind of database is db2?

565


If anyone has IBM Certification Dumps pls forward to me & also let me know what are the Certification Codes that are available in DB2

1568


What is reorg and runstats in db2?

683


What is schema in db2?

571


Which isolation level provides highest data integrity?

588