How To Create Tables / Move Data to SQL Server On Hosting Server?

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.

  1. Click on the Database Manager, click Add Database link in left frame and click on Add Database button.
  2. 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).

  3. 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:

 

  1. Open SQL Server Enterprise Manager. Expand a server group, and then expand a server.
  2. Expand Databases, right-click the database, point to All Tasks, and then click Backup Database.
  3. In the Name box, type the backup set name. Optionally, in Description, type a description of the backup set.
  4. Under Backup, click Database - complete.
  5. 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.
  6. 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:

 

  1. Login in Control Panel as web administrator.
  2. Click on Database Manager, and click List Databases.
  3. 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.

  1. 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))
  • 26 Kasutajad peavad seda kasulikuks
Kas see vastus oli kasulik?

Seotud artiklid

How To Enable SSL on Windows Server?

This article demonstrates how to quickly set up Secure Sockets Layer (SSL) in a Windows 2000...

Can I run my own software on my site?

This depends on a web host and a plan. Most plans will allow running scripts in languages such as...

How do I upload my site online?

Answer: Uploading your site can be done in many ways, but the most popular is FTP. When your...

How to install Mysql on linux vps

yum install mysql-devel yum install mysql-server yum install php-mysql yum install...

Powered by WHMCompleteSolution