First step is database creation on the host server. Follow these steps:
Step 1: Create SQL Database
First step is database creation on the host server. Follow these steps:
Login into control panel as web administrator.
-
Click on the Database Manager, click Add Database link in left frame and click on Add Database button.
-
Enter The following information
-
Database Name: The name by which you want to create database in SQL server.
-
Database Login: The login name for newly created database. HC will create this new login in SQL and assign rights on the database.
-
Password: The password for above login name.
-
Target Database Path: The physical path for SQL database files (.MDF & .LDF files).
-
- Click Create Database button.
Step 2: Create Backup of local SQL database
SQL database backup creates a backup of your local database which is later restored on host server. Follow these steps:
-
Open SQL Server Enterprise Manager. Expand a server group, and then expand a server.
-
Expand Databases, right-click the database, point to All Tasks, and then click Backup Database.
-
In the Name box, type the backup set name. Optionally, in Description, type a description of the backup set.
-
Under Backup, click Database - complete.
-
Under Destination, click Tape or Disk, and then specify a backup destination. If no backup destinations appear, click Add to add an existing destination or to create a new one. Click OK button.
-
Upload this database backup to /db folder of your website.
Step 3: Restore the SQL backup on remote hosting server
Restoring SQL database complates the task. Follow these steps:
-
Login in Control Panel as web administrator.
-
Click on Database Manager, and click List Databases.
-
Select the database you created in Step 1 and click on Restore button. Browse to the /db folder and select the database backup created and uploaded to /db folder in Step 2 above. Click Select File button.
The above three steps will restore all the tables, procedures, view etc along with their data to remote SQL server on hosting server.
The following procedure guides you how to create tables in remote SQL server if you don't have database backup or this is a fresh database.
To create new tables in SQL server
Follow the Step 1 above to create a database in SQL server.
-
Create tables in SQL server programmatically using following formats
-
CREATE TABLE tablename (columnName datatype [primary key][NOT] NULL [,])
-
CREATE [unique/clustered] INDEX indexname ON tablename(columnName(s))
-