Hi,
I'm having a problem with my logsegment filling up, and I don't know why.
Background:
DB Device is 150 Megs, only about 15 Megs are used up
Truncate on Checkpoint is set
Log space is shared with DB
MS SQL Server version 6.5
Code basically moves records from one DB to another. Log is filling up in first DB (described above).
Code that causes the fill up (after 8 to 15 iterations):
DECLARE @ldformsrtn int, @ldmanrtn int, @ldacceptrtn int, @booknbr char(7)
DECLARE booklets SCROLL CURSOR FOR
SELECT LoadDB.dbo.booklet.booknbr
FROM LoadDB.dbo.booklet
WHERE ((reject <> 1) OR (reject IS NULL))
AND (acptmthd IS NULL)
OPEN booklets
FETCH FIRST FROM booklets INTO @booknbr
WHILE @@FETCH_STATUS <> -1
BEGIN
EXEC @ldmanrtn = ld_manualdata @booknbr
-- Just queries a table and sees if 5 vars are empty or not, no inserts,updates or deletes
EXEC @ldformsrtn = ld_forms @booknbr
-- Just queries 5 tables and sees if records exist or not, no inserts,updates or deletes
IF (@ldmanrtn = 0) AND (@ldformsrtn = 0)
EXEC @ldacceptrtn = ld_accept @booknbr
-- inserts up to 5 records into another DB structure
FETCH NEXT FROM booklets INTO @booknbr
END
CLOSE booklets
DEALLOCATE booklets
Things I have attepted:
Wrapping the ld_accept call in a BEGIN/COMMIT TRANSACTION layer
Forcing a CHECKPOINT after ld_accept call
Wrapping the code IN ld_accept in a BEGIN/COMMIT TRANSACTION layer
All of the above (at the same time)
Any suggestions?
Many Thanks,
Scot.
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only