Showing posts with label company. Show all posts
Showing posts with label company. Show all posts

Wednesday, March 28, 2012

merge replication with msmq

My company supports sales people with handheld devices
used to track and create orders. They are generally
offline and have a client-side copy of sql server on
their machines. Currently, we are using merge
replication and they log in each night to update our
corporate servers and download pertinent changes.
We will be moving to .NET and I have been looking into
MSMQ and most info seems to be stand-alone (ie not much
info on MSMQ in relation to Replication). My question
is: is it possible to integrate MSMQ with replication
and if so, how? What would the benefits/drawbacks be?
Also, not knowing much about replication, would MSMQ be a
better solution than replication in my situation?
thanks,
Greg
Greg,
you can use MSMQ for queued updating subscribers, as an alternative to a SQL
table (MSreplication_queue). I don't know of any performance/functionality
advantages in using MSMQ, and personally don't use it as it is another
potential point of failure - also MS discourage its use
(http://support.microsoft.com/default.aspx?kbid=830839).
As a general point, queued updating subscribers are recommended to be used
in preference to merge replication when:
Replicated data is mostly read-only at the Subscriber.
Conflicts caused by multiple updates to the same data are infrequent.
You need updates to be propagated on a transaction basis, and conflicts to
be evaluated and resolved on a transaction basis (the entire transaction is
either committed or rolled back).
HTH,
Paul Ibison
|||Queued Updating is good when your number of subscribers is less than 10.
Merge replication was designed from the ground up for mobile subscribers who frequently go off line. MSMQ was designed from the ground up to provide asynchronous messaging. Out of the box it doesn't really do bi-directional replication.
You can use MSMQ to provide a subset of the functionality or merge replication, but it really is the wrong tool for bi-directional asynchronous replication.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
|||Thanks To both of you for your replies.
As MSMQ provides asynchronous messaging, would it be the
appropriate solution in the following situation: the
sales force is online most of the time and must send in
orders. Also, they run our app and must receive updates
which are personalized for their application. For
example, our menus are dynamic and each rep's menu
structure is stored in our db; but on a rep's local db,
only their own menu structure is stored. Therefore, a
change to a particular rep's menu structure would only be
pushed down to that particular rep, not all reps. So
basically, 1 rep might be able to get to a particular
function by selecting it in their menu, but another rep
might not see that functionality at all.
thanks,
Greg

>--Original Message--
>Queued Updating is good when your number of subscribers
is less than 10.
>Merge replication was designed from the ground up for
mobile subscribers who frequently go off line. MSMQ was
designed from the ground up to provide asynchronous
messaging. Out of the box it doesn't really do bi-
directional replication.
>You can use MSMQ to provide a subset of the
functionality or merge replication, but it really is the
wrong tool for bi-directional asynchronous replication.
>Looking for a SQL Server replication book?
>http://www.nwsu.com/0974973602.html
>
>.
>
|||Greg,
I'd recommend merge replication as it performs this type of partitioning
well and is vastly simpler than involving MSMQ.
Basically, each member of the salesforce would have their own SQL Server
(MSDE?) installed against which your client application functions. Each of
these nodes exists as a subscriber to the central publisher. Data would be
partitioned according to salesperson based on the merge agent's -HOSTNAME
parameter.
HTH,
Paul Ibison
|||Paul,
Wouldn't this require reps to manually run the merge
replication process? (BTW, this is our implementation
now). As I understand, MSMQ works automatically, so
messages are sent and received real-time without any
explicit action by the user, as long as there is a
connection to the server and the server has resources to
process the sent message.
thanks,
Greg

>--Original Message--
>Greg,
>I'd recommend merge replication as it performs this type
of partitioning
>well and is vastly simpler than involving MSMQ.
>Basically, each member of the salesforce would have
their own SQL Server
>(MSDE?) installed against which your client application
functions. Each of
>these nodes exists as a subscriber to the central
publisher. Data would be
>partitioned according to salesperson based on the merge
agent's -HOSTNAME
>parameter.
>HTH,
>Paul Ibison
>
>.
>
|||Greg,
The merge agent can be initiated by them manually, by your program, using
windows synchronization manager or if the reps are always connected to the
network, you can have the merge agent running in continuous mode.
HTH,
Paul Ibison
|||Thanks for all the help Paul.
I guess my last question would be ... would MSMQ only be
preferrable if having a local db on a rep's machine was
impossible for some reason or if the messages/changes
were really only 1 way?
thanks!
Greg

>--Original Message--
>Greg,
>The merge agent can be initiated by them manually, by
your program, using
>windows synchronization manager or if the reps are
always connected to the
>network, you can have the merge agent running in
continuous mode.
>HTH,
>Paul Ibison
>
>.
>
|||Greg,
I agree, although MSDE is essentially freely distributable.
If message changes are only one way, merge can be configured this way (using
the -EXCHANGETYPE parameter).
Cheers,
Paul Ibison

Monday, March 12, 2012

Merge replication latency

I'm a newby to SQL Server and by default is responsible for my company SQL
servers. We've a merge replication environement for 2 SQL2K databases. I
would like to know if there's a way to find and monitor the latency
frequency in this merge replication environment?
I found this great article that shows how to track latency for a
transactional replication environment.
http://databasejournal.com/features/...le.php/3441801
But have not been succesfull in converting it to a merge environment.
Thanks,
TLN

Merge replication in 'SQL Server'

Hi,
I read Paul Ibison's article about "Replication Across Non-Trusted Domains
or Using the Internet".
Me (and my company) need to take a very tough decision whether using SQL
server 2005 merge replication or building our own synchronization engine.
Our big problems are:
1. Everything has to work over the internet (over port 443 only), even port
21 for ftp is not an issue…
2. Out product is for customers overseas without the ability to go through
an integration process at the client site. It means we must use some
automatic process configuring the publisher or subscriber and users running
processes, etc.
3. The installation must work from an installation cd (both client and
server), without the need to manually configure domain users to run certain
replication agents – it must also be automatically.
Which one (or all) of the demands above is possible?
We are willing to make small changes –only after we definitely know that we
must open port 21 for example.
I understood that the implementation of offline clients (doesn't matter if
it's PDA with SQL CE/Mobile or windows XP with MSDE/Express) and Merge
replication in the SQL Server is good in theory but difficult to manage and
requires a lot of extra handling issues like opening ports and adding users
granted to run the processes for the replication process.
Are there any improvements in 2005 in these issues (I know about the option
to replicate through iis so the port problem is now solved?!).
My most important request is that I'll be glad if anybody knows and can
write about products in the open market which used this architecture.
Thanks,
Gil.
I'm in a crucial
Is it true? Are there any improvements in 2005 in these issues (I know about
the option to replicate through iis so the port problem is now solved?!).
I'll be glad if anybody knows and can write about products in the open
market which used this architecture.
Thanks,
Gil.
1) no problem, you can configure sql server to run on any port - have a
look at http://support.microsoft.com/default...b;en-us;823938 in
the section marked. However, port 443 is for https, did you want your SQL
Server traffic encrypted?
Configuring an instance of SQL Server to use a static port
2) you can script out replication jobs by right clicking on a publication
and selecting - generate sql script. You can generate the scripts necessary
to enable replication by right clicking on the replication folder and
selecting Generate SQL Scripts, and then selecting Distributor properties.
3) you can configure autorun.inf to run an executable which will run the
scripts generated above
Everything you list is possible - you suddenly start talking about SQL CE -
if your clients are running SQL CE, you will need a web server to
synchronize with. You could run over port 443 for this. I would not
characterize "Merge replication in the SQL Server is good in theory but
difficult to manage and requires a lot of extra handling issues like opening
ports and adding users granted to run the processes for the replication
process."
This is simply not true. Merge replication or any form of replication only
needs port 1433 (or whatever port you run SQL Server on) open. If you are
deploying your snapshot over the internet you will probably want port 21
open as well. Regarding the addition of users, this could be valid. You can
run pull agents on the subscribers which will connect to the publisher under
different accounts if you are doing filtering by suser_name(). But by
default you probably would not have to do this. I normally use pass through
authentication which uses the same account names.
There are lots of improvements, fixes, and features in SQL 2005. Web
synchronization is one of them. Although the documentation talks about
running over port 1433 (https) in addition to 80(http), I believe this is a
mistake.
I worked on a replication topology with over 60 merge clients. We had our
share of problems, but in general it was highly stable.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Gil" <Gil@.discussions.microsoft.com> wrote in message
news:123D2E11-371E-419E-8B5F-D4710F95A008@.microsoft.com...
> Hi,
> I read Paul Ibison's article about "Replication Across Non-Trusted Domains
> or Using the Internet".
> Me (and my company) need to take a very tough decision whether using SQL
> server 2005 merge replication or building our own synchronization engine.
> Our big problems are:
> 1. Everything has to work over the internet (over port 443 only), even
port
> 21 for ftp is not an issue.
> 2. Out product is for customers overseas without the ability to go through
> an integration process at the client site. It means we must use some
> automatic process configuring the publisher or subscriber and users
running
> processes, etc.
> 3. The installation must work from an installation cd (both client and
> server), without the need to manually configure domain users to run
certain
> replication agents - it must also be automatically.
> Which one (or all) of the demands above is possible?
> We are willing to make small changes -only after we definitely know that
we
> must open port 21 for example.
> I understood that the implementation of offline clients (doesn't matter if
> it's PDA with SQL CE/Mobile or windows XP with MSDE/Express) and Merge
> replication in the SQL Server is good in theory but difficult to manage
and
> requires a lot of extra handling issues like opening ports and adding
users
> granted to run the processes for the replication process.
> Are there any improvements in 2005 in these issues (I know about the
option
> to replicate through iis so the port problem is now solved?!).
> My most important request is that I'll be glad if anybody knows and can
> write about products in the open market which used this architecture.
> Thanks,
> Gil.
>
> I'm in a crucial
> Is it true? Are there any improvements in 2005 in these issues (I know
about
> the option to replicate through iis so the port problem is now solved?!).
> I'll be glad if anybody knows and can write about products in the open
> market which used this architecture.
> Thanks,
> Gil.
>
>
|||Thank you for your answer...
But I guess I wasn't completely clear.
We plan to use merge replication with new web replication feature available
in "SQL server 2005", and I wanted to know whether there is an option to work
with SSL over http without the need for opening the ftp port?
We definitely cannot open port 1433 because the replication will go over the
internet – and Windows authentication is not possible too.
There is also a need to use SUSER_SNAME() function in order filter by the
connected user. Is there a workaround of doing it without giving special
permissions to the user? I noticed there are security problems impersonating
the users just like that, these are the most annoying parts
Thanks,
Gil.
"Hilary Cotter" wrote:

> 1) no problem, you can configure sql server to run on any port - have a
> look at http://support.microsoft.com/default...b;en-us;823938 in
> the section marked. However, port 443 is for https, did you want your SQL
> Server traffic encrypted?
> Configuring an instance of SQL Server to use a static port
> 2) you can script out replication jobs by right clicking on a publication
> and selecting - generate sql script. You can generate the scripts necessary
> to enable replication by right clicking on the replication folder and
> selecting Generate SQL Scripts, and then selecting Distributor properties.
> 3) you can configure autorun.inf to run an executable which will run the
> scripts generated above
> Everything you list is possible - you suddenly start talking about SQL CE -
> if your clients are running SQL CE, you will need a web server to
> synchronize with. You could run over port 443 for this. I would not
> characterize "Merge replication in the SQL Server is good in theory but
> difficult to manage and requires a lot of extra handling issues like opening
> ports and adding users granted to run the processes for the replication
> process."
> This is simply not true. Merge replication or any form of replication only
> needs port 1433 (or whatever port you run SQL Server on) open. If you are
> deploying your snapshot over the internet you will probably want port 21
> open as well. Regarding the addition of users, this could be valid. You can
> run pull agents on the subscribers which will connect to the publisher under
> different accounts if you are doing filtering by suser_name(). But by
> default you probably would not have to do this. I normally use pass through
> authentication which uses the same account names.
> There are lots of improvements, fixes, and features in SQL 2005. Web
> synchronization is one of them. Although the documentation talks about
> running over port 1433 (https) in addition to 80(http), I believe this is a
> mistake.
> I worked on a replication topology with over 60 merge clients. We had our
> share of problems, but in general it was highly stable.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Gil" <Gil@.discussions.microsoft.com> wrote in message
> news:123D2E11-371E-419E-8B5F-D4710F95A008@.microsoft.com...
> port
> running
> certain
> we
> and
> users
> option
> about
>
>
|||Re the port issue - I asked this question on the Beta newsgroup - for Merge
over the internet in SQL 2005, is HTTP (80) supported or must it be HTTPS
(443) and the reply was HTTPS only. (which makes it a pain fully testing the
whole process on XP which doesn't support certificate server). At the time I
noticed that the advice in BOL for the initial Beta2 version had some typos
and mixed the 2 - HTTP and HTTPS, or was at best misleading. I haven't
checked the new BOL yet on this issue.
Cheers,
Paul Ibison
|||Hi,
Can someone give me some real-world example of a product (not an IT project
- where a DBA be in the integration process, a product for customers
overseas) which is using web merge replication (over http only) ?
Doesn't matter if the Client is windows XP or mobile.
Thanks,
Gil.
"Paul Ibison" wrote:

> Re the port issue - I asked this question on the Beta newsgroup - for Merge
> over the internet in SQL 2005, is HTTP (80) supported or must it be HTTPS
> (443) and the reply was HTTPS only. (which makes it a pain fully testing the
> whole process on XP which doesn't support certificate server). At the time I
> noticed that the advice in BOL for the initial Beta2 version had some typos
> and mixed the 2 - HTTP and HTTPS, or was at best misleading. I haven't
> checked the new BOL yet on this issue.
> Cheers,
> Paul Ibison
>
>
|||Gil,
I'd also be interested to hear of any such products but I think we'll be
lucky - SQL Server's only in Beta2 at this stage
HTH
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Monday, February 20, 2012

Merge Replication + Structure Changes

My company maintains 40 replicated Sybase databases using a merge
replication approach. It's difficult to update all 40 databases when a
structure change occurs. Structure changes are minor, usually adding
fields.

We are considering moving to SQL Server 2000 in the hope that these
updates will be easier to do. Does SQL Server 2000 support structure
updates accross replicated databases?

Martin"Martin McNally" <mcnally_martin@.hotmail.com> wrote in message
news:3cf569e1.0405031052.574c19e9@.posting.google.c om...
> My company maintains 40 replicated Sybase databases using a merge
> replication approach. It's difficult to update all 40 databases when a
> structure change occurs. Structure changes are minor, usually adding
> fields.
> We are considering moving to SQL Server 2000 in the hope that these
> updates will be easier to do. Does SQL Server 2000 support structure
> updates accross replicated databases?
> Martin

MSSQL supports adding or dropping columns while using any type of
replication. You might want to post this in
microsoft.public.sqlserver.replication, as people there may be able to give
more detail about any common issues or disadvantages.

Simon|||mcnally_martin@.hotmail.com (Martin McNally) wrote in message news:<3cf569e1.0405031052.574c19e9@.posting.google.com>...
> My company maintains 40 replicated Sybase databases using a merge
> replication approach. It's difficult to update all 40 databases when a
> structure change occurs. Structure changes are minor, usually adding
> fields.
> We are considering moving to SQL Server 2000 in the hope that these
> updates will be easier to do. Does SQL Server 2000 support structure
> updates accross replicated databases?
> Martin

hello martin!!

Try dbMaestro. It's a product that allows comparison, migration and
archiving of database schema and data in Sql Server 2000. by migration
you can updates structures of databases and data.

You can find it here:

http://www.extreme.co.il