Showing posts with label clients. Show all posts
Showing posts with label clients. Show all posts

Friday, March 30, 2012

Merge Replication: Insert Trigger ONLY when replicating

Hello,
I have a scenario where clients enter data into a MSDE local database on
their laptop. I would like to add a trigger on that table that fires only
on the Server (SQL2K Ent.) when they are synchronizing when a new records
has been inserted. By looking at the Merge trigger automaticcaly generated
on the table, I found something interesting:
"if sessionproperty('replication_agent') = 1 and (select
trigger_nestlevel()) = 1"
Therfore, I've created my trigger like the following:
Create Trigger tg_Inserted On tblBlaBla FOR INSERT
AS
if not sessionproperty('replication_agent') = 1
return
Insert Into tblTest (Account_Code, Product_Code, DateCreation)
Select ins.Account_code, ins.Product_Code, GetDate()
From Inserted As Ins
I've done some test and everything works fine. However, before putting this
in Production, I was wondering if I absolutely need to put the "Select
trigger_nestlevel() ..." or not. I've read in the newsgroups and some are
saying you need to, some are saying you don't need to... Since it is a very
well documented feature, can anyone confirm me the proper way of doing this?
That would be greatly appreciated. Thanks.
Nest level check allows to avoid ping-pong traffic from subscriber to
publisher and vice versa
But in your case that should matter only if you are also replicating table
tblTest
Regards,
Kestutis Adomavicius
Consultant
UAB "Baltic Software Solutions"
"Christian Hamel" <chamel@.NOSPAM.com> wrote in message
news:udebeQ7WFHA.2692@.TK2MSFTNGP15.phx.gbl...
Hello,
I have a scenario where clients enter data into a MSDE local database on
their laptop. I would like to add a trigger on that table that fires only
on the Server (SQL2K Ent.) when they are synchronizing when a new records
has been inserted. By looking at the Merge trigger automaticcaly generated
on the table, I found something interesting:
"if sessionproperty('replication_agent') = 1 and (select
trigger_nestlevel()) = 1"
Therfore, I've created my trigger like the following:
Create Trigger tg_Inserted On tblBlaBla FOR INSERT
AS
if not sessionproperty('replication_agent') = 1
return
Insert Into tblTest (Account_Code, Product_Code, DateCreation)
Select ins.Account_code, ins.Product_Code, GetDate()
From Inserted As Ins
I've done some test and everything works fine. However, before putting this
in Production, I was wondering if I absolutely need to put the "Select
trigger_nestlevel() ..." or not. I've read in the newsgroups and some are
saying you need to, some are saying you don't need to... Since it is a very
well documented feature, can anyone confirm me the proper way of doing this?
That would be greatly appreciated. Thanks.
|||Great. I'm not replicating this table. Thanks for the information.
"Kestutis Adomavicius" <kicker.lt@.noospaam_tut.by> wrote in message
news:eVz8BD8WFHA.1796@.TK2MSFTNGP15.phx.gbl...
> Nest level check allows to avoid ping-pong traffic from subscriber to
> publisher and vice versa
> But in your case that should matter only if you are also replicating table
> tblTest
> --
> Regards,
> Kestutis Adomavicius
> Consultant
> UAB "Baltic Software Solutions"
>
> "Christian Hamel" <chamel@.NOSPAM.com> wrote in message
> news:udebeQ7WFHA.2692@.TK2MSFTNGP15.phx.gbl...
> Hello,
> I have a scenario where clients enter data into a MSDE local database
on
> their laptop. I would like to add a trigger on that table that fires only
> on the Server (SQL2K Ent.) when they are synchronizing when a new records
> has been inserted. By looking at the Merge trigger automaticcaly
generated
> on the table, I found something interesting:
> "if sessionproperty('replication_agent') = 1 and (select
> trigger_nestlevel()) = 1"
> Therfore, I've created my trigger like the following:
> Create Trigger tg_Inserted On tblBlaBla FOR INSERT
> AS
> if not sessionproperty('replication_agent') = 1
> return
> Insert Into tblTest (Account_Code, Product_Code, DateCreation)
> Select ins.Account_code, ins.Product_Code, GetDate()
> From Inserted As Ins
> I've done some test and everything works fine. However, before putting
this
> in Production, I was wondering if I absolutely need to put the "Select
> trigger_nestlevel() ..." or not. I've read in the newsgroups and some are
> saying you need to, some are saying you don't need to... Since it is a
very
> well documented feature, can anyone confirm me the proper way of doing
this?
> That would be greatly appreciated. Thanks.
>
|||I think it is to prevent recursive triggers from causing duplicate entries
in msmerge_contents. I could be wrong here.
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
"Christian Hamel" <chamel@.NOSPAM.com> wrote in message
news:udebeQ7WFHA.2692@.TK2MSFTNGP15.phx.gbl...
> Hello,
> I have a scenario where clients enter data into a MSDE local database
on
> their laptop. I would like to add a trigger on that table that fires only
> on the Server (SQL2K Ent.) when they are synchronizing when a new records
> has been inserted. By looking at the Merge trigger automaticcaly
generated
> on the table, I found something interesting:
> "if sessionproperty('replication_agent') = 1 and (select
> trigger_nestlevel()) = 1"
> Therfore, I've created my trigger like the following:
> Create Trigger tg_Inserted On tblBlaBla FOR INSERT
> AS
> if not sessionproperty('replication_agent') = 1
> return
> Insert Into tblTest (Account_Code, Product_Code, DateCreation)
> Select ins.Account_code, ins.Product_Code, GetDate()
> From Inserted As Ins
> I've done some test and everything works fine. However, before putting
this
> in Production, I was wondering if I absolutely need to put the "Select
> trigger_nestlevel() ..." or not. I've read in the newsgroups and some are
> saying you need to, some are saying you don't need to... Since it is a
very
> well documented feature, can anyone confirm me the proper way of doing
this?
> That would be greatly appreciated. Thanks.
>

Wednesday, March 28, 2012

Merge Replication works then fails, works then fails, and so on

I have a merge replication environment with one central
publisher/distributor and 35 clients. The merge uses continuous
replication. At the moment, 31 of the 35 subscriptions have error this
error:
The process could not check existence of generation at the 'Subscriber'.
(Source: Merge Replication Provider (Agent); Error number: -2147201003)
General network error. Check your network documentation.
(Source: SERVER002 (Data source); Error number: 11)
Occasionally some will start working again; and then later fail again. I'm
sure that all permissions must be correct because they work 70 to 80 % of
the time. I don't understand why so many fail so frequently though, and
then why they start working again. Also, there are 2 that NEVER fail with
this message.
Any ideas? I do have a separate schedule to restart all the replication
jobs every hour just in case they are not running - but that is a band-aid.
Thanks,
Rob Kraft
general network error almost always means that the connection has been
broken - its a network failure problem not a problem with SQL Server or
replication.
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
"Rob Kraft" <robkraft@.msn.com> wrote in message
news:%23Q6xWBJ7FHA.2012@.TK2MSFTNGP14.phx.gbl...
>I have a merge replication environment with one central
> publisher/distributor and 35 clients. The merge uses continuous
> replication. At the moment, 31 of the 35 subscriptions have error this
> error:
> The process could not check existence of generation at the 'Subscriber'.
> (Source: Merge Replication Provider (Agent); Error number: -2147201003)
> ----
> --
> General network error. Check your network documentation.
> (Source: SERVER002 (Data source); Error number: 11)
> ----
> --
> Occasionally some will start working again; and then later fail again.
> I'm
> sure that all permissions must be correct because they work 70 to 80 % of
> the time. I don't understand why so many fail so frequently though, and
> then why they start working again. Also, there are 2 that NEVER fail with
> this message.
> Any ideas? I do have a separate schedule to restart all the replication
> jobs every hour just in case they are not running - but that is a
> band-aid.
> Thanks,
> Rob Kraft
>
sql

