Hello,
Most of our clients have failed to attach the database from the .MDF file in their application directory and therefore we have suggested them to create a physical database from the Plesk control panel and access it with the user name & password in their connection string. Since you have already created the database from Plesk you can do either of the following:
1. Connect the SQL database remotely and create all the tables in it.
OR
2. Create a backup up of your database on your local machine and upload the .bak file on the server and ask us to restore it for you.
Now the question is, Why does the attach method does not work..?
Plesk creates a different user for application pool and applications on a website does not run under Network Service but under its application pool user. To attach a .MDF file to the SQL server the application pool user must be a member of SQL database administrators.
Now it would not be possible to assign these privileges to an application pool user on a Shared server for security reasons. Therefore it gives "Access Denied" error when attaching a .MDF file.
|