How do I import and export a MSSQL database?

How do I import and export a MSSQL database?

This answer explains how you can import and export data from a MSSQL database.

This article applies to Windows Hosting accounts.

 

Importing a Database

To import a database click on the "Import" link select the .sql file on your system that needs to be uploaded. The system will then import your chosen document.

You will not need the command CREATE DATABASE and you should also not need to delete the existing tables on our server prior to importing the data as most programs contain a line that will check if the table exists and if it does it will delete it first before creating the table.

If the script shows errors about the insert statements make sure you have either of the following in the insert section:

[dbo].[tablename]
or
[webfusion_db_username].[tablename]
 

Exporting a database

To export the database you will need to login to the SQL section and then click “Export”. Select the database you wish to export and click "Export". This will then produce a file to download.