Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 LDF File size increase

Author  Topic 

abhit_kumar
Posting Yak Master

147 Posts

Posted - 2010-06-02 : 03:32:19
Hello Experts,

While ceating database we have one mdf and one ldf file has been created.
When doing certain operation like insert update delete in application,at that time LDF size has been get increased and after completion its went into normal size.

I want to know is there any limitation LDF file size?

Because i have notice if im doing some operation in application side then udf size get increased tremendoulsy up to 4 GB and then that task not completed.

Please guide me about the LDF file, so that i can get about the conclusion about my problem.

Regards,
AKM

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2010-06-03 : 18:49:16
There is an absolute maximum size of two terabytes but you can set the upper limit yourself to a lower number or even turn off file growth for the log file. The log file (.ldf) holds everything needed to roll back transactions so it can get large if you have large transactions or many transactions. It will continue to grow until you perform a backup of the log.

=======================================
A couple of months in the laboratory can save a couple of hours in the library. -Frank H. Westheimer, chemistry professor (1912-2007)
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-06-03 : 19:16:20
If the LDF file goes back to its "normal size", then it sounds like you've got autoshrink enabled, which is not recommended.

How big is the MDF file?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

abhit_kumar
Posting Yak Master

147 Posts

Posted - 2010-06-04 : 00:31:51
3 GB
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-06-04 : 15:12:22
Is the LDF growing as a result of rebuilding indexes (ALTER INDEX job or Optimizations maint plan)? Or is it due to long-running transactions?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

abhit_kumar
Posting Yak Master

147 Posts

Posted - 2010-06-05 : 05:53:50
its due to long running transaction...
please guide
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-06-05 : 13:13:05
Depending upon what it's doing, you could break it up into smaller batches. Such as for daily purging of data, we break up ours into 5000-10000 batches. We just keep looping until it's done. It helps manage the transaction log size plus doesn't escalate to a table level lock.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

abhit_kumar
Posting Yak Master

147 Posts

Posted - 2010-06-10 : 01:15:35
Thanks TK.

But since im new in adminstration side, can you please let me expalin the step by step process which you have mentioned above, it will be really helpful for me.

Regards,
AKM
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-06-10 : 01:18:29
Here's an old example using ROWCOUNT. These days I use TOP instead.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -