View Single Post
  #4 (permalink)  
Old 04-05-2008, 19:04
eUK-Gabriel eUK-Gabriel is offline
Windows System Administrator
 
Join Date: Nov 2007
Posts: 6
Default

Hi Will,

Why does the attachDB method does not work.. /"don't support MSSQL user instances ?

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 and it would not possible to assign these privileges to an application pool user on a Shared server for security reasons.

We noticed that many users failed to attach the database using the .MDF file placing it in their App_Data folder and hence we have suggested to create a physical database from the Plesk control panel and access it with the user name & password in their connection string.

You have two options -
Either access your database remotely and recreate the tables in it
Or
If you have your database on your local machine then create the backup of it in .BAK format and upload it on server so that we will restore it for you.


How to take the backup ?


Its very easy to backup the database if you are using SQL Server Management Studio - Connect your database present on your local machine >> Right click on database >> Select Tasks >> Back Up.. >> it will open up a new window >> under Source section select the database name from drop down list >> Backup type as Full >> under Destination section click on Add >> it will open a new window >> here enter the location and file name with extension as .Bak and hit Ok >> once again click Ok on main window.
It will generate the backup in the provided directory. You can upload this file on server by FTPing your web site.

SQL Server Management Studio is a recommended and absolutely free database management tool which you can download at -
microsoft.com / downloads / details.aspx?FamilyID=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en

When you create database from Plesk, you have to create a user with password for it, you have to use these login details in the connection string we have provided.

You can refer following link for more information on generating the database backup -
eukhost.com / forums / f15 / how-backup-mssql-server-2005-database-4563
Reply With Quote