469,920 Members | 2,241 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,920 developers. It's quick & easy.

VB.NET - problem with SQL Commit and LDF file size

Hello

I have created an application that writes thousands of records to an MS SQL database. I am performing a Commit statement every 10000 records which keeps the LDF file at a reasonable size.

My problem is when Deleting records. The LDF size can grow to over 1GB in size which is not acceptable. I tried using a Delete from the top level table and relied on the Cascading Deletes to delete entries from the child tables. With a BeginTransaction and Commit before and after the command it still made no difference to the LDF size. I have also tried deleting each child table individually with a BeginTransaction and Commit before and after each one but the LDF just keeps growing.

The only way I can shrink the size of the LDF and MDF files is by using a DBCC ShrinkDatabase command, but in the production environment I won't have permission for that command.

I would really appreciate any assistance on this.

Thanks
James :confused:
Sep 1 '06 #1
0 1858

Post your reply

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

Similar topics

1 post views Thread by Steve Thorpe | last post: by
2 posts views Thread by Joseph Chase | last post: by
8 posts views Thread by Martin Staael | last post: by
2 posts views Thread by subman | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.