Hi All,
As part of SQLadministration I truncate the log files frequently. I usually do this through the object explorer by detaching the database, physically deleting the log file and re-attaching the db so it creates a new log file.
Lately I tried using a script so that the job can be automated. the script I use is as follows:
DBCC Shrinkfile('DB_NAME_LOG',1)
ALTER DATABASE [DB_NAME] MODIFY FILE (Name = N'DB_NAME_LOG', SIZE=5120MB, FILEGROWTH=2058MB, MAXSIZE=UNLIMITED)
The above options are the same ones I use when I truncate the log file manually. However, strangely enough when I use the latter method the log file fills up the drive overnight. This is not the case when I go for the manual method.
Am I missing something here?
Thanks