[Company Logo Image] 

Home Up Contents Coffee Break Credits Glossary Links Search

 
Cannot access the specified path or file

 

 

Home
Analysis Services
Azure
CLR Integration
High Availability
Open Source
Security
SQL Server 2008
SQL Server 2012
SQL Server 2014
SQL Server 2016
SQL Server 2017
SQL Server 2019
Tips
Troubleshooting
Tuning

Cannot Access the Specified Path or File on the Server.


Applies to: Microsoft SQL Server 2005 SP3, Windows Server 2003 SP2.

 

Problem Description.
 

We were trying to attach a new database on a SQL Server 2005 failover cluster using SQL Server Management Studio, and we received the following error message:

Locate Database Files - ServerName
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.





When we tried to attach that database using T-SQL, we then received the following error:


EXEC sp_attach_db @dbname = N'xxxx_db',
@filename1 = N'X:\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\xxxx_db.mdf',
@filename2 = N'X:\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\xxxx_db_log.ldf';


Msg 5184, Level 16, State 2, Line 1
Cannot use file 'X:\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\xxxx_db.mdf' for clustered server. Only formatted files on which the cluster resource of the server has a dependency can be used. Either the disk resource containing the file is not present in the cluster group or the cluster resource of the Sql Server does not have a dependency on it.


Cause.

We found that the shared cluster drive where the database files were located was not added as a dependency to the SQL Server resource in the Cluster Administrator.






Solution.

To solve this problem, we follow the instructions given in the following article:

http://support.microsoft.com/kb/295732


1. Open the Cluster Administrator.
2. Make sure that all the physical disk resources that contain SQL Server databases are in the same group as the SQL Server resource.
3. Right-click the SQL Server resource, and then bring the resource into an Offline state by clicking Bring Offline.
4. Right-click the SQL Server resource, and then click Properties.
5. Click the Dependencies tab.
6. Click Modify to add the disk to the dependencies list for that resource.
7. Bring the SQL Server resource back online, and then put the SQL Server files on that shared cluster disk.
 


 

 

.Send mail to webmaster@sqlcoffee.com with questions or comments about this web site.