Monday, March 26, 2012

Merge Replication Weird Scenario

My topology:
On the national Server: SQL 2005 Enterprise
On the mobile clients: SQL 2005 Workgroup.
The Scenario:
2 mobile subscriber S1 and S2 to the same simple merge publication P1 on
server N
Day 1,
S1 and S2 both synch up with N and both go off to do fieldwork
Day3,
S1 and S2 both synch up with N.
S1 goes back to work
S2 shutdown the laptop and goes on 2-week vacation.
2 Weeks late
S1 Synch up wit the server and goes off to do fieldwork.
S2 meets S1 in the field. They workfield is in the North Pole.
S2 has the laptop with data 2-weeks old but no longer can have access to the
master publisher N to synch the replica and get latest changes.
S2 will have to sync with S1 since S1 database is fresh. The challenge is to
have S2 and S1 replica identical
The Questions:
Is it possible for S2 to sync with S1 and if yes then and how to go about
it… we need S1 and S2 to have identical replica on their machines?
Now that S1 and S2 are have identical databases and are both doing their
fieldwork in the northpole. Can they both sync back with the national
publisher N when they have access?
Keep in mind that S2 got its data updated from the replica on S1?
Thank you!
No, what you are describing is multi master replication and SQL Server does
not support it.
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
"maher" <maher@.discussions.microsoft.com> wrote in message
news:325C94F9-A80F-4CB6-95FA-5DEF41A8D1CC@.microsoft.com...
> My topology:
> On the national Server: SQL 2005 Enterprise
> On the mobile clients: SQL 2005 Workgroup.
>
> The Scenario:
> 2 mobile subscriber S1 and S2 to the same simple merge publication P1 on
> server N
>
> Day 1,
> S1 and S2 both synch up with N and both go off to do fieldwork
> Day3,
> S1 and S2 both synch up with N.
> S1 goes back to work
> S2 shutdown the laptop and goes on 2-week vacation.
> 2 Weeks late
> S1 Synch up wit the server and goes off to do fieldwork.
> S2 meets S1 in the field. They workfield is in the North Pole.
> S2 has the laptop with data 2-weeks old but no longer can have access to
> the
> master publisher N to synch the replica and get latest changes.
> S2 will have to sync with S1 since S1 database is fresh. The challenge is
> to
> have S2 and S1 replica identical
>
> The Questions:
> Is it possible for S2 to sync with S1 and if yes then and how to go about
> it. we need S1 and S2 to have identical replica on their machines?
>
> Now that S1 and S2 are have identical databases and are both doing their
> fieldwork in the northpole. Can they both sync back with the national
> publisher N when they have access?
> Keep in mind that S2 got its data updated from the replica on S1?
> Thank you!
>
sql

Wednesday, March 21, 2012

Merge Replication Problems after upgrade to SQL Express

Hello,
I have the following scenario. An application using SQL Server Standard
Edition 2000 SP3 on the server side and clients using MSDE 2000A (SP3a) on
the client machine. Since the client is offline quite often merge replication
is used to keep the clients in sync.
Now we try to upgrade to SQL Server 2005 SP1. The publisher and distributor
upgrade (on the same box) worked fine and all clients could still
synchronize. Fine :-)
Now we try to upgrade the clients to SQL Express SP1. Now the problems start
:-(
1) After the upgrade the entry within the Synchronization Manager is gone
(we can overcome this by using sp_MSregistersubscription or by manually
disable and enable Synchronization manager on the subscription properties)
2) Initial Synchronization (takes a long time but) works fine. But if I try
to reinitialize the clients I get the following error:
Error messages:
The merge process could not clean up the subscription to
'tstvmw23':'Product:'Product'. (Source: MSSQL_REPL, Error number:
MSSQL_REPL-2147200965)
Get help: http://help/MSSQL_REPL-2147200965
New request is not allowed to start because it should come with valid
transaction descriptor. (Source: MSSQLServer, Error number: 3989)
Get help: http://help/3989
Remark the test system I use is a nearly empty db (only with full schema and
a few lookup tables) with 15MB. The same error occures if I drop the
subscription before the upgrade and recreate it afterwards. The only way to
get rid of this error is to drop the database and then recreate the
subscription.
Please help otherwise I'm forced to step back to MSDE.
Thanks in advance,
Thomas Hotz
Just some additional information:
The error seems to come from the exec sp_MSCleanupForPullReinit
N'Product',N'Product',N'tstvmw23' call. If I execute this sp manually
replication works again and the snapshot is reapplied also at the beginning
all tables are enumerated for changes.
All following reinit's will work fine afterwards.
I haven't tried to run sp_MSCleanupForPullReinit within a transaction but
that is the next step.
Greetings,
Thomas
"ThoHot00" wrote:

> Hello,
> I have the following scenario. An application using SQL Server Standard
> Edition 2000 SP3 on the server side and clients using MSDE 2000A (SP3a) on
> the client machine. Since the client is offline quite often merge replication
> is used to keep the clients in sync.
> Now we try to upgrade to SQL Server 2005 SP1. The publisher and distributor
> upgrade (on the same box) worked fine and all clients could still
> synchronize. Fine :-)
> Now we try to upgrade the clients to SQL Express SP1. Now the problems start
> :-(
> 1) After the upgrade the entry within the Synchronization Manager is gone
> (we can overcome this by using sp_MSregistersubscription or by manually
> disable and enable Synchronization manager on the subscription properties)
> 2) Initial Synchronization (takes a long time but) works fine. But if I try
> to reinitialize the clients I get the following error:
> Error messages:
> The merge process could not clean up the subscription to
> 'tstvmw23':'Product:'Product'. (Source: MSSQL_REPL, Error number:
> MSSQL_REPL-2147200965)
> Get help: http://help/MSSQL_REPL-2147200965
> New request is not allowed to start because it should come with valid
> transaction descriptor. (Source: MSSQLServer, Error number: 3989)
> Get help: http://help/3989
> Remark the test system I use is a nearly empty db (only with full schema and
> a few lookup tables) with 15MB. The same error occures if I drop the
> subscription before the upgrade and recreate it afterwards. The only way to
> get rid of this error is to drop the database and then recreate the
> subscription.
> Please help otherwise I'm forced to step back to MSDE.
> Thanks in advance,
> Thomas Hotz
>
|||Does this help?
http://support.microsoft.com/default.aspx/kb/916002
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
"ThoHot00" <ThoHot00@.discussions.microsoft.com> wrote in message
news:E2A022F6-C84D-43CF-936C-C4648ECA142E@.microsoft.com...
> Hello,
> I have the following scenario. An application using SQL Server Standard
> Edition 2000 SP3 on the server side and clients using MSDE 2000A (SP3a)
> on
> the client machine. Since the client is offline quite often merge
> replication
> is used to keep the clients in sync.
> Now we try to upgrade to SQL Server 2005 SP1. The publisher and
> distributor
> upgrade (on the same box) worked fine and all clients could still
> synchronize. Fine :-)
> Now we try to upgrade the clients to SQL Express SP1. Now the problems
> start
> :-(
> 1) After the upgrade the entry within the Synchronization Manager is gone
> (we can overcome this by using sp_MSregistersubscription or by manually
> disable and enable Synchronization manager on the subscription properties)
> 2) Initial Synchronization (takes a long time but) works fine. But if I
> try
> to reinitialize the clients I get the following error:
> Error messages:
> The merge process could not clean up the subscription to
> 'tstvmw23':'Product:'Product'. (Source: MSSQL_REPL, Error number:
> MSSQL_REPL-2147200965)
> Get help: http://help/MSSQL_REPL-2147200965
> New request is not allowed to start because it should come with valid
> transaction descriptor. (Source: MSSQLServer, Error number: 3989)
> Get help: http://help/3989
> Remark the test system I use is a nearly empty db (only with full schema
> and
> a few lookup tables) with 15MB. The same error occures if I drop the
> subscription before the upgrade and recreate it afterwards. The only way
> to
> get rid of this error is to drop the database and then recreate the
> subscription.
> Please help otherwise I'm forced to step back to MSDE.
> Thanks in advance,
> Thomas Hotz
>
|||Hi Hilary,
thanks for your reply. I tried this already. I installed the hotfix on the
subscriber but that didn't help. I haven't applied it to the server since I
thought replication is pulled from the subscriber and the server shouldn't
cause this problem.
Thanks again - Greetings,
Thomas
"Hilary Cotter" wrote:

