Hey - got a question.
We use Microsoft Dynamics GP as our ERP system, with a SQL 2005 back end.
Almost since we upgraded (a few months ago), it seems the log file of the database grows exponentially. The database is only 13GB in size, but, to give you an example, after 2 days, the log file is now 23GB in size. Tomorrow it will be almost 40GB, etc.
The only way I know how to fix the problem (there have been several times where the database grows so large that the entire hard drive fills up before I notice it) is by running this script (see attached script).
That shrinks the log file, but after a few days it grows again.
I have maintenance plans in place, and they run successfully every night. They include:
backing up the database, reorganizing, reindexing, cleaning history, updating statistics, and shrinking the database. Yet still it keeps growing.
What am I doing wrong?
Thanks in advance =)
backup log **database** with truncate_only
DBCC ShrinkDatabase (**database**, truncateonly)