SQL 2000 Transaction Log and "DBCC SHRINKFILE"
Posted on 2008-11-17
I've got a problem with an SQL Server in that the transaction log has grown too large and filled the disk.
As such, I performed a backup of the transaction logs, and then tried to use the DBCC SHRINKFILE T-SQL command to shrink the file.
However, when I run the command it immidiately returns "The command(s) completed successfully" and nothing happens to the file.
I tried to run it using SQL Server Management Studio 2005 from another machine in the domain, and the graphical interface here confirms that the log file is 97% free space, but again when I run it it says "Executing" for a few seconds, and completes without error, again without changing the size of the log file.
There is nothing in the EventLog that suggests an error either.
This is the T-SQL command I ran (though I have tried several other permutations): -
DBCC SHRINKFILE (N'MyDB_LOG.LDF', 0, TRUNCATEONLY)
What am I doing wrong???
Thanks in advance.