When you create a new database or you start SQL Server, the following error messages may be raised:
Error 5177 "Encountered an unexpected error while checking the sector size for file '%.*ls'. Check the SQL Server error log for more information."
Error 5105, level 16, Device activation error. The physical file name '%.*ls' may be incorrect.
The Microsoft Windows NT account under which the MSSQLServer service starts does not have List Folder permissions on the root drive where the new database data or log files are created.
Assuming that the database is to be created in the D:\Data directory and that the MSSQLServer service is running under a Windows NT account called TestDomain\Testuser, you can work around the problem by following these steps:
- Open Windows Explorer, and then browse to drive D.
- Right-click drive D, and then click Properties.
- Click the Security tab, and then click Permissions.
- Make sure that the user "TestDomain\Testuser" (the MSSQLServer service startup
account) is in the list of accounts that have List Folder permissions on the
root drive D. If the account is not listed, click Add to add it to the list.
Note The List Folder permissions on the root drive do not have to be inherited by the subfolders.
- Make sure the MSSQLServer service startup account has Full Control permissions over the D:\Data folder, and then try to create the database.
If the workaround does not correct the problem, modify the account under which MSSQLServer service starts. Make sure that this account has Full Control permissions to the directory where SQL Server databases are to be created.
Note that 5177 errors can also indicate possible hardware-related problems, especially if the SQL Server errorlogs show other I/O-related errors, such as error 823.