SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Know How to Import SQL Server database From One to Another

Looking to import SQL Server database from one server to another ? Confused how to copy from one to another or which process method to use?

Here we will learn how to import data from one SQL Server database to another.

First let us understand what options you have to copy SQL Server database from one server to another.You can copy data from one SQL Server database to another by :

  • Copy Database Wizard
  • By Back & Restore
  • By detaching from old Server to new Server.
  • By SQL Database Migrator

Let us understand these steps in brief:

Import data from one SQL Server Database from one Server to Another

By Detach & Attach:

You can move SQL Database from one to another database by Detach/Attach method. For this follow the steps:

  • First you need to detach the database. For Detaching, Open SSMS, connect to the SQL Database Engine.
  • Expand the databases and select the name of the database you want to detach.
  • Right click on it --> Click on Tasks --> Detach. Pop up will come of Detach Database. Click Ok.

You can do this by T-SQL command also. You just need to run sp_detach_db command on the database.

  • In Command Prompt window, move the detached database file to the new location.
  • Now attach the copied database files. For attaching, Right click on the database and Click on Attach.
  • In Attach Database box, click on Add and in Locate Database Files box, select the drive where database is present and expand it to select the .mdf file.

Let us understand another method to Import SQL Server database to another Server. Now we will see Copy database by Backup & Restore.

Migrating by Backup & Restore

For importing database from one Server to another, you need to create new database first. The source and the destination can be any platform in which SQL Server runs.

  • First of all backup the source database on which SQL Server instance is running.
  • Connect to the instance of SQL Server in which you are planning to copy the database.
  • Now, restore the backup of the source database on destination computer. By restoring operation, you automatically create all the database files.

By Copy Database Wizard

For importing SQL Server database from one Server to another, you can do it by Copy database wizard method. For this;

  • Click on the Database you want to import from one SQL Server to another Server.
  • Right Click on it--> Tasks -->Copy Database Wizard.
  • The method requires Source and Destination credentials, enter it. And Select either Attach/ Detach or SMO type.
  • Click on Next and then Finish to execute.

Quick Import SQL Server database from one Server to another

One quick way to move SQL Server database from one to another is by using professional method ie SQL Database migration tool. The software migrates all SQL database objects from one to Server to another. Incase if your database is corrupted then the software helps it to repair it and then migrate it to another Server. You can move SQL database either in existing database or by creating a new one.

The steps are simple:

  1. Install and Open Database Migration Tool
  2. Click on Open and Load the MDF file
  3. Click on Advance scan and Choose the version either manually or by clicking on Auto-Detect.
  4. You will get the scanned report of the database items.
  5. Click on Export.

Your database will get successfully get imported from one SQL Database to another.


Get to know how to import SQL Server database from one Server to another. We have discussed various methods to move SQL Server Database from one to another. Make sure to carefully accomplish the task. We have also discussed a professional approach for all those users who want to import SQL Server database from one to another quickly.

Vivek's SQL Notes

Vivek johari is currently a Analyst and have more that 5.5 yeras of experience in database. He has Master degree in Computer and also he is Microsoft certified Sql DBA (MCTS)& Microsoft certified SQl BI professional(MCTS). He is also Oracle certified profession(OCP)DBA in ORACLE 10g and ORACLE 9i.He has the experience of working in PL/SQL, T-SQL and SSIS/SSRS. His work basically involved designing and optimization of the Database.He has also published many database articles on his blog Technologies with Vivek Johari.


Leave a comment on the original post [feedproxy.google.com, opens in a new window]

Loading comments...