MODIFY FILE failed. File ‘%.*ls’ does not exist.

Error Message:
Msg 5041, Level 16, State 1, Line 1
MODIFY FILE failed. File ‘%.*ls’ does not exist.

Severity level:
16.

Description:
This error message appears when you try to modify a file of a database, but the file does not exist.

Consequences:
The T-SQL statement can be parsed, but causes the error at runtime.

Resolution:
Errors of the Severity Level 16 are generated by the user and can be fixed by the SQL Server user. The statement cannot be executed this way. The file must exist before it can be modified.

Versions:
All versions of SQL Server.

Example(s):
ALTER DATABASE MyExample
MODIFY FILE
 (NAME = MyExample_Dataa,
  MAXSIZE = 5 MB);

Remarks:
In the above example we try to modify the logical file MyExample_Dataa. Because this file does not exist, the error is raised.




Array

No comments yet... Be the first to leave a reply!