Lai
Lai

Reputation: 1350

Access Denied attaching a database through network

SQL Server 2012 instance is running on MyDatabaseServer. I failed to attach database when I attach database on another machine on the network.

I need it to run on another machine other than the DB server itself. What should I do???

Note 1: The code I ran:

CREATE DATABASE MyDatabase ON 
    ( FILENAME = N'\\MyFileserver\MyFolder\MyDatabase.MDF'),
    ( FILENAME = N'\\MyFileserver\MyFolder\MyDatabase_Log.LDF')
     FOR ATTACH 

It returns:

Unable to open the physical file "\MyFileserver\MyFolder\MyDatabase.MDF". Operating system error 5: "5(Access is denied.)".

Note 2: The account to run SSMS and the service account to run SQL Server both have full control permission to \\\\MyFileserver\\MyFolder\\ as well as MyDatabase.MDF

Note 3: I am able to connect to the DB MyDatabaseServer\MyDB on both machines SSMS.

Note 4: It is SQL Server 2012. MyDatabaseServer is a Windows Server 2012. MyMachine is Windows 7.

Upvotes: 1

Views: 291

Answers (1)

FLICKER
FLICKER

Reputation: 6683

SQL server database must be on the same machine as the server is installed

Upvotes: 1

Related Questions