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

Answers were Sorted based on User's Feedback



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

Answer / deepak

-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.

Try to display the stats of the table and check if it is in
RW mode, If not use the required repair utility to get the
table to RW mode.

If the table is in RW mode then may be the underlying
dataset may have got deleted in that case we will need to
do a dummy load to get those created.

If that also doesnt work will need to drop and recreate the
objects from TABLESPACE level.

Ths above is for IBM DB2 for z/os. Correct me if Iam wrong

Is This Answer Correct ?    3 Yes 0 No

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

Answer / 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

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

Answer / guest

-904 is an unauthorised error.we can resolve it by calling
your remote server to give access

Is This Answer Correct ?    3 Yes 14 No

Post New Answer

More DB2 Interview Questions

What is the meaning concurrency in the db2 database?

0 Answers  


What is index in db2?

1 Answers  


Can a Db2 table data be retrived through JCL?

4 Answers  


what is the role of the cursor in db2?

0 Answers  


Could you please let me no the query for below I have table name xyx under this there is column name called employee name which starts from 100th column ends 120th column,now i want to replace only column from 101 to 104 which contains ABCS to replace with PQRS for all records which comes beetween 101 to 104 ..how to write query for this..

1 Answers   HSBC,






What is the maximum number of columns in a db2 table?

0 Answers   IBM,


what is sql abend code -801,-802?

2 Answers  


Explain what a plan is?

3 Answers   CTS,


What is the purpose of the WHENEVER statement?

1 Answers  


What does db2 mean?

0 Answers  


When do you specify the isolation level? How?

1 Answers  


assume ther are 5000 records in a database and want to fetch using cursor. cursor fetches only 3000 records and fetch is not happening for remaining 2000 records. why it happens and how to rectify it

1 Answers   TCS,


Categories