473,409 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

How to synchronize 2 tables on different sql servers

Hi, anybody can help me.
How can i synchronize 2 tables on 2 different sql servers 2000

i mean TABLE1(col1, col2, col3, col4) and
TABLE1(col1, col2, col3, col4, col5, col6)
the first 3 colums are the same in rwo tables.

Thanks

--
Message posted via http://www.sqlmonster.com
Jul 23 '05 #1
6 9569
alex via SQLMonster.com (fo***@nospam.SQLMonster.com) writes:
Hi, anybody can help me.

How can i synchronize 2 tables on 2 different sql servers 2000

i mean TABLE1(col1, col2, col3, col4) and
TABLE1(col1, col2, col3, col4, col5, col6)
the first 3 colums are the same in rwo tables.


Could you be more specific on what you mean. Do you want to synchronize
data or metadata? And what should the synchronization result in?
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2
Thanks for replay, i want to synchronize
data between two tables? i don't know how to acomplish that.
Maybe u can suggest me some stuff to read about topic???
P.S. i had read your articles about Error Handling very helpful.

thanks

--
Message posted via http://www.sqlmonster.com
Jul 23 '05 #3
alex via SQLMonster.com (fo***@SQLMonster.com) writes:
Thanks for replay, i want to synchronize
data between two tables? i don't know how to acomplish that.
Maybe u can suggest me some stuff to read about topic???


Well, if you know you are in A and want to go B, I might be able to
help you, if you tell me where A and B are.

But if you don't know where you want to go, then I cannot help you with
that part. "Synchronize the tables" could mean a lot of things, and I'm
not active in this newsgroup to play guessing games.

Please give an example of what you have, and where you want to arrive.
Then we might be able to suggest something.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #4
Ok, sorry about my explanation .

I have two sql servers that runs on different machines

each of sql servers have database (there is not same database) however
there is table (suppose myTable) that is same to two databases and i need
to synchronize between them in this case e.g.
sqlServer1 myTable1
sqlServer2 myTable2

in case some data is changed in [sqlServer1 myTable1] i need that
[sqlServer2 myTable2] will changed too according to [sqlServer1 myTable1]
and not vice versa i.e i need that [sqlServer2 myTable2] will ALLWAYS have
data like [sqlServer1 myTable1]

--
Message posted via http://www.sqlmonster.com
Jul 23 '05 #5
alex via SQLMonster.com (fo***@SQLMonster.com) writes:
Ok, sorry about my explanation .

I have two sql servers that runs on different machines

each of sql servers have database (there is not same database) however
there is table (suppose myTable) that is same to two databases and i need
to synchronize between them in this case e.g.
sqlServer1 myTable1
sqlServer2 myTable2

in case some data is changed in [sqlServer1 myTable1] i need that
[sqlServer2 myTable2] will changed too according to [sqlServer1 myTable1]
and not vice versa i.e i need that [sqlServer2 myTable2] will ALLWAYS have
data like [sqlServer1 myTable1]


One method is to set up replication, although a replication topology
for one single table is probably an overkill. Also, that would require
the tables to have the same metadata, and your initial post indicated
that they have different columns.

Another method is to set up SqlServer2 as a linked server on
SqlServer1, and then have a trigger that replicates the data to
the table on SqlServer2. If the network is not always up, or if it is
slow, this can cause updates on Server1 to be slow.

Yet another possibility is to set up Server1 as a linked server on Server2,
and regularly poll, for instance from SQL Server Agent. If the table
is moderate in size, it might be feasible to simply truncate the
table, and then load the data over. Of course, this won't do, if the
table is has many rows.

Yet a possibiliy is a combination of the last two: you have a trigger
which writes to a table local to Server1, and then Server2 pulls the
chagens from this table, and then deletes the rows in the table. Here
some care needs to be taken so that you don't miss any updates, but
also you don't lock the source tables for updates while fetching.

Which of these to choose depends on your exact requirements, which
privileges you can run this under, which possibilities you have to
set up linked servers and create triggers etc.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #6
thanks, this more that i expect.

--
Message posted via http://www.sqlmonster.com
Jul 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: CJ | last post by:
We have just released for beta testing our xSQL Object that allows SQL Server DBAs to COMPARE Servers, Databases, Tables etc., SCRIPT and SYNCRONIZE Tables, Views, Stored Procedures, UDFs etc. It...
4
by: gene.ellis | last post by:
Using a web interface, I am placing text into a SQL database. From time to time, I would like to synchronize one of my other tables in the database with the table that I am inserting content into....
2
by: Sandeep | last post by:
Hi all, I need to figure out a way to synchronize between my production server web site (asp.net web application) and development server web site. If there are any changes in the development...
2
by: Pascal Polleunus | last post by:
Hi, I need to synchronize some tables from a database (master) to another one (slave). Both servers are running Debian Woody with PostgreSQL 7.2.1 (postgresql 7.2.1-2woody4). The databases are...
3
by: pradeep | last post by:
Hi, I amnew to this group and lucky to have found this group. i have a master table which has different types of application say Desktop, Mainframes, etc. I have an individual table for each...
1
by: rbarber | last post by:
I have to synchronize 2 databases hourly but am having difficulty maintaining foreign key relations. These tables use auto-increment columns as primary keys, with child records in other tables...
3
by: 2401 members, members can post | last post by:
Dear Madams and Sirs, Ever had to split a website + SQL Tables ? Have a UNIX pc-linux-gnu on i686 + FEDORA 1) We have to split a sub-domain for the main domain name. 2) We have to build a...
1
by: vicky12 | last post by:
HI all can anyone help me with this. I have two databases, one at my local host and second one on a web server with same tables. I have to make some changes to my local database and I need to update...
2
by: Gilbert Tordeur | last post by:
Hello, I work with VB2008 and SQL Server 2000. I would like to make a JOIN between to SQL tables that are stored on different servers. How should I write the LINQ statement(s) ? Thank you...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.