473,769 Members | 1,674 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

trigger with delete statement gives error "DIA8309C Log file was full."

we have a table with jobs and a table with job_history information.
Users can define jobs and let them run every X minutes/hours , like a
cronjob.

The jobs table has the following trigger:
CREATE TRIGGER JOBS_AFTER_DELE TE
AFTER DELETE ON JOBS
REFERENCING OLD AS o
FOR EACH ROW MODE DB2SQL
BEGIN ATOMIC
DELETE FROM JOB_HISTORY WHERE JOB = o.JOB;
END

When the job_history table contains very much rows for a given job
(say a job that has run every 30 min for the past 2 years), the log
file gets full (error DIA8309C). This gives an error with inconsistent
information, job_history entries for a job that doesn't exist anymore.

Is there an easy way to prevent this error? I was thinking of
deleting the rows in blocks of 100.000 and looping as long as rows
exist for the given job. Is this possible with a trigger, or is there
some better solution?

regards,
Jan831

Jun 5 '07 #1
1 3363
The logfile is becoming full, as the transaction size of the delete
performed by the trigger is greater than the log space available
(logfilsiz * (logprimary + logsecond).

There are several approaches you could take:
1) Increase the logspace available, by increasing logfilsiz,
logprimary and/or logsecond - are nay combination there of.
2) Enable infinite logging. The database must be enabled for
rollforward recovery for this and to enable set logsecond to -1.
3) Reduce the size of the transaction by committing at regular
intervals.

Cheers,
On Jun 6, 12:52 am, jan.mar...@gmai l.com wrote:
we have a table with jobs and a table with job_history information.
Users can define jobs and let them run every X minutes/hours , like a
cronjob.

The jobs table has the following trigger:
CREATE TRIGGER JOBS_AFTER_DELE TE
AFTER DELETE ON JOBS
REFERENCING OLD AS o
FOR EACH ROW MODE DB2SQL
BEGIN ATOMIC
DELETE FROM JOB_HISTORY WHERE JOB = o.JOB;
END

When the job_history table contains very much rows for a given job
(say a job that has run every 30 min for the past 2 years), the log
file gets full (error DIA8309C). This gives an error with inconsistent
information, job_history entries for a job that doesn't exist anymore.

Is there an easy way to prevent this error? I was thinking of
deleting the rows in blocks of 100.000 and looping as long as rows
exist for the given job. Is this possible with a trigger, or is there
some better solution?

regards,
Jan831

Jun 6 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1852
by: Silvia | last post by:
Hello I have a listview with images, and when I select one image I can delete the image, bu I produce an error, say "the process cannot access the file D:\imagesDicomitzador\142617379\image1.bmp because it is being used by another process", What is the problem? I user for delete de file IO.File.Delete("D:\imgesDicomitzador\142617379\image1.bmp" Thank Silvia
1
2296
by: Beryl Small | last post by:
I have a web application in Visual Studio.Net 2003. On the click event of a button on my .aspx page, I use the following FileCopy SourceFile, DestinationFil the Sourcefile is on a mapped drive (s:\) on the server it returns the error "File not found" even though the file is there. The same code in the same place works fine if the file is on the c:\ drive. Same code also works fine with the mapped server drive in .NET if a put it in a...
3
4059
by: Paul | last post by:
Is it possible to delete a file on a client side machine using VB/JAVA script? My website allows the user to upload a file to the website and after that I would like to delete the file on their machine I tried this: Set fso = CreateObject("Scripting.FileSystemObject") fso.DeleteFile("C:\1-1-S.xml")
4
3780
by: Michael K. | last post by:
Hi there I am having trouble deleting an uploaded file that I have just written to disc. I am using the SaveAs method of a HttpPostedFile to write the file to disc, then straight after I'm trying to use kill(FILE) to delete it. I get the error "The process cannot access the file "FILE.JPG" because it is being used by another process." If I use the Explorer-program to try and delete the file afterwards I get the error "Cannot delete...
3
1995
by: facicad | last post by:
I would like to know if as event before delete file exist. My probleme is with FileSystemWatch, it is only Deleted event, and went I want copy for bakup my file, the file do not exist :(
2
2266
by: TOI DAY | last post by:
Hi all, How can I delete the file on the server after the user download it? For example: I have file name "123.txt" on a server, I copy it to "ABC.txt", then allow uer download the "ABC.txt" file, then I try to delete file "ABC.txt", but I can not do it. I can delete the ABC.txt before I copy it.
3
1978
by: Parag Gaikwad | last post by:
Hi, I need to delete files across the network using web client (IE 6.x) in Win 2003 - IIS 6.0 environment. Can someone please suggest an approach I can use to acheive this. Will using FSO do the job or I have to go COM way. Thanks in advance. Parag
5
39049
by: wo20051223 | last post by:
Deleting some files with C# fails with "Access to the path 'X' is denied". I have files copied from a CD that I burned (and not locked by a process) and a text file that I created in Windows Explorer. I can delete all of them through Windows Explorer. I can programmatically delete the text file but not the others. Permissions: - All files have the same ACL.
4
4105
by: id10t error | last post by:
Hello, I am making a program that will not have an user interaction to delete certian files. I found this line of code. My.Computer.FileSystem.DeleteFile("C:\POLLJP.DWN", FileIO.UIOption.AllDialogs, FileIO.RecycleOption.DeletePermanently) The problem is that a message box comes up and asks "Are you sure you want to delete file"file name yes or no". Does anyone know a way around this. I want it to delete everytime no questions asked...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9994
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8870
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.