SQL Server Cannot Start Following Maintenance

May 6th, 2014 by

I’ve just finished doing some maintenance on one of my development servers and encountered a problem where I could not restart the SQL Server. The development server was a virtual machine running on VMWare which had a second virtual HDD installed for SQL Server to store the database and log files. This disk had been provisioned at 200GB and over time had acquired a lot of files, such as database backups, which became unnecessary and had filled the 200GB.

I needed to get some of the space back on the VM host so I stopped the SQL Server, copied the SQL mdf and log files to a new HDD, deleted the SQL HDD and then set the drive letter of the new HDD to that of the old one.

I then tried to start SQL Server and received the following error:

Windows Event Viewer - FCB::Open failed: Could not open file E:\SQL208RTM\Live\DYNAMICS.mdf for file number 1. OS error: 5(failed to retrieve text for this error. Reason: 15105).Windows Event Viewer – FCB::Open failed: Could not open file E:\SQL208RTM\Live\DYNAMICS.mdf for file number 1. OS error: 5(failed to retrieve text for this error. Reason: 15105).

A you can see I had three goes at starting SQL Server having prodded around between attempts. I finally worked out that the problem was a permissions one.

When I had copied he files to a new HDD the permissions had not been copied with them. To reset the permissions, I opened the properties of the folder containing the SQL Server data files and added the SQL Server Service acount with full permissions:

Permissions for SQL2008RTM

Once I hit OK the permissions were updated and I was able to restart SQL Server without anymore errors.

Source: azurecurve

Leave a Reply