> Does this help?
> http://support.microsoft.com/default.aspx/kb/916002
> --
> 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
>
> "ThoHot00" <ThoHot00@.discussions.microsoft.com> wrote in message
> news:E2A022F6-C84D-43CF-936C-C4648ECA142E@.microsoft.com...
>
>
|||Hi Hilary,
I applied the hotfix on the server and client now, restarted both machines
and the error is still there.
Greetings,
Thomas
"Hilary Cotter" wrote:

> Does this help?
> http://support.microsoft.com/default.aspx/kb/916002
> --
> 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
>
> "ThoHot00" <ThoHot00@.discussions.microsoft.com> wrote in message
> news:E2A022F6-C84D-43CF-936C-C4648ECA142E@.microsoft.com...
>
>
|||In my experience the error actually referred to a timeout during the
already mentioned sp_MSCleanupForPullReinit. The stored proc tries to
drop all the tables, stored procs, triggers etc within the timeout
period specified in WSM (default 30 seconds). It would be worth
profiling the client to see at what point the error occurs i.e. is it
exactly 30 seconds (or whatever your timeout is set to) after the
stored proc starts.
On Feb 11, 11:01 am, ThoHot00 <ThoHo...@.discussions.microsoft.com>
wrote:[vbcol=seagreen]
> Hi Hilary,
> I applied the hotfix on the server and client now, restarted both machines
> and the error is still there.
> Greetings,
> Thomas
> "Hilary Cotter" wrote:
>
>
>
>
>
>
>
|||Hi Tim,
thanks for the hint. This seems to be the problem (and also explain why this
error was so difficult to track). Do you now if it is possible to increase
the default timeout of WSM.
This also explains why begin trans; exec sp_MScleanupForPullReinit
...;rollback trans; solved the problem quite often. Because all data was
already in memory and therefore exec sp_MScleanupForPullReinit executed
within the 30s (the first time it requires 47s).
Greetings,
Thomas
"Tim" wrote:

> In my experience the error actually referred to a timeout during the
> already mentioned sp_MSCleanupForPullReinit. The stored proc tries to
> drop all the tables, stored procs, triggers etc within the timeout
> period specified in WSM (default 30 seconds). It would be worth
> profiling the client to see at what point the error occurs i.e. is it
> exactly 30 seconds (or whatever your timeout is set to) after the
> stored proc starts.
> On Feb 11, 11:01 am, ThoHot00 <ThoHo...@.discussions.microsoft.com>
> wrote:
>
>
|||Hi Tim,
thanks again. I found out that I need to specify QueryTimeout as DWORD
within HKLM\Software\Microsoft\Microsoft SQL
Server\90\Replication\Subscription\<Server>:<Publi cation>:<Database>. If I
specify 120 there for QueryTimeout synchronization work again and Profiler
shows an execution time of 62241 for sp_MScleanupPullForReinit.
Microsoft should specify a better error message there - that would have
saved me a lot of time.
Greetings,
Thomas
"Tim" wrote:

> In my experience the error actually referred to a timeout during the
> already mentioned sp_MSCleanupForPullReinit. The stored proc tries to
> drop all the tables, stored procs, triggers etc within the timeout
> period specified in WSM (default 30 seconds). It would be worth
> profiling the client to see at what point the error occurs i.e. is it
> exactly 30 seconds (or whatever your timeout is set to) after the
> stored proc starts.
> On Feb 11, 11:01 am, ThoHot00 <ThoHo...@.discussions.microsoft.com>
> wrote:
>
>
sql

merge replication problem

hi all,
i have a merge replication setup with sql2k sp3 and msde clients.
all works great except, I can see that some changes are not accepted
through replication - the text reverts back to its original text !
I'm not sure what this could be - have tried changing the value manually
on the publisher/ditributor but a few minutes later its back to the
original text!
any help would be appreciated !
tia.
Ranjeet.
check the conflict viewer. YOu are likely to find the problem there.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"ranjeet" <not-telling> wrote in message
news:opsdnndrdav8so89@.athwalrt40.castlewood.co.uk. ..
> hi all,
> i have a merge replication setup with sql2k sp3 and msde clients.
> all works great except, I can see that some changes are not accepted
> through replication - the text reverts back to its original text !
> I'm not sure what this could be - have tried changing the value manually
> on the publisher/ditributor but a few minutes later its back to the
> original text!
> any help would be appreciated !
> tia.
> Ranjeet.
|||Thanks for your help (Hillary and Paul)
I can't see any conflicts in the conflict viewer at the moment - however,
I did recently resolve one that relates to the same table.
I will try the fix provided by microsoft as soon as I can get a copy of
the patch.
thanks.
On Wed, 1 Sep 2004 08:57:10 -0700, Paul Ibison <Paul.Ibison@.Pygmalion.Com>
wrote:

> Ranjeet,
> can you check to see if there are any conflicts in the
> please conflict viewer.
> Also, this may be called the "compensate_for_errors"
> problem. If a change from publisher fails to get applied
> at the subscriber (for some reason, PK,FK,CHECK,etc
> constraints) it undoes the change at the publisher. So a
> insert from publisher when fails at the subscriber gets
> deleted at the publisher too. Similary a delete from
> publisher which fails at the subscriber, it gets re-
> inserted at the publisher. Have a look at
> http://support.microsoft.com/default.aspx?scid=kb;en-
> us;828637&Product=sql2k to see if it applies.
> HTH,
> Paul Ibison
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
sql

Merge replication Primary Key violations

I have a Merge Replication Problem and I'm not sure how to proceed.

Given the following:

Multiple clients have merge subscriptions to a central Server's DB.
DB contains a table tblUser
tblUser has a Varchar field; UserLoginName, which is Primary Key.
It also has an integer field, UserValue


The replication is configured to resolve to the greater integer value.

Client 1 creates a new User
INSERT tblUser
(UserLoginName, UserValue)
VALUES('Fred',1)
At the same time Client 2 does the same thing, but with a larger value
INSERT tblUSer
(UserLoginName, UserValue)
VALUES('Fred', 2)


One of the inserts will get to the Central Server first.
The other will form a conflict.

