Thursday, January 30, 2014

SQL 2012 and Scale-out-file-server. Unable to Attach a Database

Working with a client with an installation of a Clustered SQL 2012 R2 servers with a Clustered File Server providing SMB3 shares to a Scale-Out-File-Server, we discovered that we could not attach an existing Database file.

The error message is:
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.

As a test, we can create a new database, verify that it exists, detach it, and then immediately try to re-attach it, and we get the error.

We of course have verified that the Administrative User, the SQL Service Account, and the Computers all have full rights to this data directory.

We opened a case with Microsoft, and after 4 hours on the phone, were told that this appears to be a bug when using a UNC, presumably on a Scale-out-file-Server, for our data.

The workaround is to use a SQL command to attach the database instead.



Create database OldData On
              (Filename = '\\sqlserver-1\SQLServer-Data\SQLdata-1\Data\OldData.mdf'),
              (Filename ='\\sqlserver-1\SQLServer-Data\SQLdata-1\Logs\OldData_log.ldf')
for ATTACH

No comments: