Publishing SQL Server Database to the Hosting Environment

Web Development
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.
  1. Publish Database Schema using the Database Publishing Wizard
  2. Upload database files (.mdf file) to your hosting space
  3. Upload a database backup (.bak file) to your hosting space
  4. 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:
  1. Using the publishing Wizard, create a script file (.sql) file containing entire Database Schema (Data Structure) and Initial Data.
  2. Log into SQL Web Admin, select the target Database, and select 'Query' from the left menu
  3. Upload the sql script file created by the publishing Wizard and execute it.
  4. 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:
  1. Detach the database files (.mdf and .ldf) from your local database.
  2. Compress the .mdf file into a .zip file
  3. Upload it to your hosting space via FTP or the File Manager.
  4. 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:
  1. Create a database backup (.bak file) for your local database.
  2. Compress it into a .zip file.
  3. Upload the file to your hosting space via FTP or File Manager.
  4. Submit a support ticket and request for restoring of the database. Include the database name and uploaded file path and name in the ticket

Add Feedback