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

Regarding Commit


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

New User


Joined: 14 Oct 2005
Posts: 0
Location: bangalore

PostPosted: Tue Nov 25, 2008 2:31 am
Reply with quote

Hi,
Current Process -
"We have one job in the production which is deleting some records from one table (Ex. A). Now after deleting each record from table 'A' we are doing COMMIT. Now the problem due to Referential Integrity, approximately 15,000 entries were deleted (a single delete from table 'A' causes deletes from 5 other tables because of 'on delete cascade' effect)


PROBLEM - On the Maintenance weekend the Operations had some issues shutting down DB2 for maintenance. The job did not commit for over 10,000,000 log writes.

Could anyone please suggest the solution for this problem.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Nov 25, 2008 2:45 am
Reply with quote

Hello,

There is typically no good reason to issue a commit after every delete.

Indeed, unless restart/recovery has already been incorporated into the process, there is probably no reason to issue a commit at all.
Back to top
View user's profile Send private message
ashok_uddaraju

New User


Joined: 21 Feb 2007
Posts: 72
Location: US

PostPosted: Tue Nov 25, 2008 1:00 pm
Reply with quote

I guess the as you are shutting down the system, it would anuhow be an auto commit at that stage.

No need to additional commits
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Nov 25, 2008 10:13 pm
Reply with quote

Hello,

FWIW - with a very long-running process there may be shut-down timing issues with or without commits.

It sounds like you need to schedule things so that the long-running delete is run after the maintenance window.
Back to top
View user's profile Send private message
skkp2006

New User


Joined: 14 Jul 2006
Posts: 93
Location: Chennai,India

PostPosted: Wed Nov 26, 2008 10:54 am
Reply with quote

Lakshmi Pathi,

In such a scenario DBA should be consulted for the recovery processes. I guess the job has to be restarted with Restart=phase and DB2 will take care of the rest of the activities from the active logs in the system. Please refer the following link....

Normal restart and recovery


Syam
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 filter COMMIT/ROLLBACK statements DFSORT/ICETOOL 13
No new posts Commit limit for Delete query through... DB2 10
No new posts Commit a DB2 Table on Unix Server and... DB2 3
No new posts Need information on DB2 COMMIT DB2 9
No new posts DB2 Commit thru Xpediter DB2 4
Search our Forums:

Back to Top