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

DB2 SQLCODE = -919 while trying to run my SP thru Java


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
maggiebms

New User


Joined: 23 May 2005
Posts: 16

PostPosted: Tue Oct 30, 2007 6:11 pm
Reply with quote

Hi All,

I faced SQLCODE = -919 sometimes while trying to run my SP thru Java online but the same SP is working fine some other time without doing anything. So I would like to know the reason why it is like that...

Waiting for your valuable replies....


Thanks,
Maggie J
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Oct 30, 2007 6:27 pm
Reply with quote

what does the friendly manual say ?

did You care to look ?

here is a link to the manual

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNC1K10/CCONTENTS?SHELF=DSNSHKA0&DN=GC18-9843-00&DT=20070131011436

and here is the link the page

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dsnc1k10/2.3?ACTION=MATCHES&REQUEST=-919&TYPE=FUZZY&SHELF=DSNSHKA0&DT=20070131011436&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT

and here is the excerpt regarding -919 status code

Quote:



-919 A ROLLBACK OPERATION IS REQUIRED

Explanation: The unit of work was placed in a state where a rollback operation is required. This can happen for the following reasons:

* An SQL statement updated a distributed database server, but the database server can be used only for read-only operations. Either updates are currently restricted to servers that support distributed two-phase commit and this application server does not support distributed two-phase commit, or updates are restricted to a single server that does not support distributed two-phase commit and this application server is not that server.

The unit of work must be terminated by a rollback operation because the update made (but not committed) at the application server cannot be committed consistently with other current or future updates made to this distributed unit of work.

* An abend occurred during the execution of a stored procedure, or a restricted SQL statement was issued from a stored procedure.

* An abend occurred during the execution of a function, or a restricted SQL statement was issued from a function.

* | The unit of work is part of a Global Transaction, and another unit of
| work in the Global Transaction has initiated a ROLLBACK. All units of
| work in the Global Transaction must now ROLLBACK.

System Action: In the IMS and CICS environments, all SQL statements are rejected until the rollback occurs. In the other environments, all SQL statements other than a static ROLLBACK are rejected until a static ROLLBACK is executed.

Programmer Response: Correct the application, function, or stored procedure, rebind it, and resubmit the job.

SQLERRP contains the name of the module that detected the previous failure and placed the application in the must-abort state.

SQLSTATE: 56045
Back to top
View user's profile Send private message
ashwinreddy

Active User


Joined: 16 Sep 2004
Posts: 106
Location: Hyderabad

PostPosted: Tue Oct 30, 2007 6:33 pm
Reply with quote

Hi,

Its my guess that Normally this happens when the database is down, so we have to start the database again. As i have faced many times while execting my SP through Mainframes.

For your case when the database is down or resource unavaliable, it abends with -919 (SQLCODE -919, Error: A ROLLBACK OPERATION IS REQUIRED).

Once you got the abend, restart the database (which normally DBA does) and i am sure it should work fine.

Hope this Helps

Cheers
Ashwin
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Oct 30, 2007 6:40 pm
Reply with quote

Quote:
... when the database is down or resource unavaliable...


usually in that case You get a -904
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 Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Using Java/C/C++ to retrieve dataset ... Java & MQSeries 6
No new posts building java class with zip4j.jar on... Java & MQSeries 0
No new posts Java and mainframe. General Talk & Fun Stuff 0
No new posts SQLCODE = -122 while using the scalar... DB2 4
Search our Forums:

Back to Top