473,379 Members | 1,260 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,379 software developers and data experts.

Synchronized Versions

I'm running a SQL 7 db on a LAN in city A with other users accessing it from
another city (city B) over a WAN. Obviously the WAN users are getting much
slower access to the data. One thing I was wondering was if it was possible
to have two versions of the database, one on each server, and have them
automatically synchronize as users at each location make changes. Or, if
that's not possible, then at least have the city B users get any changes
that the city A users get as they are made.

Thanks for any input.

Neil
Jul 23 '05 #1
5 1131
Neil (no****@nospam.net) writes:
I'm running a SQL 7 db on a LAN in city A with other users accessing it
from another city (city B) over a WAN. Obviously the WAN users are
getting much slower access to the data. One thing I was wondering was if
it was possible to have two versions of the database, one on each
server, and have them automatically synchronize as users at each
location make changes. Or, if that's not possible, then at least have
the city B users get any changes that the city A users get as they are
made.


Since you included .replications, I leave it to the real experts for the
deep answer; I just give you the quick one.

Both options are possible, but double synchronize would require merge
replication, which I believe is more comples to set up, and may require
that you add guids to all table you need to replicate.

One-way replication by transactional replication is a simpler affair, but
still requires some consideration.

--
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
Not sure what you mean by "Since you included .replications." Is there some
other way?

Re. one-way replication, if we were to go that route, even if simpler than
two-way, how complex is it?

Thanks,

Neil

"Erland Sommarskog" <es****@sommarskog.se> wrote in message
news:Xn**********************@127.0.0.1...
Neil (no****@nospam.net) writes:
I'm running a SQL 7 db on a LAN in city A with other users accessing it
from another city (city B) over a WAN. Obviously the WAN users are
getting much slower access to the data. One thing I was wondering was if
it was possible to have two versions of the database, one on each
server, and have them automatically synchronize as users at each
location make changes. Or, if that's not possible, then at least have
the city B users get any changes that the city A users get as they are
made.


Since you included .replications, I leave it to the real experts for the
deep answer; I just give you the quick one.

Both options are possible, but double synchronize would require merge
replication, which I believe is more comples to set up, and may require
that you add guids to all table you need to replicate.

One-way replication by transactional replication is a simpler affair, but
still requires some consideration.

--
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 #3
Neil (no****@nospam.net) writes:
Not sure what you mean by "Since you included .replications." Is there
some other way?
You included the newsgroup microsoft.public.sqlserver.replication in
your post. This was what I referred to it. The people there knows this
a lot better than I do.
Re. one-way replication, if we were to go that route, even if simpler than
two-way, how complex is it?


Depends at little of how your database looks today. It was a looooong
time since I played with replication, and that was in SQL 6.5.

But there are some considerations for IDENTITY columns, also for some
constraints. Triggers that perform some form of cascaded updates could
also cause surprises.

But I believe at lot of this can be dealt with adding "NOT FOR REPLICATION"
in strategic places. You only have to find these places. :-)

One thing that definitely affects the complexity of the task is the
stability of your data model. If you are running a mature system where
the table definitions never changes, then this is a whole simpler,
because you don't need a strategy to deal with table changes.

Now, one thing to consider, is how the user on the remote end are going
to submit their updates. Not knowing your application, I don't have an
answer for this.

Setting up replication for a test should be a relatively easy affair.
There is a point-and-click GUI for this in Enterprise Manager. (At least
there was in 6.5, so I assume there is today as well!) Keep in mind
that there at least three parties involved in replication: Publisher,
Distributor and Subscriber. I think that in your case, it would probably
be OK to have the distribution on the same machine as the publisher,
although I think the usual recommendation is to have it on a separate
box.

By the way, if you have control over the client part of the application,
it is not impossible that rewriting the client can make significant
performance benefits for the people on the remote end. If the clients
sends lots of small SQL queries, rather than calling stored procedures
that returns all, then there is a lot of network traffic going on. Also,
if you can run with SET NOCOUNT ON, this can also improve performance.
The latter can actually be changed, by changing a server-wide configuration
option (so it would affect all applications). Many applications do not
care about the rowcounts for INSERT/UPDATE/DELETE, but some do, so I
cannot say for sure that you can do this trick.