A row insert at 'Client2.dbUsers' could not be propagated to 'CentralServer.dbUsers'.
This failure can be caused by a constraint violation.
Violation of PRIMARY KEY constraint 'PK_tblUser_1'. Cannot insert duplicate key in object 'dbo.tblUser'.

So now I have two different value fields and a conflict that cannot be resolved.


Is this fixable?
Do I need to make changes at athe Architechture level?

Hi Brian,

if you need to store both records from all subscribers, You should add a column for client id .So once tables replicates from all subscribers each client has their own id.

Example: if client 1 has the code 100 and client 2 has the code 200

the table at subscriber will be : 100,'Fred',1 (Record comes from client 1)

200,'Fred',1 (Record comes from client 2)

if you need to resolve the conflict and to store 1 record only you should assign priority for each subscriber

For more details check the following URL : http://support.microsoft.com/kb/315514

Regards,

Tarek Ghazali

SQL Server MVP

http://www.sqlmvp.com

|||

I need to store only the higher of the two.

If the record already exists and both try to update the record, only the higher is stored, as desired.

But when the record does not exist, both subscribers do an insert, and it does not store only the higher.

Reading all the KB articles on merge replication, it appears that Updates and Inserts are supposed to be resolved the same.

I can't use subscriber priority, as I don't care WHERE the record came from, only the value stored.

Monday, March 19, 2012

Merge replication performance problems

Hi,
I have a merge replication between MSSQL2005 as a server, and SQLExpress
as the clients. The publication contains dynamic filters, ~190 tables and
~300 joins (the longest path in a "join tree" is 12), currently I'm testing
on database that contains ~2GB of data. If I use a precomputed partitions
- it seems to work, but it just kills the performance of the back-end application;
If I don't use precomputed partitions it constantly fails (during subscriber's
synchronization) with "The merge process failed to enumerate changes in articles
with parameterized row filters... Query timeout expired..." error. The problem
is that there's no additional info - so I don't even know what was the problematic
query... Please help
I would consider trying to use static filters if you have a smallish number
of subscribers. You'll need a separate publication for each subscriber but
the performance is much improved. Apart from that you can increase the
querytimeout value as a possibility and use logging if this doesn't work.
Cheers,
Paul Ibison
|||Hello Paul,
Thanks for the answer, I'd like to clarify couple of things:
1. What do you mean by smallish number? less than 10? or less than 100 is
OK too?
2. I've increased the querytimeout for the agent (which didn't help). Can
you please provide me the details for the logging part? With the highest
-HistoryVerboseLevel I still can't see the exact sqls that are executed,
so I have no idea where the timeout error is coming from; and in SQLProfiler
all I see is the calls to sp_setupbelongs procedure...
Thanks again,
Vladimir Kofman

> I would consider trying to use static filters if you have a smallish
> number
> of subscribers. You'll need a separate publication for each subscriber
> but
> the performance is much improved. Apart from that you can increase the
> querytimeout value as a possibility and use logging if this doesn't
> work.
> Cheers,
> Paul Ibison
|||This'll help for logging: http://support.microsoft.com/Default.aspx?id=312292
The reason I mentioned a smallish number of subscribers as a distinction was
purely practical. If you have the time to set up 100 publications with static
filters then I'd definitely recommend this over dynamic filters.
HTH,
Paul Ibison

Merge Replication over Internet with MSDE and Sql Server (Urgent)

Hello,
I would like to setup Merge Replication between a central Sql Server as
publisher and a variety of MSDE clients as subscribers. The catch that I am
running into is that I want to be able to do this over the Internet. I have
set this up with SQL CE, so I assume that it is possible with MSDE, however,
I just can't seem to find any documentation on this. I would appreciate it
if someone could tell me if this is possible or not.
Other questions I have (but have not research a ton for yet are)
1) How can I programatically kick off a sync on the MSDE from a .NET
application?
2) If conflicts occur, how can I programatically get the conflicts back to
the client application to display in a form and allow the user to resolve
them?
It is frustrating that this is so easy with SQL CE and here I can't seem to
figure out how to do it with MSDE.
Thanks so much for your help.
Marie
Create your publication for anonymous pull. Use the merge ActiveX control on
the subscriber to pull the subscription.
You will need to specify the publisher name, network name (ie ipaddress or
FQDN), and transport mechanism using Publisher, PublisherAddress, and
PublisherNetwork properties respectively.
Check out this link for more info.
http://support.microsoft.com/default...&Product=sql2k
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Marie" <Marie@.discussions.microsoft.com> wrote in message
news:70B8068D-06BA-4036-9433-BF3B5FBB9714@.microsoft.com...
> Hello,
> I would like to setup Merge Replication between a central Sql Server as
> publisher and a variety of MSDE clients as subscribers. The catch that I
am
> running into is that I want to be able to do this over the Internet. I
have
> set this up with SQL CE, so I assume that it is possible with MSDE,
however,
> I just can't seem to find any documentation on this. I would appreciate
it
> if someone could tell me if this is possible or not.
> Other questions I have (but have not research a ton for yet are)
> 1) How can I programatically kick off a sync on the MSDE from a .NET
> application?
> 2) If conflicts occur, how can I programatically get the conflicts back to
> the client application to display in a form and allow the user to resolve
> them?
> It is frustrating that this is so easy with SQL CE and here I can't seem
to
> figure out how to do it with MSDE.
> Thanks so much for your help.
> Marie
>
>
>
|||Actually I am a little wrong on question 2. With Windows Synchronization
Manager, you click on your subscription, click on properties, click on
other, and select Resolve Conflicts Interactively.
You can also use the Microsoft SQL Conflict Resolver control for this.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:%23sqW9bYiEHA.3428@.TK2MSFTNGP11.phx.gbl...
> Create your publication for anonymous pull. Use the merge ActiveX control
on
> the subscriber to pull the subscription.
> You will need to specify the publisher name, network name (ie ipaddress or
> FQDN), and transport mechanism using Publisher, PublisherAddress, and
> PublisherNetwork properties respectively.
> Check out this link for more info.
>
http://support.microsoft.com/default...&Product=sql2k[vbcol=seagreen]
> --
> Hilary Cotter
> Looking for a book on SQL Server replication?
> http://www.nwsu.com/0974973602.html
>
> "Marie" <Marie@.discussions.microsoft.com> wrote in message
> news:70B8068D-06BA-4036-9433-BF3B5FBB9714@.microsoft.com...
I[vbcol=seagreen]
> am
> have
> however,
> it
to[vbcol=seagreen]
resolve
> to
>
|||BTW - your answer to number 2 is AFAIK - no. When you set up your merge
publication for interactive conflict resolution, pull it using Windows
Synchronization Manager, and a conflict occurs you get a dialog telling you
a conflict has occured and to contact your system administrator.
At this point you can educate your users to open the Conflict Resolver on
their own, or simply to contact you and you can resolve them.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:%23sqW9bYiEHA.3428@.TK2MSFTNGP11.phx.gbl...
> Create your publication for anonymous pull. Use the merge ActiveX control
on
> the subscriber to pull the subscription.
> You will need to specify the publisher name, network name (ie ipaddress or
> FQDN), and transport mechanism using Publisher, PublisherAddress, and
> PublisherNetwork properties respectively.
> Check out this link for more info.
>
http://support.microsoft.com/default...&Product=sql2k[vbcol=seagreen]
> --
> Hilary Cotter
> Looking for a book on SQL Server replication?
> http://www.nwsu.com/0974973602.html
>
> "Marie" <Marie@.discussions.microsoft.com> wrote in message
> news:70B8068D-06BA-4036-9433-BF3B5FBB9714@.microsoft.com...
I[vbcol=seagreen]
> am
> have
> however,
> it
to[vbcol=seagreen]
resolve
> to
>

