If your Website uses SQL Server Database, you must create the Database on the Server and publish the initial Database Schema (structure) and Data to the Server. There are several options for the initial deployment of a SQL Database.
- Publish Database Schema using the Database Publishing Wizard
- Upload database files (.mdf file) to your hosting space
- Upload a database backup (.bak file) to your hosting space
- Create initial schema using the SQL Web Admin
Using the Database Publishing Wizard
The recommended procedure for deploying SQL Server Database is to use the Database Publishing Wizard
The Database Publishing Wizard is included in Visual Studio 2008 (including Express Edition). The tool can also downloaded from the following link:
To launch the Database Publishing Wizard from Visual Studio 2008, go to 'Server Explorer' right click the database connection name and select 'Publish to Provider' from the context menu.
Follow these simple steps to publish the database:
- Using the publishing Wizard, create a script file (.sql) file containing entire Database Schema (Data Structure) and Initial Data.
- Log into SQL Web Admin, select the target Database, and select 'Query' from the left menu
- Upload the sql script file created by the publishing Wizard and execute it.
- The database structure and initial data will be created on the server.
After this initial deployment, you can publishing any additonal database objects (Table, View, Stored Procedure etc.) by running the Database Publishing Wizard again and only scripting the schema of the new objects.
Upload Database Files to Your Hosting Space
Unlike the Database Publishing Wizard, this requires manual work on the server and you will have to submit a support request for the completion of deployment. Follow these steps to deploy your Database by uploading the database files:
- Detach the database files (.mdf and .ldf) from your local database.
- Compress the .mdf file into a .zip file
- Upload it to your hosting space via FTP or the File Manager.
- Submit a support ticket and request for database attachment. Include the database name and uploaded file path and name in the ticket
Upload a Database Backup File to Your Hosting Space
This option requires manual work on the server. Follow these steps:
- Create a database backup (.bak file) for your local database.
- Compress it into a .zip file.
- Upload the file to your hosting space via FTP or File Manager.
- Submit a support ticket and request for restoring of the database. Include the database name and uploaded file path and name in the ticket