Can not Shrink Log File. I am getting The file either does not exist, or was dropped.
Posted on 2008-10-14
I am trying to shrink a Log File but ever time I run DBCC SHRINKFILE i get this error.
"Could not locate file 'GPSOPERALog' for database 'PLAY' in sys.database_files. The file either does not exist, or was dropped. "
I have ran sp_helpfile to confirm the logical name of the file and everything is correct. I have also check the properties to make sure of the location of the file and it is there. I have even tried to move the file but I get an error telling me the file is in use.
I did notice that I there are two databases on this server that have different log file names but the Logical name for both log files are the same.
What do I need to do to shrink this file. Here is how I have the code written to do this.
DBCC SHRINKFILE(GPSTWOLog, 100)