By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,918 Members | 622 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,918 IT Pros & Developers. It's quick & easy.

Rollback with atomic block

P: 9
Hi All

I wrote SP with number of delete commands in an atomic block.And there is a possibility of deleting records from parent table before child table so I wrote a handler to handle the that handler I am using the ROLLBACK to rollback all the records which were deleted if any exception occurs.

THE PROBLEM IS: It is working fine, if the deleting records size is small.but if i tried to delete thousands of records(lorge size) it is giving the following error

SQL0774N The statement cannot be executed within an ATOMIC compound SQL statement.

A COMMIT or ROLLBACK statement was encountered within the context of an ATOMIC compound SQL statement. These statements are not allowed in this context.
User Response:
Remove the COMMIT or ROLLBACK statement or change the context so that it is not an ATOMIC compound statement
Mar 26 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.