Merge replication on MSDE over internet

Hi,
We are having a dedicated machine (with a fix IP) running SQl2000 and it is
supposed to be the master database. And we are having 4 clients XP machine
running MSDE (without fix IP), and we would like to have a merge replication
to sync. data from / to the client / server. Coz data will be updated on
server or clients side. I have simulated this environment on a LAN
environment and it works but I 'm not sure whether if those clients machine
are connected to the server through internet via ADSL connection(without a
fix IP).
please help ... !!! thanks.
-Wing
you must use the replication ActiveX merge control. Set the
DistributorAddress and the PublisherAddress to be the IP address of your
publisher and the DIstributorNetwork and PublisherNetwork to be TCPIP
"Wing Chan" <wing_650473hk@.yahoo.com.hk> wrote in message
news:uGjl5RxyEHA.824@.TK2MSFTNGP11.phx.gbl...
> Hi,
> We are having a dedicated machine (with a fix IP) running SQl2000 and it
> is
> supposed to be the master database. And we are having 4 clients XP
> machine
> running MSDE (without fix IP), and we would like to have a merge
> replication
> to sync. data from / to the client / server. Coz data will be updated on
> server or clients side. I have simulated this environment on a LAN
> environment and it works but I 'm not sure whether if those clients
> machine
> are connected to the server through internet via ADSL connection(without a
> fix IP).
> please help ... !!! thanks.
> -Wing
>
|||thanks... is there any sample source code on that ? besides using ActiveX
merge control, is there any way not using control ?
also does the ActiveX merge control support VB6, thanks.
"Hilary Cotter" <hilary.cotter@.gmail.com> bl
news:%23f8Kxk1yEHA.2540@.TK2MSFTNGP09.phx.gbl g...[vbcol=seagreen]
> you must use the replication ActiveX merge control. Set the
> DistributorAddress and the PublisherAddress to be the IP address of your
> publisher and the DIstributorNetwork and PublisherNetwork to be TCPIP
>
> "Wing Chan" <wing_650473hk@.yahoo.com.hk> wrote in message
> news:uGjl5RxyEHA.824@.TK2MSFTNGP11.phx.gbl...
on[vbcol=seagreen]
a
>
|||We currently have 4 locations replicating such. What I do is setup SQL Server
to dial VPN setup at our main office (Publisher). Each subscriber dials VPN,
performs replication, and then disconnects the VPN. This works great...they
sync every hour.
"Wing Chan" wrote:

> Hi,
> We are having a dedicated machine (with a fix IP) running SQl2000 and it is
> supposed to be the master database. And we are having 4 clients XP machine
> running MSDE (without fix IP), and we would like to have a merge replication
> to sync. data from / to the client / server. Coz data will be updated on
> server or clients side. I have simulated this environment on a LAN
> environment and it works but I 'm not sure whether if those clients machine
> are connected to the server through internet via ADSL connection(without a
> fix IP).
> please help ... !!! thanks.
> -Wing
>
>
|||Hi

> Each subscriber dials VPN,
> performs replication, and then disconnects the VPN.
Where do you handle the VPN dial/disconnect? Do you add a step to the Agent
job or something else?
I'll appreciate any details.
Regards,
|||Yes, just add new steps to the Merge Agent job. First step would be of Type
"Operating System Command (CmdExec)" and would read something like
rasdial vpn_connection_name user password domain:/your_domain_name
Then add another step after the Replication agent to disconnect. Same as
above but the command text would be:
rasdial vpn_connection_name /disconnect
Important Note: It appears that the Merge Agent job step attempts to run
immediately after the first Connect VPN step is run. If you're relying on
NETBIOS name resolution, you WILL need to add a retry on the replication
step. This is simply because it takes a little bit of time for your VPN IP
settings to be configured upon first connection. The first merge attempt
almost always fails for me because it can't locate the Publisher name yet. If
you're connecting via straight IP addresses, then this will not be a problem.
Besides that, this works like a charm for our multi-city office replication
on an hourly basis.
"Carlos Gutierrez" wrote:

> Hi
>
> Where do you handle the VPN dial/disconnect? Do you add a step to the Agent
> job or something else?
> I'll appreciate any details.
> Regards,
>
>

Merge replication on MSDE over internet

Hi,
We are having a dedicated machine (with a fix IP) running SQl2000 and it is
supposed to be the master database. And we are having 4 clients XP machine
running MSDE (without fix IP), and we would like to have a merge replication
to sync. data from / to the client / server. Coz data will be updated on
server or clients side. I have simulated this environment on a LAN
environment and it works but I 'm not sure whether if those clients machine
are connected to the server through internet via ADSL connection(without a
fix IP).
please help ... !!! thanks.
-Wing
you must use the replication ActiveX merge control. Set the
DistributorAddress and the PublisherAddress to be the IP address of your
publisher and the DIstributorNetwork and PublisherNetwork to be TCPIP
"Wing Chan" <wing_650473hk@.yahoo.com.hk> wrote in message
news:uGjl5RxyEHA.824@.TK2MSFTNGP11.phx.gbl...
> Hi,
> We are having a dedicated machine (with a fix IP) running SQl2000 and it
> is
> supposed to be the master database. And we are having 4 clients XP
> machine
> running MSDE (without fix IP), and we would like to have a merge
> replication
> to sync. data from / to the client / server. Coz data will be updated on
> server or clients side. I have simulated this environment on a LAN
> environment and it works but I 'm not sure whether if those clients
> machine
> are connected to the server through internet via ADSL connection(without a
> fix IP).
> please help ... !!! thanks.
> -Wing
>
|||thanks... is there any sample source code on that ? besides using ActiveX
merge control, is there any way not using control ?
also does the ActiveX merge control support VB6, thanks.
"Hilary Cotter" <hilary.cotter@.gmail.com> bl
news:%23f8Kxk1yEHA.2540@.TK2MSFTNGP09.phx.gbl g...[vbcol=seagreen]
> you must use the replication ActiveX merge control. Set the
> DistributorAddress and the PublisherAddress to be the IP address of your
> publisher and the DIstributorNetwork and PublisherNetwork to be TCPIP
>
> "Wing Chan" <wing_650473hk@.yahoo.com.hk> wrote in message
> news:uGjl5RxyEHA.824@.TK2MSFTNGP11.phx.gbl...
on[vbcol=seagreen]
a
>
|||We currently have 4 locations replicating such. What I do is setup SQL Server
to dial VPN setup at our main office (Publisher). Each subscriber dials VPN,
performs replication, and then disconnects the VPN. This works great...they
sync every hour.
"Wing Chan" wrote:

> Hi,
> We are having a dedicated machine (with a fix IP) running SQl2000 and it is
> supposed to be the master database. And we are having 4 clients XP machine
> running MSDE (without fix IP), and we would like to have a merge replication
> to sync. data from / to the client / server. Coz data will be updated on
> server or clients side. I have simulated this environment on a LAN
> environment and it works but I 'm not sure whether if those clients machine
> are connected to the server through internet via ADSL connection(without a
> fix IP).
> please help ... !!! thanks.
> -Wing
>
>
|||Hi

