How do I control or limit log file growing in SQL Server 2000 ?

My Log files occupied 20 GB. I could not shrink that file. so I detached the database and attached again.
It was just few days back.  size of the log file become just 570 kb.  Now it reaches 5,000,000 kb again.
How can I limit the growing?
Who is Participating?
bsharathConnect With a Mentor Commented:
you can restrict it graphically using SSMS or Enterprise Manager.
Right-click on the database name and select Properties.

Note, however, if you limit the size and it fills up, ALL modification
activity will instantly cease on that database.

You MUST backup the tlog in some form or another to flush committed
transactions from the log (or put the database in simple recovery mode).
Scripting is always better:
(of course change names and sizes to your own needs)

Hope this helps ...

USE [master]
MODIFY FILE ( NAME = N'Yveau_log', MAXSIZE = 102400KB )

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.