jpomfret7 (1/10/2012)
To be safe, you really should run against test.sys.database_files
The file name and info matches in sys.database_files, sys.master_files, sys.sysaltfiles and dbo.sysfiles...
what is the recovery model of your database?
We are in simple recovery and I ran a checkpoint before attempting to shrink the logs
I would not expect it to give the error you see, but anyway the truncateonly option has no effect when applied to a log shrink
I have used this script on other servers and been able to free up log space, what should be used?
It's a puzzle, thanks for all your help so far 🙂
I just always did this when needed:
USE test
DBCC SHRINKFILE(2,20)
Since we already know that the fileid is 2, go ahead and try this.
Jared
CE - Microsoft