Click here to Skip to main content
15,900,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All

As of now what i have done is, i have synchronised two sql server databases.
I mean the copy of the first database alone exists in the second database.
In this process the second database is deleted and recreated with the data of first database.I don't need like this.
What i need is database1 will have 40 tables. And database 2 will have 30 tables.
But 2 tables will be common to both databases. I want to synchronise those 2 tables alone without affecting the other tables.
Is that possible? If yes, Can you give me a sample.
It is very urgent.
Thanks in advance
Posted

1 solution

If I've understood you then something like (since you don't mention the locations of these databases let's assume they are on the same server):

delete from DB1..Table1

insert into DB1..Table1
select * from DB2.Table2


That is very simplistic: I'll leave it to you to work out the fine detail, perhaps by doing some more research here and on Google..
 
Share this answer
 
Comments
froxy 15-Jun-11 2:01am    
thank you very much. but i have used microsoft sync framework to do it

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