--
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

"Erland Sommarskog" <es****@sommarskog.se> wrote in message
news:Xn*********************@127.0.0.1...
Neil (no****@nospam.net) writes:
Not sure what you mean by "Since you included .replications." Is there
some other way?
You included the newsgroup microsoft.public.sqlserver.replication in
your post. This was what I referred to it. The people there knows this
a lot better than I do.


Ah, I see. Thanks for clarifying. Thanks also for your notes below. They
were very helpful.

Neil
Re. one-way replication, if we were to go that route, even if simpler
than
two-way, how complex is it?


Depends at little of how your database looks today. It was a looooong
time since I played with replication, and that was in SQL 6.5.

But there are some considerations for IDENTITY columns, also for some
constraints. Triggers that perform some form of cascaded updates could
also cause surprises.

But I believe at lot of this can be dealt with adding "NOT FOR
REPLICATION"
in strategic places. You only have to find these places. :-)

One thing that definitely affects the complexity of the task is the
stability of your data model. If you are running a mature system where
the table definitions never changes, then this is a whole simpler,
because you don't need a strategy to deal with table changes.

Now, one thing to consider, is how the user on the remote end are going
to submit their updates. Not knowing your application, I don't have an
answer for this.

Setting up replication for a test should be a relatively easy affair.
There is a point-and-click GUI for this in Enterprise Manager. (At least
there was in 6.5, so I assume there is today as well!) Keep in mind
that there at least three parties involved in replication: Publisher,
Distributor and Subscriber. I think that in your case, it would probably
be OK to have the distribution on the same machine as the publisher,
although I think the usual recommendation is to have it on a separate
box.

By the way, if you have control over the client part of the application,
it is not impossible that rewriting the client can make significant
performance benefits for the people on the remote end. If the clients
sends lots of small SQL queries, rather than calling stored procedures
that returns all, then there is a lot of network traffic going on. Also,
if you can run with SET NOCOUNT ON, this can also improve performance.
The latter can actually be changed, by changing a server-wide
configuration
option (so it would affect all applications). Many applications do not
care about the rowcounts for INSERT/UPDATE/DELETE, but some do, so I
cannot say for sure that you can do this trick.

--
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 #5
I think that there are several third-party products for this. Look up
Red Gate, if I remember correctly. Never re-invent the wheel.

Jul 23 '05 #6

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

Similar topics

2
by: Frank | last post by:
Hi, In the javadocs regarding many of the java.util classes, it states that the classes are not synchronized, and suggest using the Collections.synchronizedX(...) methods for getting...
7
by: John Thorner | last post by:
Hi, I am creating a new thread for each of the connections to the server: public class Node_C { .... while (listening) { Socket client_socket = server_socket.accept(); Node_CThread node ...
5
by: Max Ischenko | last post by:
Hi, I wrote simple implementation of the "synchronized" methods (a-la Java), could you please check if it is OK: def synchronized(method): """ Guards method execution, similar to Java's...
4
by: Rich Sienkiewicz | last post by:
Some classes, like Queue and SortedList, have a Synchronized method which gives a thread safe wrapper object for these classes. But the lock() statement does the same thing. Is there any rules as to...
0
by: Mike Grasso | last post by:
I've seen a few messages on this, but no responses. Here's what I found out PROBLEM: How do you use ArrayList.Synchronized to create thread-safe objects derived from ArrayList public class...
4
by: chrisben | last post by:
Hi I often use Queue.Synchronized method to create a queue for multithread writing. I also know I could use SyncRoot and lock to write Queue. Could anyone here please explain to me the pros and...
6
by: rmunson8 | last post by:
I have a derived class from the Queue base class. I need it to be thread-safe, so I am using the Synchronized method (among other things out of scope of this issue). The code below compiles, but...
8
by: ASP.Net programmer | last post by:
Hi, I have a few methods in a class that I want to synchronize (make sure they can't be used at the same time by multiple threads). As a Java programmer I just do this: public synchronized...
3
by: Ryan Liu | last post by:
Hi, What does ArrayList.Synchronized really do for an ArrayList? Is that equal to add lock(this) for all its public methods and properties? Not just for Add()/Insert()/Remvoe()/Count, but also...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.