Shrinking MS SQL Log file

Hi Team,

My Db is in simple recovery mode.  This is not PROD. So backups are not important for us.

What if i shrink .ldf files? will it cause fragmentation?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott PletcherSenior DBACommented:
No.  The log file is sequential and can't be fragmented.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Pawan KumarDatabase ExpertCommented:
Shrinking will increase fragmentation. Data that is moved to shrink a file can be scattered to any available location in the file. This causes index fragmentation and can slow the performance of queries that search a range of the index. To eliminate the fragmentation, consider rebuilding the indexes on the file after shrinking.

From Microsoft -
Scott PletcherSenior DBACommented:
Btw, you need only one log file.  Multiple log files would only be used sequentially anyway.  Log file(s) don't affect data file allocation in any way at all.
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

VijayAuthor Commented:
Hi Pawan,

You are right. But we are not shrinking data file.

We are only planning to shring .ldf filse?
Pawan KumarDatabase ExpertCommented:
>>We are only planning to shring .ldf filse?
For ldf there should not be any fragmentation issue. The above comment is for mdf files.
VijayAuthor Commented:
Excellent answer Scott.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.