Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DBCC shrinkfile gives error

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.

like image 580
user70636 Avatar asked Dec 09 '22 17:12

user70636


1 Answers

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.

like image 63
onupdatecascade Avatar answered Jan 14 '23 10:01

onupdatecascade