> Each subscriber dials VPN,
> performs replication, and then disconnects the VPN.
Where do you handle the VPN dial/disconnect? Do you add a step to the Agent
job or something else?
I'll appreciate any details.
Regards,
|||Yes, just add new steps to the Merge Agent job. First step would be of Type
"Operating System Command (CmdExec)" and would read something like
rasdial vpn_connection_name user password domain:/your_domain_name
Then add another step after the Replication agent to disconnect. Same as
above but the command text would be:
rasdial vpn_connection_name /disconnect
Important Note: It appears that the Merge Agent job step attempts to run
immediately after the first Connect VPN step is run. If you're relying on
NETBIOS name resolution, you WILL need to add a retry on the replication
step. This is simply because it takes a little bit of time for your VPN IP
settings to be configured upon first connection. The first merge attempt
almost always fails for me because it can't locate the Publisher name yet. If
you're connecting via straight IP addresses, then this will not be a problem.
Besides that, this works like a charm for our multi-city office replication
on an hourly basis.
"Carlos Gutierrez" wrote:

> Hi
>
> Where do you handle the VPN dial/disconnect? Do you add a step to the Agent
> job or something else?
> I'll appreciate any details.
> Regards,
>
>

Monday, March 12, 2012

merge replication licensing

This will be the setup:
1 server with:
windows server 2003 standard
sql server 2005 standard
30+ clients with:
windows xp pro
sql server express
I will set up a merge replication (pull) and use web synchronization over
https. No active directory will be used.
The clients connect to the replisapi.dll hosted in the servers IIS and
supply a single predifined windows server user (Basic Authentication) to run
the dll. The dll uses a single predefined sql user to manage all sql traffic
.
What licenses will be required?
As I understand I will need either 30 sql device cals or a per processor
license (the break of point in my case would be 35 cals).
I will probably also need an Internet Connector license for IIS or 30
windows cals.
Is this correct?Assuming the server has 1 physical processor (can be multi core) then you
will need 1 sql server 2005 processor licence - workgroup or standard.
Windows Server 2003 Standard - just the 5 cal one is fine; you don't need a
server cal for each user connecting because they aren't really users of the
server, they are using a service on the server...
Tony
Tony Rogerson, SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson
[Ramblings from the field from a SQL consultant]
http://sqlserverfaq.com
[UK SQL User Community]
"mommi" <mommi@.discussions.microsoft.com> wrote in message
news:A7DDF8D6-3387-411F-BCF4-2169DF60F4F7@.microsoft.com...
> This will be the setup:
> 1 server with:
> windows server 2003 standard
> sql server 2005 standard
> 30+ clients with:
> Windows XP pro
> sql server express
> I will set up a merge replication (pull) and use web synchronization over
> https. No active directory will be used.
> The clients connect to the replisapi.dll hosted in the servers IIS and
> supply a single predifined windows server user (Basic Authentication) to
> run
> the dll. The dll uses a single predefined sql user to manage all sql
> traffic.
> What licenses will be required?
> As I understand I will need either 30 sql device cals or a per processor
> license (the break of point in my case would be 35 cals).
> I will probably also need an Internet Connector license for IIS or 30
> windows cals.
> Is this correct?|||Thanks for the reply.
But doesn't IIS require some sort of a license? For instance if you put up a
webserver using IIS then you need either a processor license or an internet
connector license because you can't predict how many users are actually goin
g
to visit you website at any given time...
I'm assuming my setup would require some sort of license for IIS because of
that.
"Tony Rogerson" wrote:

> Assuming the server has 1 physical processor (can be multi core) then you
> will need 1 sql server 2005 processor licence - workgroup or standard.
> Windows Server 2003 Standard - just the 5 cal one is fine; you don't need
a
> server cal for each user connecting because they aren't really users of th
e
> server, they are using a service on the server...
> Tony
> --
> Tony Rogerson, SQL Server MVP
> http://sqlblogcasts.com/blogs/tonyrogerson
> [Ramblings from the field from a SQL consultant]
> http://sqlserverfaq.com
> [UK SQL User Community]
>
> "mommi" <mommi@.discussions.microsoft.com> wrote in message
> news:A7DDF8D6-3387-411F-BCF4-2169DF60F4F7@.microsoft.com...
>|||Nope - that's part of the server price.
Anyway, the SQL bit is right; perhaps you should ask in the windows server
group and they'll confirm any fears you have.
Tony Rogerson, SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson
[Ramblings from the field from a SQL consultant]
http://sqlserverfaq.com
[UK SQL User Community]
"mommi" <mommi@.discussions.microsoft.com> wrote in message
news:1A5908E0-4554-4E59-97A0-233552B8F853@.microsoft.com...[vbcol=seagreen]
> Thanks for the reply.
> But doesn't IIS require some sort of a license? For instance if you put up
> a
> webserver using IIS then you need either a processor license or an
> internet
> connector license because you can't predict how many users are actually
> going
> to visit you website at any given time...
> I'm assuming my setup would require some sort of license for IIS because
> of
> that.
>
> "Tony Rogerson" wrote:
>

merge replication licensing

This will be the setup:
1 server with:
windows server 2003 standard
sql server 2005 standard
30+ clients with:
windows xp pro
sql server express
I will set up a merge replication (pull) and use web synchronization over
https. No active directory will be used.
The clients connect to the replisapi.dll hosted in the servers IIS and
supply a single predifined windows server user (Basic Authentication) to run
the dll. The dll uses a single predefined sql user to manage all sql traffic.
What licenses will be required?
As I understand I will need either 30 sql device cals or a per processor
license (the break of point in my case would be 35 cals).
I will probably also need an Internet Connector license for IIS or 30
windows cals.
Is this correct?
Thanks for the reply.
But doesn't IIS require some sort of a license? For instance if you put up a
webserver using IIS then you need either a processor license or an internet
connector license because you can't predict how many users are actually going
to visit you website at any given time...
I'm assuming my setup would require some sort of license for IIS because of
that.
"Tony Rogerson" wrote:

> Assuming the server has 1 physical processor (can be multi core) then you
> will need 1 sql server 2005 processor licence - workgroup or standard.
> Windows Server 2003 Standard - just the 5 cal one is fine; you don't need a
> server cal for each user connecting because they aren't really users of the
> server, they are using a service on the server...
> Tony
> --
> Tony Rogerson, SQL Server MVP
> http://sqlblogcasts.com/blogs/tonyrogerson
> [Ramblings from the field from a SQL consultant]
> http://sqlserverfaq.com
> [UK SQL User Community]
>
> "mommi" <mommi@.discussions.microsoft.com> wrote in message
> news:A7DDF8D6-3387-411F-BCF4-2169DF60F4F7@.microsoft.com...
>

merge replication licensing

