View previous topic :: View next topic
|
Author |
Message |
lakshmipathik
New User
Joined: 14 Oct 2005 Posts: 0 Location: bangalore
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
ashok_uddaraju
New User
Joined: 21 Feb 2007 Posts: 72 Location: US
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
skkp2006
New User
Joined: 14 Jul 2006 Posts: 93 Location: Chennai,India
|
|
|
|
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 |
|
|
|