DBCC shrinkfile gives error

user70636 picture user70636 · Mar 9, 2010 · Viewed 11.6k times · Source

I am trying to shrink my log file using DBCC SHRINKFILE(db_2.ldf), which is the name for log file

It gives me error every time:

8985, Level 16, State 1, Line 1 Could not locate file 'FIelD' for database db in sys.database_files. The file either does not exist, or was dropped.

Can you please suggest what can I do to fix it.

Answer

onupdatecascade picture onupdatecascade · Mar 9, 2010

The file name should be the logical file name and not the physical file name. Look in the Database properties, on the Files tab for the Logical Name of the file you are trying to shrink, and use that name.