This will be the setup:
1 server with:
windows server 2003 standard
sql server 2005 standard
30+ clients with:
windows xp pro
sql server express
I will set up a merge replication (pull) and use web synchronization over
https. No active directory will be used.
The clients connect to the replisapi.dll hosted in the servers IIS and
supply a single predifined windows server user (Basic Authentication) to run
the dll. The dll uses a single predefined sql user to manage all sql traffic.
What licenses will be required?
As I understand I will need either 30 sql device cals or a per processor
license (the break of point in my case would be 35 cals).
I will probably also need an Internet Connector license for IIS or 30
windows cals.
Is this correct?Assuming the server has 1 physical processor (can be multi core) then you
will need 1 sql server 2005 processor licence - workgroup or standard.
Windows Server 2003 Standard - just the 5 cal one is fine; you don't need a
server cal for each user connecting because they aren't really users of the
server, they are using a service on the server...
Tony
--
Tony Rogerson, SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson
[Ramblings from the field from a SQL consultant]
http://sqlserverfaq.com
[UK SQL User Community]
"mommi" <mommi@.discussions.microsoft.com> wrote in message
news:A7DDF8D6-3387-411F-BCF4-2169DF60F4F7@.microsoft.com...
> This will be the setup:
> 1 server with:
> windows server 2003 standard
> sql server 2005 standard
> 30+ clients with:
> windows xp pro
> sql server express
> I will set up a merge replication (pull) and use web synchronization over
> https. No active directory will be used.
> The clients connect to the replisapi.dll hosted in the servers IIS and
> supply a single predifined windows server user (Basic Authentication) to
> run
> the dll. The dll uses a single predefined sql user to manage all sql
> traffic.
> What licenses will be required?
> As I understand I will need either 30 sql device cals or a per processor
> license (the break of point in my case would be 35 cals).
> I will probably also need an Internet Connector license for IIS or 30
> windows cals.
> Is this correct?|||Thanks for the reply.
But doesn't IIS require some sort of a license? For instance if you put up a
webserver using IIS then you need either a processor license or an internet
connector license because you can't predict how many users are actually going
to visit you website at any given time...
I'm assuming my setup would require some sort of license for IIS because of
that.
"Tony Rogerson" wrote:
> Assuming the server has 1 physical processor (can be multi core) then you
> will need 1 sql server 2005 processor licence - workgroup or standard.
> Windows Server 2003 Standard - just the 5 cal one is fine; you don't need a
> server cal for each user connecting because they aren't really users of the
> server, they are using a service on the server...
> Tony
> --
> Tony Rogerson, SQL Server MVP
> http://sqlblogcasts.com/blogs/tonyrogerson
> [Ramblings from the field from a SQL consultant]
> http://sqlserverfaq.com
> [UK SQL User Community]
>
> "mommi" <mommi@.discussions.microsoft.com> wrote in message
> news:A7DDF8D6-3387-411F-BCF4-2169DF60F4F7@.microsoft.com...
> > This will be the setup:
> > 1 server with:
> > windows server 2003 standard
> > sql server 2005 standard
> >
> > 30+ clients with:
> > windows xp pro
> > sql server express
> >
> > I will set up a merge replication (pull) and use web synchronization over
> > https. No active directory will be used.
> > The clients connect to the replisapi.dll hosted in the servers IIS and
> > supply a single predifined windows server user (Basic Authentication) to
> > run
> > the dll. The dll uses a single predefined sql user to manage all sql
> > traffic.
> >
> > What licenses will be required?
> >
> > As I understand I will need either 30 sql device cals or a per processor
> > license (the break of point in my case would be 35 cals).
> > I will probably also need an Internet Connector license for IIS or 30
> > windows cals.
> > Is this correct?
>|||Nope - that's part of the server price.
Anyway, the SQL bit is right; perhaps you should ask in the windows server
group and they'll confirm any fears you have.
--
Tony Rogerson, SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson
[Ramblings from the field from a SQL consultant]
http://sqlserverfaq.com
[UK SQL User Community]
"mommi" <mommi@.discussions.microsoft.com> wrote in message
news:1A5908E0-4554-4E59-97A0-233552B8F853@.microsoft.com...
> Thanks for the reply.
> But doesn't IIS require some sort of a license? For instance if you put up
> a
> webserver using IIS then you need either a processor license or an
> internet
> connector license because you can't predict how many users are actually
> going
> to visit you website at any given time...
> I'm assuming my setup would require some sort of license for IIS because
> of
> that.
>
> "Tony Rogerson" wrote:
>> Assuming the server has 1 physical processor (can be multi core) then you
>> will need 1 sql server 2005 processor licence - workgroup or standard.
>> Windows Server 2003 Standard - just the 5 cal one is fine; you don't need
>> a
>> server cal for each user connecting because they aren't really users of
>> the
>> server, they are using a service on the server...
>> Tony
>> --
>> Tony Rogerson, SQL Server MVP
>> http://sqlblogcasts.com/blogs/tonyrogerson
>> [Ramblings from the field from a SQL consultant]
>> http://sqlserverfaq.com
>> [UK SQL User Community]
>>
>> "mommi" <mommi@.discussions.microsoft.com> wrote in message
>> news:A7DDF8D6-3387-411F-BCF4-2169DF60F4F7@.microsoft.com...
>> > This will be the setup:
>> > 1 server with:
>> > windows server 2003 standard
>> > sql server 2005 standard
>> >
>> > 30+ clients with:
>> > windows xp pro
>> > sql server express
>> >
>> > I will set up a merge replication (pull) and use web synchronization
>> > over
>> > https. No active directory will be used.
>> > The clients connect to the replisapi.dll hosted in the servers IIS and
>> > supply a single predifined windows server user (Basic Authentication)
>> > to
>> > run
>> > the dll. The dll uses a single predefined sql user to manage all sql
>> > traffic.
>> >
>> > What licenses will be required?
>> >
>> > As I understand I will need either 30 sql device cals or a per
>> > processor
>> > license (the break of point in my case would be 35 cals).
>> > I will probably also need an Internet Connector license for IIS or 30
>> > windows cals.
>> > Is this correct?
>>

Friday, March 9, 2012

Merge replication failure

