Error in Detach a database in the MSSQL Management Studio


Error:

When you try to Detach a database in the MSSQL Management Studio, you may seen the following error.
When this issue happend to me, there is no issues in creating, deleting, detaching database. There is problem only in the Detaching option.

-----------------------------------------------------------------------------------------------------------------------------------------------------
C:\Program files(x86)\Parallels\Plesk\Databases\MSSQL\MSSQL.1\MSSQL\Data
Cannot access the specified path or file on the server. Verify that you have the necessary security privileges and that the path or file exists.

If you know that the service account can access a specific file, type in the full path for the file in the File Name control in the Locate dialog box.
-----------------------------------------------------------------------------------------------------------------------------------------------------

Solution:

1. Run services.msc to view all the Services in the server.

2. Find the service named "SQL Server(MSSQLSERVER 2008)".
    Check the "Log On As" column of that service, whether it is 'Local System' or 'Network System'.
    If it is 'Network System', you have to change to 'Local System', which will fix your issue. The following screenshots will give you to change it.


3. Right Click on the particular service and select 'Properties' option.


4. Select 'Log On' tab and select the option,
       Log On As:
       Local System Account
       Click on Allow service to interact with Desktop
   Then click option OK.


5. You have to restart the service to make changes in effect.
     Select General tab. You Stop and Start the service in there.
     Then click option OK.



Thanks...

Leave a Reply