When one of my sql databases was set up, the default initial size got set to 30GB (!). I have tried shrinking the log file, but it won't shrink to below about 30GB. I have tried changing the default initial size to 50MB, but it reverts back to 30 GB when I take any actions. I have tried backing up the database and restoring it from the backup...and it re-incorporates the 30GB file.
I have tried the following SQL query but it gives the following error. Note that I tried limiting it to a single user.
DECLARE @FILEID int
SELECT @FILEID = file_id FROM sys.database_files WHERE type = 1
Cannot shrink log file 2 (dbname_log) because all logical log files are in use.
(1 row(s) affected)
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
I'm stuck. I've had one SQL vendor try to help, but he's stuck. Help!