How do you migrate a huge database from one server located at remote location to another at different place?

Its a very common requirement. There is a database at some location across the globe. The database tables contain millions of rows. We are to pull/fetch those rows and insert/update into our local database. There are several solutions suggested but the best one I have tried  and found very useful is by using  LINKED SERVER.


Liked server can be created among the servers across the globe. They may be SQL server generally or one may be some other database as well.
Using and creating Linked server does have the following advantages:

  1. Remote Server Access
  2. The ability to issue distributed queries, commands and transactions on heterogeneous data sources across the enterprise/different locations
Let's explain it further :


Suppose there is one SQL server at the IP 10.112.79.83 [Located at NY suppose] and  my current SQL server is in India. I want to get all the rows from that server. Typically without Linked server, its very difficult to perform this. We can do this using linked server very easily.
Following steps need to be followed:
  • Create a linked server using the command : sp_addlinkedserver [11.112.79.83] - From the SQL server management studio from India
  • Now we can Execute any insert or update query which will take data from remote to the current server i.e. INSERT INTO local table  SELECT [11.112.79.83].DbName.dbo.tableName

Comments