Showing posts with label msde. Show all posts
Showing posts with label msde. Show all posts

Friday, March 30, 2012

Merge rplication - records not being replicated.

We are replicating 5 subscriptions to 500 users with MSDE databases. All
databases are SQL Server 2000 SP4.
The issue we are seeing is that some users are not seeing all the records
they should. (Merge replication) Examples:
User A creates some new records. The records get replicated to the server
and then are not in user A's database (they should still be in the users
database). There are no conflicts. Re-building the snap shot and
re-initializing with the upload changes selected does not fix the issue.
Re-building the snap shot and re-initializing with the upload changes Not
selected does fix the issue.
Any suggestions for tracking this proble down would be appreciated.
Are you using any dynamic filters? If the added rows on A are not allowed
according to the filter, the row is outside of the partition and this could
account for such behaviour.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Paul,
We are using dynamic filters. The users are only allowed to add records
that are in the partition.
|||Then this is normal behaviour.
It would help if you explain a little more about what you would like to
happen.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Merge Replication: sp_MSgetmetadatabatch Duration

I'm running SQL 2000 SP4 publisher with approximately 15 MSDE 2000
pull subscribers.
A few of my users are having problems with replication. This is all
done via VPN connections to our site (so they're not on our LAN.)
The merge agent fails with the error "The process could not query row
data at the 'Publisher'."
After running Profiler, it appears that the this is the longest
duration of anything run.
I can't find any real details on this stored procedure, so I'm not
real sure what its doing. I'm also NOT a replication expert. I know
enough to have gotten it running and its been working okay, but these
problems have slowly been creeping up. We can normally get the
synchronization to go through, but its frustrating to my users, and I
may be facing a mutiny! Help! I'll be glad to provide any more details
that anyone requests, and if anyone has any details on what this
stored procedure is doing or how I can find out, that would be most
appreciated!
Try setting querytimeout to a large value or using the slowlink
profile.
On Nov 15, 12:26 pm, dday...@.gmail.com wrote:
> I'm running SQL 2000 SP4 publisher with approximately 15 MSDE 2000
> pull subscribers.
> A few of my users are having problems with replication. This is all
> done via VPN connections to our site (so they're not on our LAN.)
> The merge agent fails with the error "The process could not query row
> data at the 'Publisher'."
> After running Profiler, it appears that the this is the longest
> duration of anything run.
> I can't find any real details on this stored procedure, so I'm not
> real sure what its doing. I'm also NOT a replication expert. I know
> enough to have gotten it running and its been working okay, but these
> problems have slowly been creeping up. We can normally get the
> synchronization to go through, but its frustrating to my users, and I
> may be facing a mutiny! Help! I'll be glad to provide any more details
> that anyone requests, and if anyone has any details on what this
> stored procedure is doing or how I can find out, that would be most
> appreciated!
|||On Nov 15, 1:06 pm, Hilary Cotter <hilary.cot...@.gmail.com> wrote:
> Try setting querytimeout to a large value or using the slowlink
> profile.
> On Nov 15, 12:26 pm, dday...@.gmail.com wrote:
>
>
>
>
> - Show quoted text -
I've done both of those (Set QueryTimeout = 6000) and it still occurs.
|||Index fragmentation could be cuase, you should be rebuilding your merge
system table indexes on a regular basis:
DBCC DBREINDEX (MSmerge_contents, '', 80)
DBCC DBREINDEX (MSmerge_genhistory, '', 80)
DBCC DBREINDEX (MSmerge_tombstone, '', 80)
DBCC DBREINDEX (MSmerge_current_partition_mappings, '', 80)
DBCC DBREINDEX (MSmerge_past_partition_mappings, '', 80)
ChrisB MCDBA
MSSQLConsulting.com
"dday515@.gmail.com" wrote:

> I'm running SQL 2000 SP4 publisher with approximately 15 MSDE 2000
> pull subscribers.
> A few of my users are having problems with replication. This is all
> done via VPN connections to our site (so they're not on our LAN.)
> The merge agent fails with the error "The process could not query row
> data at the 'Publisher'."
> After running Profiler, it appears that the this is the longest
> duration of anything run.
> I can't find any real details on this stored procedure, so I'm not
> real sure what its doing. I'm also NOT a replication expert. I know
> enough to have gotten it running and its been working okay, but these
> problems have slowly been creeping up. We can normally get the
> synchronization to go through, but its frustrating to my users, and I
> may be facing a mutiny! Help! I'll be glad to provide any more details
> that anyone requests, and if anyone has any details on what this
> stored procedure is doing or how I can find out, that would be most
> appreciated!
>
|||On Nov 15, 1:48 pm, Chris <Ch...@.discussions.microsoft.com> wrote:
> Index fragmentation could be cuase, you should be rebuilding your merge
> system table indexes on a regular basis:
> DBCC DBREINDEX (MSmerge_contents, '', 80)
> DBCC DBREINDEX (MSmerge_genhistory, '', 80)
> DBCC DBREINDEX (MSmerge_tombstone, '', 80)
> DBCC DBREINDEX (MSmerge_current_partition_mappings, '', 80)
> DBCC DBREINDEX (MSmerge_past_partition_mappings, '', 80)
> ChrisB MCDBA
> MSSQLConsulting.com
>
> "dday...@.gmail.com" wrote:
>
>
> - Show quoted text -
I've done a full reindex as well prior, still the same problem!
|||Did you try the slow link profile?
Is it possible also that your network link is going down during your sync?
Can you run a ping -t between the publisher and subscriber to verify that
the link stays up during the sync?
RelevantNoise.com - dedicated to mining blogs for business intelligence.
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
"Daniel Day" <dday515@.gmail.com> wrote in message
news:3d27eaf9-9105-47e0-96bc-c6afe7763da0@.v4g2000hsf.googlegroups.com...
> On Nov 15, 1:06 pm, Hilary Cotter <hilary.cot...@.gmail.com> wrote:
> I've done both of those (Set QueryTimeout = 6000) and it still occurs.

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

I have two MSDE servers on different machines and am
trying to set up merge replication between the two. When
the merge agent runs on the publisher, it indicates that
the "process could not connect to the Subscriber" (SQL
Server does not exist or access denied).
I'm not sure if matters, but I'm running in a peer-to-
peer network. I have my SQL Agent service on the
publisher running under a local machine account, and that
account has access to the publisher, however I wasn't
sure how to grant access to that account on the
Subscriber, or if that was even necessary.
Any help would be appreciated.
- Jim T.
Jim
I am not positive, but I think that we ran into this problem as well. I
beleive that the problem is that the local machine account on the publisher
(or subscriber) can't authenticate with the other machine which means that
the SQL Server Agent can't connect to the other machine to make replication
happen. If I remember correctly, we had to have a non-local (domain)
account that each domain trusts and each machine allows access to the
database on. I'm not sure, but I think it may also be possible to have
local accounts as long as both the username and password are the same on
both machines. I'm pretty sure that there is a KB article titled somthing
like "How to run replication accross non-trusted domains" that may help. If
you need to change the SQL Agent's service acount, take a look at KB article
283811. Sorry to be so vague, but I hope it points you in the right
direction.
HTH
Ron L
"Jim Toth" <anonymous@.discussions.microsoft.com> wrote in message
news:14b301c4b3e6$5d41a650$a401280a@.phx.gbl...
>I have two MSDE servers on different machines and am
> trying to set up merge replication between the two. When
> the merge agent runs on the publisher, it indicates that
> the "process could not connect to the Subscriber" (SQL
> Server does not exist or access denied).
> I'm not sure if matters, but I'm running in a peer-to-
> peer network. I have my SQL Agent service on the
> publisher running under a local machine account, and that
> account has access to the publisher, however I wasn't
> sure how to grant access to that account on the
> Subscriber, or if that was even necessary.
> Any help would be appreciated.
> - Jim T.

Monday, March 26, 2012

Merge Replication using SQLMERGXLib.SQLMergeClass

Hi all,

I am trying to do a merge replication between a SQL Server 2k database and MSDE. And I would like to have the changes that is made on both sides merged, say, the changes made on the msde will be applied to the server and vice versa.

I have set the 'SubscriptionType' to 'SQLMERGXLib.SUBSCRIPTION_TYPE.ANONYMOUS'. when I run the app, it seems that it is only doing a pull replication, which means that it only applies the changes on the server side to the client MSDE, but not bidirectionally.

This is different from the merge replication happening between SQL Server and SQL CE, in the case of which, you can call SqlCeReplication.syncronization() to merge the changes on both sides.

I am a bit confused by these two fashions of replication. Does anyone know how to do a 'bidirectional' merge replication between SQL server and MSDE?

Here is my code:

try

{

string strPublisher, strDistributor, strSubscriber, strPublisherDatabase, strSubscriberDatabase, strPublication;

strPublisher = "Pluto"; // name of your publisher

strDistributor = "Pluto"; // name of your distributor

strSubscriber = Environment.MachineName+"\\MSDE"; // name of your subscriber

strPublication = "TestConf";

strPublisherDatabase = "TestConf";

strSubscriberDatabase = "TestConf";

SQLMergeClass oMerge = new SQLMergeClass();

//Set up the Publisher.

oMerge.Publisher = strPublisher;

oMerge.PublisherSecurityMode = SQLMERGXLib.SECURITY_TYPE.NT_AUTHENTICATION;

oMerge.PublisherDatabase = strPublisherDatabase;

oMerge.Publication = strPublication;

//Set up the Distributor.

oMerge.Distributor = strDistributor;

oMerge.DistributorSecurityMode = SQLMERGXLib.SECURITY_TYPE.NT_AUTHENTICATION;

//Set up the Subscriber.

oMerge.Subscriber = strSubscriber;

oMerge.SubscriberDatasourceType = 0;

oMerge.SubscriberDatabase = strSubscriberDatabase;

oMerge.SubscriberSecurityMode = SQLMERGXLib.SECURITY_TYPE.NT_AUTHENTICATION;

//Set up the subscription.

oMerge.SubscriptionType = SQLMERGXLib.SUBSCRIPTION_TYPE.ANONYMOUS;

oMerge.SynchronizationType = SQLMERGXLib.SYNCHRONIZATION_TYPE.AUTOMATIC;

// oMerge.SubscriptionName = "PullMergeSubscription";

//Create the database and subscription.

oMerge.AddSubscription(SQLMERGXLib.DBADDOPTION.CREATE_DATABASE, SQLMERGXLib.SUBSCRIPTION_HOST.NONE);

//Synchronize the subscription.

Console.WriteLine("Starting synchronization...");

oMerge.Initialize();

oMerge.Run();

oMerge.Terminate();

Console.WriteLine("Synchronization completed.");

}

catch (Exception e)

{

Console.WriteLine(e.StackTrace);

Console.WriteLine(e.Message);

}

Thanks in adv.

Cheers,

Justin

Bi-directional replication is the default, i don't see anything in your code that would prevent that. It shouldn't matter if the subscription is anonymous or local, that should have no bearing on whether changes get uploaded/downloaded or not.

Are you absolutely sure changes were made at the subscriber db?

Merge Replication using SQL-DMO

I am in a process of learning Replication in MSDE, especially Merge Replication

Server runs on MS-XP Professional
------------
I have a sample Access project 'ReplTest' which has only table with only 2 columns.
DatabaseName : ReplTestDB
Table Name : TestTable
MSDE Instance Name : SVR\MYINSTANCE

Now I would like to know how I can configure this database for merge replication
using SQL-DMO

Laptop runs on MS-XP Professional
------------
I have another access project which is running on computer 2 and connected to the
ReplicaTest database.

MSDE Instance Name : LPT\MYINSTANCE

My task is, when I am disconnected from server I would like to have a local copy of
the database to work with and then, when reconnected, need synchronization with the
server database and continue working from server database.

How to write this replication process from scratch using SQL-DMO objects in both Server computer
and Laptop computer.

I dont have enterprise manager in both computers since they use only MSDE

Can anyone help me?

Thanks in advance

JPCheck out "Publishers, Distributors, and Subscribers" from BOL (Ihope you have BOL).|||The problem with BOL is it is so extensive and the scenario of my situation is not described. I could do replication in the same machine as distributor, publisher and suscriber, but what if the subscriber is another machine as in my case ?|||I found this within these forums:

The sample code you were after is for creating heterogenous publication. It does not work with SQL publications. Try to model after the following sample.

Sub CreateMergePub() Dim osvr As New SQLDMO.SQLServer Dim szLastErrorText As String

Dim lLastErrorNumber As Long
Dim szServerName As String
Dim oReplicationDatabase As SQLDMO.ReplicationDatabase
Dim oDistPublisher As New DistributionPublisher
Dim oMergePublication As New MergePublication
Dim oMergeArticle1 As New SQLDMO.MergeArticle

On Error GoTo ErrorHandler

szServerName = "your servername"

' To use NT integrated security ' osvr.LoginSecure = True

osvr.Connect szServerName

' Enable pubs database for publishing ' Set oReplicationDatabase =
osvr.Replication.ReplicationDatabases("pubs")
'oReplicationDatabase.EnableTransPublishing = True

' Set MergePublication properties, name, snapshot method, trans '
oMergePublication.Name = "Pub1" oMergePublication.SnapshotMethod =
SQLDMOInitSync_BCPNative

' Set non-default properties, i.e. if you do not set the following properties, '
default value will be used ' 'oMergePublication.PublicationAttributes =
SQLDMOPubAttrib_AllowPull Or SQLDMOPubAttrib_AllowAnonymous
'oMergePublication.RetentionPeriod = 64
'oMergePublication.SnapshotSchedule.FrequencyType = SQLDMOFreq_Daily
'oMergePublication.SnapshotSchedule.FrequencyInter val = 1
'oMergePublication.SnapshotSchedule.ActiveStartTim eOfDay = 233000
'oMergePublication.SnapshotSchedule.ActiveEndTimeO fDay = 235959
'oMergePublication.SnapshotSchedule.ActiveStartDat e = 0
'oMergePublication.SnapshotSchedule.ActiveEndDate = 19981205

oReplicationDatabase.MergePublications.Add oMergePublication

' Add article ' oMergeArticle1.Name = "Article1" oMergeArticle1.SourceObjectName
= "jobs" oMergeArticle1.SourceObjectOwner = "dbo"

'Add the article to the publication ' oMergePublication.MergeArticles.Add
oMergeArticle1

' Disconnect from SQL Server szServerName ' osvr.DisConnect Set osvr =
Nothing End

ErrorHandler:

szLastErrorText = Err.Description lLastErrorNumber = Err.Number

MsgBox szLastErrorText, vbOKOnly, "Error " + Trim$(Str$(Err.Number))

End Sub

--
Pung Xu, Microsoft This posting is provided "AS IS" with no warranties, and confers
no rights. Please do not send email directly to this alias. This alias is for
newsgroup purposes only.

"matt" <matt_e_davis@.hotmail.com> wrote in message
news:d0db2ad5.0205221240.7c427ed7@.posting.google.c om...
> I am having trouble creating a merge publication with SQL-DMO. I modeled my
> solution after the following code:
> --================================================ Sub CreatePublication() '
> Connect to SQL Server Distributor Dim oSqlServer As New SQLDMO.SQLServer
> oSqlServer.Connect "", "sa", "" On Error GoTo ErrorHandler
>
> Dim oSamplePublisher As DistributionPublisher Set oSamplePublisher =
>
oSqlServer.Replication.Distributor.DistributionPub lishers("SAMPLEPUBLISHER")
>
> ' Create Sample Publication Dim oSamplePublication As New
> DistributionPublication oSamplePublication.Name = "SamplePublication"
> oSamplePublication.PublicationDB = "SampleDatabase"
> oSamplePublication.PublicationType = SQLDMOPublication_Transactional
> oSamplePublication.VendorName = "Sample Vendor"
> oSamplePublication.LogReaderAgent = "SampleLogReaderAgent"
> oSamplePublication.SnapshotAgent = "SampleSnapShotAgent"
> oSamplePublication.Description = "Sample Publication Definition"
> oSamplePublication.PublicationAttributes = SQLDMOPubAttrib_AllowPush
>
> ' Add the Publication oSamplePublisher.DistributionPublications.Add
> oSamplePublication
>
> ' Create Sample Articles Dim oSampleArticle1 As New DistributionArticle
> oSampleArticle1.Name = "SampleArticle1" oSampleArticle1.Description = "Sampe
> Article1 Definition" oSampleArticle1.SourceObjectName = "SampleTable1"
>
> Dim oSampleArticle2 As New DistributionArticle oSampleArticle2.Name =
> "SampleArticle2" oSampleArticle2.Description = "Sample Article2 Definition"
> oSampleArticle2.SourceObjectName = "SampleTable2"
>
> ' Add the Articles to the Publication
> oSamplePublication.DistributionArticles.Add oSampleArticle2
> oSamplePublication.DistributionArticles.Add oSampleArticle1
>
> oSqlServer.Close Exit Sub ErrorHandler: PrintErrors oSqlServer Exit Sub End Sub
>
> --================================================ This does create a publication
> but when you right click (via Enterprise Mgr.) Replication Monitor > PublisherName
> > SamplePublication and select Properties an error occurs. The error states that
> the publication is not in the TransPublication collection. The same error occurs
> when you create a merge publication. Except the error is that the publication does
> not exist in the MergePublications collection.
>
> How can I add the publication to the MergePublications collection?? Does anyone
> have any sample code for this?
>
> I am new at SQL-DMO and VB so I am struggling.
>
> Thanks in advance for any help you can give!!
>
> Matt|||Hi
Thanks for the reply.
I solved my problem...
I think the following posting will be helphul to someone ...
The text is too long , so posted in 3 parts

Scenario.. PART 1 SERVER COMPUTER
Desktop - Installed Access 2003 & MSDE 2000
Machine Name - MYSVR
MSDE instance Name - 'MYSVR\MYINSTANCE'
User id - 'sa' Password - 'password'

1. Create an Access Project 'TestProj.adp'
2. Create a SQL Database 'TestDB'
3. Create Table Name 'TestTable'
Columns - TestID INT IDENTITY(1,1) PRIMARY KEY
- TestName NVARCHAR(50)
4. Add a record to the table
5. Create a text TestRep01.txt and paste the following
Note that machinename should be replaced with your machine name

/*Script to be copied */

use master
GO
exec sp_adddistributor @.distributor = @.@.servername, @.password = N''
GO
-- Updating the agent profile defaults
sp_MSupdate_agenttype_default @.profile_id = 1
GO
sp_MSupdate_agenttype_default @.profile_id = 2
GO
sp_MSupdate_agenttype_default @.profile_id = 4
GO
sp_MSupdate_agenttype_default @.profile_id = 6
GO
sp_MSupdate_agenttype_default @.profile_id = 11
GO
-- Adding the distribution database
exec sp_adddistributiondb @.database = N'distribution',
@.data_folder = N'C:\Program Files\Microsoft SQL Server\MSSQL$MYINSTANCE\Data',
@.data_file = N'distribution.MDF',
@.data_file_size = 3,
@.log_folder = N'C:\Program Files\Microsoft SQL Server\MSSQL$MYINSTANCE\Data',
@.log_file = N'distribution.LDF',
@.log_file_size = 3,
@.min_distretention = 0,
@.max_distretention = 72,
@.history_retention = 48,
@.security_mode = 1
GO
-- Adding the distribution publisher
exec sp_adddistpublisher @.publisher = @.@.servername,
@.distribution_db = N'distribution',
@.security_mode = 1,
@.working_directory = N'\\MYSVR\C$\Program Files\Microsoft SQL Server\MSSQL$MYSINSTANCE\ReplData',
@.trusted = N'false',
@.thirdparty_flag = 0
GO

/*script ends*/

5. Create a folder 'ReplData' under 'C:\Program Files\Microsoft SQL
Server\MSSQL$MYINSTANCE' if it is not there.
6. Make sure SQLServer agent is running, if not, start that now.
7. Open Command prompt and run osql.exe with following parameters
as in scenario
prompt:> osql -S MYSVR\MYINSTANCE -U sa -P password -i TestRep01.txt
-o ResultTestRep01.txt -b
8. If so far so good , copy the follwoing script to another text file TestRep02.txt

/* Script starts*/
-- Enabling the replication database
use master
GO
exec sp_replicationdboption @.dbname = N'TestDB',
@.optname = N'merge publish',
@.value = N'true'
GO
use [TestDB]
GO
-- Adding the merge publication
exec sp_addmergepublication @.publication = N'TestPub',
@.description = N'Merge publ of TestDB.',
@.retention = 14,
@.sync_mode = N'character',
@.allow_push = N'true',
@.allow_pull = N'true',
@.allow_anonymous = N'true',
@.enabled_for_internet = N'false',
@.centralized_conflicts = N'true',
@.dynamic_filters = N'false',
@.snapshot_in_defaultfolder = N'true',
@.compress_snapshot = N'false',
@.ftp_port = 21,
@.ftp_login = N'anonymous',
@.conflict_retention = 14,
@.keep_partition_changes = N'false',
@.allow_subscription_copy = N'false',
@.allow_synctoalternate = N'false',
@.add_to_active_directory = N'false',
@.max_concurrent_merge = 0,
@.max_concurrent_dynamic_snapshots = 0
exec sp_addpublication_snapshot @.publication = 'TestPub',
@.frequency_type = 4,
@.frequency_interval = 1,
@.frequency_relative_interval = 1,
@.frequency_recurrence_factor = 0,
@.frequency_subday = 1,
@.frequency_subday_interval = 5,
@.active_start_date = 0,
@.active_end_date = 0,
@.active_start_time_of_day = 500,
@.active_end_time_of_day = 235959,
GO
exec sp_grant_publication_access @.publication = N'TestPub',
@.login = N'sa'
GO
-- Adding the merge articles
exec sp_addmergearticle @.publication = N'TestPub',
@.article = N'TestTable',
@.source_owner = N'dbo',
@.source_object = N'TestTable',
@.type = N'table',
@.description = null,
@.column_tracking = N'true',
@.pre_creation_cmd = N'drop',
@.creation_script = null,
@.schema_option = 0x000000000000FFF1,
@.article_resolver = null,
@.subset_filterclause = null,
@.vertical_partition = N'false',
@.destination_owner = N'dbo',
@.auto_identity_range = N'false',
@.verify_resolver_signature = 0,
@.allow_interactive_resolver = N'false',
@.fast_multicol_updateproc = N'true',
@.check_permissions = 0
GO
/*Script Ends */

9. Open Command prompt and run osql.exe with following parameters
as in scenario
prompt:> osql -S MYSVR\MYINSTANCE -U sa -P password -i TestRep02.txt
-o ResultTestRep02.txt -b

10. If this works fine (check the ResultTestRep02.txt for errors) the proceed

Any doubts and corrections are welcome

Cheers
Jos|||Part 2 of hte previous positing

In server computer , TestProj application

11. Create a form 'TestReplication'
13. Create reference to objects SQLMerge, SQLDSnapshot
and SQLReplError
14. Add
-- Commnad buttons 'cmdSnapShot', 'cmdMergePub'
-- Microsoft Progress Bar control 'ProgessBar'
-- Label 'ProgressLabel'

Copy the Code and paste in the VBA
Option Explicit
Private WithEvents SQLMerge As SQLMerge
Private WithEvents SQLMrgSnapshot As SQLSnapshot

Private Sub Form_Load()

Set SQLMerge = New SQLMerge
Set SQLMrgSnapshot = New SQLSnapshot

SQLMerge.Publisher = "MYSVR\MYINSTANCE"
SQLMerge.PublisherSecurityMode = NT_AUTHENTICATION
SQLMerge.PublisherDatabase = "TestDB"
SQLMerge.Publication = "TestPub"

SQLMrgSnapshot.Publisher = "MYSVR\MYINSTANCE"
SQLMrgSnapshot.PublisherDatabase = "TestDB"
SQLMrgSnapshot.Distributor = "MYSVR\MYINSTANCE"
SQLMrgSnapshot.Publication = "TestPub"
SQLMrgSnapshot.DistributorSecurityMode = NT_AUTHENTICATION
SQLMrgSnapshot.PublisherSecurityMode = NT_AUTHENTICATION
SQLMrgSnapshot.ReplicationType = MERGE

Exit Sub

End Sub

Private Sub cmdMergePub_Click()
On Error GoTo Failure
Dim replerr As SQLReplError

ProgressBar.Value = 0
ProgressLabel.Caption = "Starting Merge Replication."
DoEvents

'Initialize
SQLMerge.Initialize
'Run
SQLMerge.Run
'Terminate
SQLMerge.Terminate

'Reset objects
ProgressBar.Value = 0

Exit Sub
Failure:
For Each replerr In SQLMerge.ErrorRecords
MsgBox replerr.Description, vbCritical, "SQL Replication Sample Failure"
Next replerr

ProgressLabel.Caption = ""
ProgressBar.Value = 0
End Sub

Private Sub cmdSnapshot_Click()
On Error GoTo Failure
Dim replerr As SQLReplError

ProgressBar.Value = 0
ProgressLabel.Caption = "Starting Merge Snapshot Generation."
DoEvents

'Initialize
SQLMrgSnapshot.Initialize

'Run
SQLMrgSnapshot.Run

'Terminate
SQLMrgSnapshot.Terminate

'Reset objects
ProgressBar.Value = 0
Exit Sub

Failure:
For Each replerr In SQLMrgSnapshot.ErrorRecords
MsgBox replerr.Description, vbCritical, "SQL Replication Sample Failure"
Next replerr
ProgressLabel.Caption = ""
ProgressBar.Value = 0
End Sub

Private Sub PrintErrors(c As Object)
If Err.Number <> 0 Then
MsgBox Err.Description, vbCritical, "SQL Replication Sample Failure"
End If
End Sub

Private Function SQLMerge_Status(ByVal Message As String, ByVal Percent As Long) As STATUS_RETURN_CODE
'Update progress information
ProgressBar.Value = Percent
ProgressLabel.Caption = Message

'Allow other events
DoEvents

SQLMerge_Status = SUCCESS

End Function

Private Function SQLMrgSnapshot_Status(ByVal Message As String, ByVal Percent As Long) As STATUS_RETURN_CODE
'Update progress information
ProgressBar.Value = Percent
ProgressLabel.Caption = Message

'Allow other events
DoEvents

'Setting the return code to CANCEL will cause the control to cancel operation
SQLMrgSnapshot_Status = SUCCESS

End Function

15. Now Run only Snapshot by clicking cmdSnapshot button

Continues|||//////////////////////////////////////////////////////////////////////////////////
CLIENT COMPUTER
/////////////////////////////////////////////////////////////////////////////////

16. If success go to your next connected computer
Installed MS-Access 2003 and MSDE 2000
Computer name 'MYLAPTOP'
MSDE instance Name 'MYLAPTOP\MYINSTANCE'
user id 'sa'
passwor 'password'
17. Create an access project TestProjClient
18. Create a SQL Database 'TestDBClient'
Here you do not need to create tables
19. Add a Form TestReplicationClient
20. Create reference to objects SQLMerge and SQLReplError

21. Add
-- Commnad buttons 'cmdMergePub'
-- Microsoft Progress Bar control 'ProgessBar'
-- Label 'ProgressLabel'

22. Copy paste the following in the VBA code
'**********************************************

Option Explicit
Private WithEvents SQLMrgSnapshot As SQLSnapshot

Private Sub Form_Load()
Set SQLMerge = New SQLMerge

End Sub

Private Sub cmdMergePub_Click()

with SQLMerge
'------------------
'Set the publisher properties
.Publisher = "MYSVR\MYINSTANCE"
.PublisherSecurityMode = DB_AUTHENTICATION
.PublisherLogin = "sa"
.PublisherPassword = "password"
.PublisherDatabase = "TestDB"
.Publication = "TestPub"
'------------------
.PublisherAddress = "MYSVR"
.PublisherNetwork = DEFAULT_NETWORK

'------------------
'Set the distributor properties
' No need to set Distribution Server when both
' Publisher and subscriber are same Server

'------------------
'Set your local subscriber properties
.Subscriber = "MYLAPTOP\MYINSTANCE"
.SubscriberSecurityMode = DB_AUTHENTICATION
.SubscriberDatasourceType = SQL_SERVER
.SubscriberLogin = "sa"
.SubscriberPassword = "password"
.SubscriberDatabase = "TestDBReplica"
.SubscriptionType = ANONYMOUS
'------------------

'------------------
.Initialize

.Run

.Terminate
'------------------

End With
exit sub
ErrH:
Set SQLMerge = Nothing
MsgBox "Unexpected error occured during Merge Process" & _
vbCrLf & Err.Description, vbCritical, "Replication"

End Sub

Private Function SQLMerge_Status(ByVal Message As String, ByVal Percent As Long) As STATUS_RETURN_CODE
'Update progress information
ProgressBar.Value = Percent
ProgressLabel.Caption = Message

'Allow other events
DoEvents

SQLMerge_Status = SUCCESS

End Function

'**********************************************
23. Click cmdMerge

SUCCESS??????
if yes

24. Open the table and add one more record

25. now click cmdMerge again

26. Go to the 1st computer (server computer) and see whether newly added record in the laptop is in the TestProj

DONE

Pls reply if any doubts
Cheers
Jos|||Attached txtx file for scenario on which i solved the replication problem

All comments are corrections are appreciated

cheers
Jos

Wednesday, March 21, 2012

Merge Replication Pull Subscription Error

I have replication scenario using SQL SERVER 2000 as the Distributor/Publisher and multiple MSDE databases as the subscribers. When I set up the scenario to use push subscriptions the replication seems to work well. All changes flow correctly between al
l subscribers and the publisher.
When I try to run a pull subscription scenario the replication will fail. I think that the snapshot agent is failing because of some type of security problem. I get the error:
“SQL Server Agent could not access the replication agent. Use the DCOMCNFG utility to confirm that the SQL Server Agent Windows account has permissions to launch the replication agent. The step failed.”
The server is using windows authentication and has the sp3a on it. Again, when I run the replication using push subscribers it works. When I change it to pull subscribers, I get the error.
Any advice is greatly appreciated,
Phil
Are you using remove agent activation?
If so, you must use your Publisher, Susbcriber, or Distributor as the location of your remote agent.
If not, someone has messed with where your merge.exe program is running.
open up DCOMCnfg, locate Microsoft SQL Server Replication Merge Agent 8.0. click on properties Verify in the location tab, that the program runs locally, in the security tab, click on edit for launch permissions. Make sure the everyone group has special
access.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
-- Phil wrote: --
I have replication scenario using SQL SERVER 2000 as the Distributor/Publisher and multiple MSDE databases as the subscribers. When I set up the scenario to use push subscriptions the replication seems to work well. All changes flow correctly betwe
en all subscribers and the publisher.
When I try to run a pull subscription scenario the replication will fail. I think that the snapshot agent is failing because of some type of security problem. I get the error:
“SQL Server Agent could not access the replication agent. Use the DCOMCNFG utility to confirm that the SQL Server Agent Windows account has permissions to launch the replication agent. The step failed.”
The server is using windows authentication and has the sp3a on it. Again, when I run the replication using push subscribers it works. When I change it to pull subscribers, I get the error.
Any advice is greatly appreciated,
Phil
sql

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 MSDE

Summary:
Failed to insert detail rows in master-detail scenario during merge replication. Not always, sometimes.
Topology:
I've got 5 servers running MSDE, one of them is central publisher/distributor for merge type of replication.
There is no row or column filtering: all subscribers have all data. Central publisher resolve conflicts with default revolvers.
Some tables have relations: master-detail (i.e. orders-ordersDetails, etc). Relations are defined in tables as FK.
My application which fills data use datasets with relations between tables defined the same way as in the sqlserver. So app first work with dataset which is unable to receive details without master record. When data updated to msde, it is done without errors, means master and details table updated correctly (tables at msde has relations too)
Applications running on 4 different locations and fill data to local db (subscriber to central publisher).
Sync occurs every 15 minutes in the following order (merge agents run at publisher/distributor):
subscriber1: every 15 minutes, starts at 00.00h
subscriber2: every 15 minutes, starts at 00.03h
subscriber3: every 15 minutes, starts at 00.06h
subscriber4: every 15 minutes, starts at 00.09h
Sync lasts for average 15 sec, never 3 min.
Problem details:
Message:
The row was inserted at 'CentPub.myDB' but could not be inserted at 'Sub2.MyDB'. INSERT statement conflicted
with COLUMN FOREIGN KEY constraint 'FK_OrdersDetails_Orders'. The conflict occurred in database 'MyDB',
table 'Orders', column 'OrderID'.
Description
CentPub is central publisher which just collecting data from subscribers. So, Order was made on one of the other subscribers different than Sub2, mean user at location3 insert order with details in local database, after a while, CentPub take this order to its database (MyDB), after that CentPub try to sync with some of the other subscribers (i.e. Sub2 == location2) and then for some unknown reason orderDeatils failed to insert in Sub2's orderDeatil table because constraint 'FK_OrdersDetails_Orders' conflict.
After that happened, thing goes like in http://support.microsoft.com/kb/307482 (generally: in next session, failed order details are deleted
from CentPub, which means deleted from all subscribers after syncs.)
The problem is that subscribers have tables with relations, so Cause isn't as describe in MS kb because my tables have relations at all servers.
After finished replications I have Orders without details records at all subscribers, so I assume that merge agents sometimes (not always) try to insert details prior to master table during the same sync session.
In resolution section of MS kb article they say 'Mark the subscriber foreign key constraints as NOT FOR REPLICATION'.
In relations definition I see 'Enforce relationship for replication) options which is enabled in my tables.
If I turn that option off, is it possible to happen that my subscribers receive details without master record? (My observation of behavior says that will not happen(that will lead to problems in my app because my datasets enforce relations too).
Deleted record I bring back to life with conflict manager in EM, but I'd like it never happen.
Is it a bug, side effect or something I do it the wrong way?

Thanks and regardsThe answer is no. When you change your constraints into "NOT FOR REPLICATION" the merge agent is the only process that will ignore the constraint as it propagates the changes amongst the subscribers. The point at which the data is entered into the tables (whether it be front-end app, sproc, etc.) will still enforce the FK constraints.|||Thanks.
I'll try to remove that option.
Anyway, what is the purpose of this option if merge agents don't care about tables with relations?
It is very strange in my situation because I'm sure that my data is in correct form (master-detail) in every point in time (first master, than details) so I don't expect problems during replication.|||Merge agents do care unless you tell them not to. In previous dealings with M$oft, it appears to be related to the number of transactions and the generations associated with them. The merge agent can be set to transmit up to 2000 generations, but will sometines still split up the parent and child transactions, especially in a heavy OLTP database.

Here is link: http://support.microsoft.com/kb/307356/en-us|||Thanks tomh53.
I'll try to increase generations to 2000 and mark not for replication (it should be enough to avoid the problem)
Regards
g.|||I've tested with max value for generations parameter (2000) and everything work fine.
Thanks and regares
G.

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

Monday, March 19, 2012

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 over internet Problem: Couldn't propagate schema to the subscriber.

Hello All,
I am implementing Pull merge replication over internet, I have a sql
server which I have set as Publishe/Distributor and MSDE which I have
set a subscriber. I have a sample Database FTP_REPL which I have
published. whenever I try to run merge Agent it succssfully connects
to the publisher, Distributor,but it gives error "The schema script
<ScriptName> could not be propagated to the subscriber".
Plz anyone help me to resolve this problem.
Locate your agent, right click on it, select agent properties, and ensure
the job owner is sa. Then restart your agent.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Ruchir" <ruchirdhar@.gmail.com> wrote in message
news:88216eb7.0501100407.d4c3f56@.posting.google.co m...
> Hello All,
> I am implementing Pull merge replication over internet, I have a sql
> server which I have set as Publishe/Distributor and MSDE which I have
> set a subscriber. I have a sample Database FTP_REPL which I have
> published. whenever I try to run merge Agent it succssfully connects
> to the publisher, Distributor,but it gives error "The schema script
> <ScriptName> could not be propagated to the subscriber".
> Plz anyone help me to resolve this problem.

Merge replication on MSDE using VPN

I suspect your issue is that you don't have an alias, but
have a look at this article which should help:
http://support.microsoft.com/?id=321822
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Hi Paul,
Thanks for the reponse. I have created an alias for the msde at the server
and registered it in EM. I was still getting the same error so I enabled
output logging for the merge agent. Apon inspection of the log it indicated a
logintimeout error had occurred and suggested increase the timeout value. I
created a new profile for the merge agent extending both the logintimeout and
the querytimeout parameters. I stopped and started the merge agent and now
the log contains the following message ("Cannot generate SSPI context"). Just
to recap, I am trying to replicate a database using SQL 2k sp3 enterprise
(windows 2003 server) and msde 2k sp3 (xp professional) between two
non-trusted domains using a vpn.
Thanks Jeff
"Paul Ibison" wrote:

> I suspect your issue is that you don't have an alias, but
> have a look at this article which should help:
> http://support.microsoft.com/?id=321822
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||Can you change to sql serurity if you don't have it
already. Also, change the jobs to be owned by sa. If the
VPN is set up correctly, I believe you should be able to
assign rights to the replication share for the sql server
agent of the pull job. In my case I used FTP but this
shouldn't be necessary. This error message has loads of
potential causes mostly connected with authentication
that you can find in Google. For my part, I have seen it
when the system clocks weren't synchronized at all
accurately.
HTH,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

>--Original Message--
>Hi Paul,
> Thanks for the reponse. I have created an alias for the
msde at the server
>and registered it in EM. I was still getting the same
error so I enabled
>output logging for the merge agent. Apon inspection of
the log it indicated a
>logintimeout error had occurred and suggested increase
the timeout value. I
>created a new profile for the merge agent extending both
the logintimeout and
>the querytimeout parameters. I stopped and started the
merge agent and now
>the log contains the following message ("Cannot generate
SSPI context"). Just
>to recap, I am trying to replicate a database using SQL
2k sp3 enterprise
>(windows 2003 server) and msde 2k sp3 (xp professional)
between two[vbcol=seagreen]
>non-trusted domains using a vpn.
>Thanks Jeff
>"Paul Ibison" wrote:
but[vbcol=seagreen]
www.replicationanswers.com
>.
>
|||Hi Paul,
I set the SQL Server Agent service on both machines to run under a local
windows account with the same name and password and everything is working
fine now. Is there a preferred configuration for security purposes. Our SQL
Server Services have always run under a network account. I have read several
articles on how to make this work but, I would like to make sure I am paying
significant attention to security. If you know of a good source for
replication security let me know.
Thanks for all you help! Jeff
"Paul Ibison" wrote:

> Can you change to sql serurity if you don't have it
> already. Also, change the jobs to be owned by sa. If the
> VPN is set up correctly, I believe you should be able to
> assign rights to the replication share for the sql server
> agent of the pull job. In my case I used FTP but this
> shouldn't be necessary. This error message has loads of
> potential causes mostly connected with authentication
> that you can find in Google. For my part, I have seen it
> when the system clocks weren't synchronized at all
> accurately.
> HTH,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>
>
> msde at the server
> error so I enabled
> the log it indicated a
> the timeout value. I
> the logintimeout and
> merge agent and now
> SSPI context"). Just
> 2k sp3 enterprise
> between two
> but
> www.replicationanswers.com
>
|||What you have set up is pass-through security. As you
say, normally between computers Active Directory users
are used, or Workgroup users.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Jeff,
I don't know what your deployment timeframe is but SQL 2005 has the ability
to perform synchronization over HTTPS. Is this something you would be
interested in trying?
Philip Vaughn
Program Manager
SQL Server Replication
This message is provided "AS IS" with no warranties, and confers no rights.
"Jeff Rowley" <JeffRowley@.discussions.microsoft.com> wrote in message
news:4C8310C5-AC8D-4FD9-8152-1BFCADE59A29@.microsoft.com...[vbcol=seagreen]
> Hi Paul,
> I set the SQL Server Agent service on both machines to run under a local
> windows account with the same name and password and everything is working
> fine now. Is there a preferred configuration for security purposes. Our
> SQL
> Server Services have always run under a network account. I have read
> several
> articles on how to make this work but, I would like to make sure I am
> paying
> significant attention to security. If you know of a good source for
> replication security let me know.
> Thanks for all you help! Jeff
> "Paul Ibison" wrote:

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

Saturday, February 25, 2012

Merge Replication Code Example - Where Can I Find One?

Hi,
I'm trying to program (c#) merge replication with one publisher DB
(SQL2000) and many subscribers (MSDE). I'm trying to find info and
examples online, but it seems pretty scarce. If you can recommend a
site, please let me know.
Thanks,
JJ
try this
http://support.microsoft.com/default...b;en-us;319646
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
"JJ" <joe.jabour@.gmail.com> wrote in message
news:1118069995.044129.200820@.g47g2000cwa.googlegr oups.com...
> Hi,
> I'm trying to program (c#) merge replication with one publisher DB
> (SQL2000) and many subscribers (MSDE). I'm trying to find info and
> examples online, but it seems pretty scarce. If you can recommend a
> site, please let me know.
> Thanks,
> JJ
>
|||Looks good, Thanks!

Merge Replication between MSDE doesn't work!

Hello!

I have a problem with creating Merge replication between two instances of MSDE 2000. In the article http://support.microsoft.com/kb/324992/, published by Microsoft, described, that it is possible.

I am creating Merge Publication at MSDE 2000, with Distributor and Publisher configured at same machine, with options "Allow Pull Subscriptions" and "Allow Anonymous Subscriptions". There is no problem with creating of Publication. Even snapshot generation finishes successfully. Also I create a login with SQL Server Authentication and "System Administrators" database role at the publisher in order to connect to it from Subscriber.

The problem occurs, when creating anonymous pull subscription to this publication at another instance of MSDE. During initial synchronization an error occurs:

The process could not connect to Distributor '<publisher_server_name>'. Login failed for user '<login_created_at_publisher>'. Reason: Not associated with a trusted SQL Server connection. The step failed.

Although I didn't use Windows Authentication at all, so Subscriber doesn't need to connect to Distributor using trusted SQL Server connection.

What is a problem and how can I workaround?

Note: The same works correctly, if MS SQL Server used as a Publisher instead of MSDE.

Please, help!

I can provide publication and subscription creation scripts, if required.

Guys, don't care anymore: I found the reason!!!

Probably, the problem was in using an old version of MSDE, and installing MSDE with SP4 solved it!

However, there are still some problems with connecting to MSDE from a remote workstation via named pipes, but I think I can research it independently.

Thanks for consideration!

Merge Replication between MSDE doesn't work!

Hello!

I have a problem with creating Merge replication between two instances of MSDE 2000. In the article http://support.microsoft.com/kb/324992/, published by Microsoft, described, that it is possible.

I am creating Merge Publication at MSDE 2000, with Distributor and Publisher configured at same machine, with options "Allow Pull Subscriptions" and "Allow Anonymous Subscriptions". There is no problem with creating of Publication. Even snapshot generation finishes successfully. Also I create a login with SQL Server Authentication and "System Administrators" database role at the publisher in order to connect to it from Subscriber.

The problem occurs, when creating anonymous pull subscription to this publication at another instance of MSDE. During initial synchronization an error occurs:

The process could not connect to Distributor '<publisher_server_name>'. Login failed for user '<login_created_at_publisher>'. Reason: Not associated with a trusted SQL Server connection. The step failed.

Although I didn't use Windows Authentication at all, so Subscriber doesn't need to connect to Distributor using trusted SQL Server connection.

What is a problem and how can I workaround?

Note: The same works correctly, if MS SQL Server used as a Publisher instead of MSDE.

Please, help!

I can provide publication and subscription creation scripts, if required.

Guys, don't care anymore: I found the reason!!!

Probably, the problem was in using an old version of MSDE, and installing MSDE with SP4 solved it!

However, there are still some problems with connecting to MSDE from a remote workstation via named pipes, but I think I can research it independently.

Thanks for consideration!

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)

Monday, February 20, 2012

Merge Replication and MSDE 2000

Hello..I am going to implement Merge Replication with MSDE 2000.
please let me know how many users MSDE 2000 can burden the workload. It
will degrade the preformance if more than 5 concurrent user will start
work on it concurrently.
What is the procedure in order to implement merge Replication on MSDE
2000.
Pls help me as soon as possible
Thanks in Advance,
Jayesh Patel
(jayesh@.infoworldpune.com)
its 8 simultaneous workloads. So if you are using connection pooling this
could mean many more users the 8, but it depends on what sort of work they
are doing. Work which takes a long time might mean you get throttling with 8
simultaneous connections. Work which completes in ms and work which takes
advantages of connection pooling could mean many more than 8 simultaneous
users.
To implement replication use any of the tutorials on the web, and run
profiler to capture the commands. Then apply these commands using osql.
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
"Jayesh" <dba.jayeshpatel@.gmail.com> wrote in message
news:1125318990.896170.122400@.g47g2000cwa.googlegr oups.com...
> Hello..I am going to implement Merge Replication with MSDE 2000.
> please let me know how many users MSDE 2000 can burden the workload. It
> will degrade the preformance if more than 5 concurrent user will start
> work on it concurrently.
> What is the procedure in order to implement merge Replication on MSDE
> 2000.
> Pls help me as soon as possible
> Thanks in Advance,
> Jayesh Patel
> (jayesh@.infoworldpune.com)
>
|||Thanks a lot for reply.
Can you guide me how to implement replication between SQL server and
MSDE ?
We have to setup Merge Replication between three continents.
1) asia
2)america
3) Europe
These 3 continents will be act as publisher and suscriber.
(by merging them)
But within one continent , there might be many more countries.
Country contains variuos city. City level database would be running on
MSDE.
Is it possible to replicate data this city level data with country as
well continent level.
Thanks in Advance,
Jayesh Patel