Hello,
I have an SQL2000 server, which acts as the distributor and as the
publisher. The clients are Pocket PC's, using SQL Server CE. I have the
latest SP for both. The replication is a merge replication, with a lot of
join filters, more than 100 articles (only tables, no views or procedures
included). The average size of the database on the clients is about ~7MB.
Sometimes, following a massive delete on several tables (delete from table,
than insert into table select from sthing), I have got the following error
message during replication:
1. "a call to the sql server reconciler has failed"
2. "failed to enumerate changes"
3. "select permission denied on column <pk> of object MS_<long-long guid>"
The error occurs in the stored procedure sp_MSsetupbelongs.
Actually, the message is right, the user has no rights to the referred
table. But. This is a generated table, created by the replication itself (I
think this is the table used for deletion). After I've added the rights, the
error disapperared. Reinitialize also helps.
Do I have to do this all for the tables in the publication? I could not do
this, because of the generated table names.
Or this is a bug?
Thanks for replies,
Tamas Beri
Funny, but I can't find anything better solution than this one:
select
'grant select on '+sysobjects.name+' to sales;'
from
sysobjects
where
name like 'MS_bi%_v_%'
order by
sysobjects.name;
After you ran this generated script, the whole problem described down there
disappears.
Do You have any information about the Service Pack 4? I have a lot of
problems with sql server ce and merge replication.
Regards,
Tamas Beri
"Beri Tamas" <gfoyle@.freemail.hu> az albbiakat rta a kvetkezo zenetben
news:uYP%23YL89EHA.2984@.TK2MSFTNGP09.phx.gbl...
> Hello,
> I have an SQL2000 server, which acts as the distributor and as the
> publisher. The clients are Pocket PC's, using SQL Server CE. I have the
> latest SP for both. The replication is a merge replication, with a lot of
> join filters, more than 100 articles (only tables, no views or procedures
> included). The average size of the database on the clients is about ~7MB.
> Sometimes, following a massive delete on several tables (delete from
table,
> than insert into table select from sthing), I have got the following error
> message during replication:
> 1. "a call to the sql server reconciler has failed"
> 2. "failed to enumerate changes"
> 3. "select permission denied on column <pk> of object MS_<long-long guid>"
> The error occurs in the stored procedure sp_MSsetupbelongs.
> Actually, the message is right, the user has no rights to the referred
> table. But. This is a generated table, created by the replication itself
(I
> think this is the table used for deletion). After I've added the rights,
the
> error disapperared. Reinitialize also helps.
> Do I have to do this all for the tables in the publication? I could not do
> this, because of the generated table names.
> Or this is a bug?
> Thanks for replies,
> Tamas Beri
|||Hi Beri,
Replication shouldn't require you to issue the explicit select on this
particular object. Can you please provide some more info so that we can try
to create the repro in our test environment?
1. What kind of permission have you provided to publisher and distributor
login?
2. What's the type of object 'MS_bi%_v_%' - view, SP, etc?
3. Can you please provide the content of following tables - sysmergearticles
& sysmergepublications?
4. In case you are okay - can you post your scripts which you used to setup
your replication?
thanks - Deepak
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Beri Tamas" <gfoyle@.freemail.hu> wrote in message
news:Ocybvt%239EHA.2984@.TK2MSFTNGP09.phx.gbl...
> Funny, but I can't find anything better solution than this one:
> select
> 'grant select on '+sysobjects.name+' to sales;'
> from
> sysobjects
> where
> name like 'MS_bi%_v_%'
> order by
> sysobjects.name;
> After you ran this generated script, the whole problem described down
there[vbcol=seagreen]
> disappears.
> Do You have any information about the Service Pack 4? I have a lot of
> problems with sql server ce and merge replication.
> Regards,
> Tamas Beri
> "Beri Tamas" <gfoyle@.freemail.hu> az albbiakat rta a kvetkezo zenetben
> news:uYP%23YL89EHA.2984@.TK2MSFTNGP09.phx.gbl...
of[vbcol=seagreen]
procedures[vbcol=seagreen]
~7MB.[vbcol=seagreen]
> table,
error[vbcol=seagreen]
guid>"[vbcol=seagreen]
> (I
> the
do
>
|||Same error here, but I run the script and still get it.
Any more on this one?

Saturday, February 25, 2012

Merge Replication Architecture Planning Guidance

Hi,
My organization is considering use of merge replication (SQL Server 2K with MSDE clients) to implement a classic data-centric "occasionally connected" application pattern. The target user base extends to 4,500 users distributed across time zones and lang
uages. Depending on their location users will connect over telecom links varying from 28.8Kbps to broadband.
Our preference is to retain a single, centralized SQL Server cluster as a publisher and to deploy multiple remote distributor nodes to optimize performance. However, I've been unable to find a comprehensive capacity planning guide that can help us to det
ermine a) whether our proposed architecture is viable and b) how and where we should deploy distributor notes to optimize use of available processing capacity and bandwidth.
If anyone is aware of such a guide, or has first-hand operational experience of a deployment commensurate with that described above then I'd love to hear about it.
Cheers,
Lee.
Lee,
this article details scaling upto 2000 subscribers. I don't know of any
other articles that suit your needs, although Hilary once mentioned a
presentation at SQLPASS or TECHNET conference that sounds as though it'd be
useful to you. He posted the name of the presenter but unfortunately Idon't
recall it. No doubt he'll post a reply here.
Rgds,
Paul Ibison, SQL Server MVP, WWW.Replicationanswers.Com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||I don't recall such a presentation. However the presentations done by Bren
Newman, Philip Vaughn, Matt Hollingsworth, and Kevin Collins (for SQL CE
replication) are excellent.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:%23DSrOufuEHA.1292@.TK2MSFTNGP10.phx.gbl...
> Lee,
> this article details scaling upto 2000 subscribers. I don't know of any
> other articles that suit your needs, although Hilary once mentioned a
> presentation at SQLPASS or TECHNET conference that sounds as though it'd
be
> useful to you. He posted the name of the presenter but unfortunately
Idon't
> recall it. No doubt he'll post a reply here.
> Rgds,
> Paul Ibison, SQL Server MVP, WWW.Replicationanswers.Com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||Yes this is the conference proceedings I was thinking of
but apologies as I was thinking the presentations were
about MSDE rather than CE.
Rgds,
Paul Ibison, SQL Server MVP, WWW.Replicationanswers.Com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Actually, I believe I have heard of an installation with 4500 subscribers
where they used republishing; I think its Barnes and Noble or Ticketmaster,
and IIRC it was with SQL 7.
I urge you to contact PSS for more information on this, and how to deploy
such a topology.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:016301c4ba68$ebf53fa0$a401280a@.phx.gbl...
> Yes this is the conference proceedings I was thinking of
> but apologies as I was thinking the presentations were
> about MSDE rather than CE.
> Rgds,
> Paul Ibison, SQL Server MVP, WWW.Replicationanswers.Com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||Thanks folks,
I do foresee that we'll be working with PSS (and most likely with MS
Consulting Svs also). This posting was intended to help me start to
understand whether we'd be pushing the envelope into areas in which other
have feared to tread (or have been badly burnt). Hopefully MS will be able
to help us understand how B&N and/or Tickermaster had planned their
topologies etc.
Many thanks for your help - and looking forward to your Merge Replication
book becoming available.
Lee.
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:%23%23AhvfouEHA.3972@.TK2MSFTNGP15.phx.gbl...
> Actually, I believe I have heard of an installation with 4500 subscribers
> where they used republishing; I think its Barnes and Noble or
> Ticketmaster,
> and IIRC it was with SQL 7.
> I urge you to contact PSS for more information on this, and how to deploy
> such a topology.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> "Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
> news:016301c4ba68$ebf53fa0$a401280a@.phx.gbl...
>
|||Lee,
once you've got it all set up, if you can find the time
please post up a bit of general info on the topology
choices etc.
Rgds,
Paul Ibison, SQL Server MVP, WWW.Replicationanswers.Com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Merge replication and spids left behind

We are using Merge replication with clients from remote offices (SQL
2000, sp3). Recently, I have had a problem with users who are
replicating, and they shut down their laptops. The connection never
dies, and I end up with major blocking issues related to the
"orphaned" spid. The tables that are blocked are used to filter data
on each client. Since the orphaned spid is blocking, backups will run
forever, and have to be killed, and a SQL management job that
inserts/updates data in these tables has to be killed.

If I kill the spid, it shows a rollback at 0% and the status never
changes. The user has disconnected, and there is really nothing to
roll back. How can I get rid of this spid with out restarting SQL
server, or rebooting my server?

Any help would be greatly appreciated.

Thanks,

Amy Mamarshall@.rhtc.net (Amy M) wrote in message news:<119d3885.0408101552.7fe7cd72@.posting.google.com>...
> We are using Merge replication with clients from remote offices (SQL
> 2000, sp3). Recently, I have had a problem with users who are
> replicating, and they shut down their laptops. The connection never
> dies, and I end up with major blocking issues related to the
> "orphaned" spid. The tables that are blocked are used to filter data
> on each client. Since the orphaned spid is blocking, backups will run
> forever, and have to be killed, and a SQL management job that
> inserts/updates data in these tables has to be killed.
> If I kill the spid, it shows a rollback at 0% and the status never
> changes. The user has disconnected, and there is really nothing to
> roll back. How can I get rid of this spid with out restarting SQL
> server, or rebooting my server?
> Any help would be greatly appreciated.
> Thanks,
> Amy M

This KB article might be useful:

http://support.microsoft.com/defaul...kb;en-us;818552

If this doesn't help, you may want to post in
microsoft.public.sqlserver.replication, as your problem seems to be
quite specific.

Simon