Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello, this is Vikash.

I have 2 Sql Databases with Identical tables and their structures.

What I need to do is, Synchronise DB2 with latest records from DB1, in each table.

eg. Say DB has Employee Table Emp.

DB1.Emp has 6 records
1-A
2-B
3-C
4-D
5-E
6-F

DB2.Emp has 4 records
1-A
2-B
3-C
4-D

I want the 2 records in DB1.Emp get inserted in DB2.Emp

I know I can do this using VB.net looping through each tables record in DB1 and inserting into DB2.

But is their any other way, or command in sql server to bulk copy this data.

Any help would be great.
Posted

1 solution

SQL Replication[^] will do that if DB2 is a child of DB1
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900