Showing posts with label web. Show all posts
Showing posts with label web. Show all posts

Monday, March 26, 2012

Merge Replication w/ Web Synchronization Across Non-Trusted Domain

I have a requirement to replicate a portion of a 2005 database using merge
replication where the database server is in a workgroup at location A and the
web server is in an AD domain at location B. Both locations are connected
via a VPN.
Becuase of the disparate domains we are unable to push snapshots to a share
on the Web Server w/o using FTP. After specifying the FTP information in the
FTP Snapshot and Internet dialog, the following message is returned when
attempting to start the Snapshot Agent:
Message: The replication agent failed to create the directory
'\\172.27.1.187\unc\ftp\DAYMONJPSV02$TEST_CORE_APP RISCORE1\20071218021362\'.
Stack: at
Microsoft.SqlServer.Replication.Utilities.CreateDi rectoryWithExtendedErrorInformation(String directory)
at
Microsoft.SqlServer.Replication.Snapshot.SnapshotP rovider.CreateSnapshotFolders()
at
Microsoft.SqlServer.Replication.Snapshot.MergeSnap shotProvider.CreateSnapshotFolders()
at
Microsoft.SqlServer.Replication.Snapshot.SqlServer SnapshotProvider.GenerateSnapshot()
at Microsoft.SqlServer.Replication.SnapshotGeneration Agent.InternalRun()
at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: MSSQL_REPL,
Error number: MSSQL_REPL52026)
Get help: http://help/MSSQL_REPL52026
Source: mscorlib
Target Site: Void WinIOError(Int32, System.String)
Message: Message: Logon failure: unknown user name or bad password.
Stack: at System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String
path, DirectorySecurity dirSecurity)
at System.IO.Directory.CreateDirectory(String path, DirectorySecurity
directorySecurity)
at
Microsoft.SqlServer.Replication.Utilities.CreateDi rectoryWithExtendedErrorInformation(String directory) (Source: mscorlib, Error number: 0)
The user id and password are those of a domain user for the FTP server at
location B. Do I have to use a non-AD account?
You need to use a snapshot account which has rights to modify to
\\172.27.1.187\unc. You specify this account in sp_addpublication_snapshot
using the @.job_login and @.job_password parameters.
This account should exist on \\172.27.1.187 and your publisher.
http://www.zetainteractive.com - Shift Happens!
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
"parchk" <parchk@.discussions.microsoft.com> wrote in message
news:7575E064-365A-49B4-B479-AD3C7D4E14C8@.microsoft.com...
>I have a requirement to replicate a portion of a 2005 database using merge
> replication where the database server is in a workgroup at location A and
> the
> web server is in an AD domain at location B. Both locations are connected
> via a VPN.
> Becuase of the disparate domains we are unable to push snapshots to a
> share
> on the Web Server w/o using FTP. After specifying the FTP information in
> the
> FTP Snapshot and Internet dialog, the following message is returned when
> attempting to start the Snapshot Agent:
> Message: The replication agent failed to create the directory
> '\\172.27.1.187\unc\ftp\DAYMONJPSV02$TEST_CORE_APP RISCORE1\20071218021362\'.
> Stack: at
> Microsoft.SqlServer.Replication.Utilities.CreateDi rectoryWithExtendedErrorInformation(String
> directory)
> at
> Microsoft.SqlServer.Replication.Snapshot.SnapshotP rovider.CreateSnapshotFolders()
> at
> Microsoft.SqlServer.Replication.Snapshot.MergeSnap shotProvider.CreateSnapshotFolders()
> at
> Microsoft.SqlServer.Replication.Snapshot.SqlServer SnapshotProvider.GenerateSnapshot()
> at Microsoft.SqlServer.Replication.SnapshotGeneration Agent.InternalRun()
> at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: MSSQL_REPL,
> Error number: MSSQL_REPL52026)
> Get help: http://help/MSSQL_REPL52026
> Source: mscorlib
> Target Site: Void WinIOError(Int32, System.String)
> Message: Message: Logon failure: unknown user name or bad password.
> Stack: at System.IO.__Error.WinIOError(Int32 errorCode, String
> maybeFullPath)
> at System.IO.Directory.InternalCreateDirectory(String fullPath, String
> path, DirectorySecurity dirSecurity)
> at System.IO.Directory.CreateDirectory(String path, DirectorySecurity
> directorySecurity)
> at
> Microsoft.SqlServer.Replication.Utilities.CreateDi rectoryWithExtendedErrorInformation(String
> directory) (Source: mscorlib, Error number: 0)
> The user id and password are those of a domain user for the FTP server at
> location B. Do I have to use a non-AD account?
|||Thanks Hillary. I am assuming that becasue the servers are in two different
security domains that the account should be local on both servers? Also, if
the publication has already been created, can it be modified to modify the
job_login and job_password parameters? Thanks in advance.
"Hilary Cotter" wrote:

> You need to use a snapshot account which has rights to modify to
> \\172.27.1.187\unc. You specify this account in sp_addpublication_snapshot
> using the @.job_login and @.job_password parameters.
> This account should exist on \\172.27.1.187 and your publisher.
> --
> http://www.zetainteractive.com - Shift Happens!
> 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
> "parchk" <parchk@.discussions.microsoft.com> wrote in message
> news:7575E064-365A-49B4-B479-AD3C7D4E14C8@.microsoft.com...
>
>
|||Exactly, it should be a local account on both servers.
You can modify the snapshot account by right clicking on the publication in
SSMS, selecting properties and clicking on the agent security tab.
http://www.zetainteractive.com - Shift Happens!
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
"parchk" <parchk@.discussions.microsoft.com> wrote in message
news:915C3515-3E0A-4755-88B7-DE72D927A0E2@.microsoft.com...[vbcol=seagreen]
> Thanks Hillary. I am assuming that becasue the servers are in two
> different
> security domains that the account should be local on both servers? Also,
> if
> the publication has already been created, can it be modified to modify the
> job_login and job_password parameters? Thanks in advance.
> "Hilary Cotter" wrote:

Merge Replication using Web Sync - Proxy Auto config problem

Hi

I am trying to setup merge replication using web sync. I keep on getting the message: The Proxy Auto-configuration URL was not found. Yes I have read all the postings telling me to check my internet explorer settings concerning proxy server and auto-detection - I am not using a proxy - auto detection is unchecked.

Does anyone have another clue?

Thanks

Alex

2006-08-16 15:31:09.375 Connecting to Subscriber 'CRAW'
2006-08-16 15:31:09.437 Connecting to Subscriber 'CRAW'
2006-08-16 15:31:09.453 The upload message to be sent to Publisher 'CRAW' is being generated
2006-08-16 15:31:09.453 The merge process is using Exchange ID '20E2BF4F-8812-431F-8BF8-94A44B80C16E' for this web synchronization session.
2006-08-16 15:31:09.500 The Proxy Auto-configuration URL was not found.

After having no clue where to go on I decided to try it again setting it up using RMO.

Worked without even mentioning the proxy auto config

Imports Microsoft.SqlServer.Replication

Imports Microsoft.SqlServer.Management.Common

Public Class Replication

Private subscriberName As String

Private publisherName As String

Private windowsLogin As String

Private windowsPWD As String

Private publicationName As String

Private publicationDbName As String

Private subscriptionDbName As String

Private Hostname As String

Sub New(ByVal EntityID As Guid, ByVal SubscriberHost As String, ByVal PublisherHost As String, ByVal Login As String, ByVal PWD As String, ByVal Publication As String, ByVal PublicationDB As String, ByVal SubscriptionDB As String)

subscriberName = SubscriberHost

publisherName = PublisherHost

'the guid of the entity is passed as hostname to be used for filtering

Hostname = EntityID.ToString.ToUpper

windowsLogin = Login

windowsPWD = PWD

publicationName = Publication

subscriptionDbName = SubscriptionDB

publicationDbName = PublicationDB

End Sub

Sub SetupWebPull()

Dim webSyncUrl As String = "https://myhost/websync/replisapi.dll"

'Create connections to the Publisher and Subscriber.

Dim subscriberConn As ServerConnection = New ServerConnection(subscriberName)

Dim publisherConn As ServerConnection = New ServerConnection(publisherName)

' Create the objects that we need.

Dim publication As MergePublication

Dim subscription As MergePullSubscription

Try

' Connect to the Subscriber.

subscriberConn.Connect()

' Ensure that the publication exists and that

' it supports pull subscriptions and Web synchronization.

publication = New MergePublication()

publication.Name = publicationName

publication.DatabaseName = publicationDbName

publication.ConnectionContext = publisherConn

If publication.LoadProperties() Then

If (publication.Attributes And PublicationAttributes.AllowPull) = 0 Then

publication.Attributes = publication.Attributes _

Or PublicationAttributes.AllowPull

End If

If (publication.Attributes And PublicationAttributes.AllowWebSynchronization) = 0 Then

publication.Attributes = publication.Attributes _

Or PublicationAttributes.AllowWebSynchronization

End If

' Define the pull subscription.

subscription = New MergePullSubscription()

subscription.ConnectionContext = subscriberConn

subscription.PublisherName = publisherName

subscription.PublicationName = publicationName

subscription.PublicationDBName = publicationDbName

subscription.DatabaseName = subscriptionDbName

subscription.HostName = hostname

subscription.CreateSyncAgentByDefault = True

' Specify the Windows login credentials for the Merge Agent job.

subscription.SynchronizationAgentProcessSecurity.Login = windowsLogin

subscription.SynchronizationAgentProcessSecurity.Password = windowsPWD

' Enable Web synchronization.

subscription.UseWebSynchronization = True

subscription.InternetUrl = webSyncUrl

' Specify the same Windows credentials to use when connecting to the

' Web server using HTTPS Basic Authentication.

subscription.InternetSecurityMode = AuthenticationMethod.BasicAuthentication

subscription.InternetLogin = windowsLogin

subscription.InternetPassword = windowsPWD

' Create the pull subscription at the Subscriber.

subscription.Create()

Dim registered As Boolean = False

' Verify that the subscription is not already registered.

For Each existing As MergeSubscription In publication.EnumSubscriptions()

If existing.SubscriberName = subscriberName Then

registered = True

End If

Next

If Not registered Then

' Register the local subscription with the Publisher.

publication.MakePullSubscriptionWellKnown(subscriberName, subscriptionDbName, SubscriptionSyncType.Automatic, MergeSubscriberType.Local, 0)

End If

Else

' Do something here if the publication does not exist.

Throw New ApplicationException(String.Format("The publication '{0}' does not exist on {1}.", publicationName, publisherName))

End If

Catch ex As Exception

' Implement the appropriate error handling here.

Throw New ApplicationException(String.Format("The subscription to {0} could not be created.", publicationName), ex)

Finally

subscriberConn.Disconnect()

publisherConn.Disconnect()

End Try

End Sub

Sub PullMergeReplication()

' Create a connection to the Subscriber.

Dim conn As ServerConnection = New ServerConnection(subscriberName)

Dim subscription As MergePullSubscription

Try

' Connect to the Subscriber.

conn.Connect()

' Define subscription properties.

subscription = New MergePullSubscription()

subscription.ConnectionContext = conn

subscription.DatabaseName = subscriptionDbName

subscription.PublisherName = publisherName

subscription.PublicationDBName = publicationDbName

subscription.PublicationName = publicationName

' If the pull subscription and the job exists, start the agent job.

If subscription.LoadProperties() And Not subscription.AgentJobId Is Nothing Then

subscription.SynchronizeWithJob()

Else

' Do something here if the subscription does not exist.

Throw New ApplicationException(String.Format("A subscription to '{0}' does not exists on {1}", publicationName, subscriberName))

End If

Catch ex As Exception

' Do appropriate error handling here.

Throw New ApplicationException("The subscription could not be synchronized.", ex)

Finally

conn.Disconnect()

End Try

End Sub

End Class

|||?

I ran into a similar problem. It could be related to certificates. How did you generate your certificate?


--
Hilary Cotter

|||it is a problem with CA certificate;
on subscriber:
1. log on as user from which you try to run sync application
(if it is a windows service log on as service account)
2. install CA certificate ("Automatically select certificate store...")
3. test web page in IE (https://site_location/replisapi.dll)
4. In "Internet Options" -> "Connections" -> "Lan Settings" uncheck "Automatically detect settings"
5. run sync app.
6. enjoysql

Merge Replication using Web Sync - Proxy Auto config problem

Hi

I am trying to setup merge replication using web sync. I keep on getting the message: The Proxy Auto-configuration URL was not found. Yes I have read all the postings telling me to check my internet explorer settings concerning proxy server and auto-detection - I am not using a proxy - auto detection is unchecked.

Does anyone have another clue?

Thanks

Alex

2006-08-16 15:31:09.375 Connecting to Subscriber 'CRAW'
2006-08-16 15:31:09.437 Connecting to Subscriber 'CRAW'
2006-08-16 15:31:09.453 The upload message to be sent to Publisher 'CRAW' is being generated
2006-08-16 15:31:09.453 The merge process is using Exchange ID '20E2BF4F-8812-431F-8BF8-94A44B80C16E' for this web synchronization session.
2006-08-16 15:31:09.500 The Proxy Auto-configuration URL was not found.

After having no clue where to go on I decided to try it again setting it up using RMO.

Worked without even mentioning the proxy auto config

Imports Microsoft.SqlServer.Replication

Imports Microsoft.SqlServer.Management.Common

Public Class Replication

Private subscriberName As String

Private publisherName As String

Private windowsLogin As String

Private windowsPWD As String

Private publicationName As String

Private publicationDbName As String

Private subscriptionDbName As String

Private Hostname As String

Sub New(ByVal EntityID As Guid, ByVal SubscriberHost As String, ByVal PublisherHost As String, ByVal Login As String, ByVal PWD As String, ByVal Publication As String, ByVal PublicationDB As String, ByVal SubscriptionDB As String)

subscriberName = SubscriberHost

publisherName = PublisherHost

'the guid of the entity is passed as hostname to be used for filtering

Hostname = EntityID.ToString.ToUpper

windowsLogin = Login

windowsPWD = PWD

publicationName = Publication

subscriptionDbName = SubscriptionDB

publicationDbName = PublicationDB

End Sub

Sub SetupWebPull()

Dim webSyncUrl As String = "https://myhost/websync/replisapi.dll"

'Create connections to the Publisher and Subscriber.

Dim subscriberConn As ServerConnection = New ServerConnection(subscriberName)

Dim publisherConn As ServerConnection = New ServerConnection(publisherName)

' Create the objects that we need.

Dim publication As MergePublication

Dim subscription As MergePullSubscription

Try

' Connect to the Subscriber.

subscriberConn.Connect()

' Ensure that the publication exists and that

' it supports pull subscriptions and Web synchronization.

publication = New MergePublication()

publication.Name = publicationName

publication.DatabaseName = publicationDbName

publication.ConnectionContext = publisherConn

If publication.LoadProperties() Then

If (publication.Attributes And PublicationAttributes.AllowPull) = 0 Then

publication.Attributes = publication.Attributes _

Or PublicationAttributes.AllowPull

End If

If (publication.Attributes And PublicationAttributes.AllowWebSynchronization) = 0 Then

publication.Attributes = publication.Attributes _

Or PublicationAttributes.AllowWebSynchronization

End If

' Define the pull subscription.

subscription = New MergePullSubscription()

subscription.ConnectionContext = subscriberConn

subscription.PublisherName = publisherName

subscription.PublicationName = publicationName

subscription.PublicationDBName = publicationDbName

subscription.DatabaseName = subscriptionDbName

subscription.HostName = hostname

subscription.CreateSyncAgentByDefault = True

' Specify the Windows login credentials for the Merge Agent job.

subscription.SynchronizationAgentProcessSecurity.Login = windowsLogin

subscription.SynchronizationAgentProcessSecurity.Password = windowsPWD

' Enable Web synchronization.

subscription.UseWebSynchronization = True

subscription.InternetUrl = webSyncUrl

' Specify the same Windows credentials to use when connecting to the

' Web server using HTTPS Basic Authentication.

subscription.InternetSecurityMode = AuthenticationMethod.BasicAuthentication

subscription.InternetLogin = windowsLogin

subscription.InternetPassword = windowsPWD

' Create the pull subscription at the Subscriber.

subscription.Create()

Dim registered As Boolean = False

' Verify that the subscription is not already registered.

For Each existing As MergeSubscription In publication.EnumSubscriptions()

If existing.SubscriberName = subscriberName Then

registered = True

End If

Next

If Not registered Then

' Register the local subscription with the Publisher.

publication.MakePullSubscriptionWellKnown(subscriberName, subscriptionDbName, SubscriptionSyncType.Automatic, MergeSubscriberType.Local, 0)

End If

Else

' Do something here if the publication does not exist.

Throw New ApplicationException(String.Format("The publication '{0}' does not exist on {1}.", publicationName, publisherName))

End If

Catch ex As Exception

' Implement the appropriate error handling here.

Throw New ApplicationException(String.Format("The subscription to {0} could not be created.", publicationName), ex)

Finally

subscriberConn.Disconnect()

publisherConn.Disconnect()

End Try

End Sub

Sub PullMergeReplication()

' Create a connection to the Subscriber.

Dim conn As ServerConnection = New ServerConnection(subscriberName)

Dim subscription As MergePullSubscription

Try

' Connect to the Subscriber.

conn.Connect()

' Define subscription properties.

subscription = New MergePullSubscription()

subscription.ConnectionContext = conn

subscription.DatabaseName = subscriptionDbName

subscription.PublisherName = publisherName

subscription.PublicationDBName = publicationDbName

subscription.PublicationName = publicationName

' If the pull subscription and the job exists, start the agent job.

If subscription.LoadProperties() And Not subscription.AgentJobId Is Nothing Then

subscription.SynchronizeWithJob()

Else

' Do something here if the subscription does not exist.

Throw New ApplicationException(String.Format("A subscription to '{0}' does not exists on {1}", publicationName, subscriberName))

End If

Catch ex As Exception

' Do appropriate error handling here.

Throw New ApplicationException("The subscription could not be synchronized.", ex)

Finally

conn.Disconnect()

End Try

End Sub

End Class

|||?

I ran into a similar problem. It could be related to certificates. How did you generate your certificate?


--
Hilary Cotter

|||it is a problem with CA certificate;
on subscriber:
1. log on as user from which you try to run sync application
(if it is a windows service log on as service account)
2. install CA certificate ("Automatically select certificate store...")
3. test web page in IE (https://site_location/replisapi.dll)
4. In "Internet Options" -> "Connections" -> "Lan Settings" uncheck "Automatically detect settings"
5. run sync app.
6. enjoy

Merge Replication Using RMO

i have done web synchronisation using RMO, where replication is happening on both ends, i want to perform one way synchronisation where a sales guy wants to update only his details to the server , and not to update the data from the server, can anybody help me on this task , the code for synchronisation i have taken out from msdn for Merge Replication using RMO programming ..

Thanks

Take a look at merge agent parameter -ExchangeType, you can set this to do upload only. Only caveat is that in SQL 2005, to download a snapshot you have to reset this to bidirectional value, which will then download the snapshot and upload/download any incremental changes.|||

-ExchangeType is not supported for Web Synchronization.

So bottom line is, you cannot do a Uploadonly or Downloadonly synchronization when using Web Synchronization. Unfortunately this is a restriction that cannot be bypassed.

|||

http://blog.csdn.net/longrujun/archive/2006/06/09/783357.aspx

|||longrujun, again, I did not see your blog post talk about this specific issue. While your step by step guide is good, it will help if you post relevant information.

Wednesday, March 21, 2012

Merge Replication Problem

We have setup merge replication on a production server/database that
is also referenced by our web application. The replication works with
a remote, disconnected application that uses MSDE as it's back-end.
The replication works correctly, but we had to set aside a range of
PKIDs for each table because we were getting duplicate primary key
errors during synchronization of data. Unfortunately, this causes
problems with the web application. After the range of IDs runs out,
the web application can no longer update the database.
Has anyone else run into this problem? Is there a way around using
this method that will still remove the chance of getting a duplicate
primary key error during synchronization? Is setting aside a range of
IDs the only method for avoiding this error?
Thanks in advance
Dan Broomall
Please see my previous answer.
Regards,
Paul
|||Hi,
I have recently implemented merge replication between 1 publisher and 1
subscriber, with push subscription for every 10 minute interval. the
replication went fine, but we are experiencing huge performance problems.
most application users are not able to work on the primary server. We have
temporarily disabled the merge agents, but still the performance is not
boosted. Both publisher and distributor are on one machine with log files on
different drives. What should be the counters to monitor performance?
Also, the clients connect using the http port. the webserver is also on the
same machine as the sql server.
"Paul Ibison" wrote:

> Please see my previous answer.
> Regards,
> Paul
>
>
|||ST,
as you have disabled your merge agents, this side of things is obviously not
the cause. However, the replication triggers will still fire so this is an
overhead. For a general slowness of the sql server, you could look at
processor, memory and disk counters in Performance Monitor. Several articles
list the counters you might start with, so I won't list them here, but this
is a good starting point:
http://www.sql-server-performance.co...ce_article.asp
HTH,
Paul Ibison
|||Thankyou for responding. I have 1 more question, Do we have to replicate the
views and stored procedures compulsarily. I decided not to in the end because
all we really need is the data to replicate. Now i am thinking if the
execution of the stored procedures is causing the performance overhead.
Please tell me if by replicating the stored procedures and views, will i have
a performance boost. I want to do it if it is absolutely necessary.
Thanks
S.T
"Paul Ibison" wrote:

> ST,
> as you have disabled your merge agents, this side of things is obviously not
> the cause. However, the replication triggers will still fire so this is an
> overhead. For a general slowness of the sql server, you could look at
> processor, memory and disk counters in Performance Monitor. Several articles
> list the counters you might start with, so I won't list them here, but this
> is a good starting point:
> http://www.sql-server-performance.co...ce_article.asp
> HTH,
> Paul Ibison
>
>
|||ST,
I'm not sure which stored procedures and views you are referring to. In
merge you can replicate them, but if you use transactional you can not only
replicate the TSQL - entries in sysobjects, syscomments, syscolumns etc -
you can also choose to replicate the execution of stored procedures. Maybe
this is what you are looking for? I'm not too sure how this relates to your
performance issues however. Please can you expand a little.
TIA,
Paul Ibison
|||When i setup the merge replication, i just selected the Tables to be
published, i didnot select the user stored procedures and views that are used
by the appliaction database. i just wanted to publish as little as possible
since i was doing the no sync option and the subscriber was already having
the stored procedures and views associated with the tables. Now, I am
thinking if in anyway the merge process was not having any information about
the stored procedure execution, it might have made the performance slowdown.
Also, i noticed that the I/O reads and write have increased heavily and the
data drive has got highly fragmented. Please advise
Thanks
ST
"Paul Ibison" wrote:

> ST,
> I'm not sure which stored procedures and views you are referring to. In
> merge you can replicate them, but if you use transactional you can not only
> replicate the TSQL - entries in sysobjects, syscomments, syscolumns etc -
> you can also choose to replicate the execution of stored procedures. Maybe
> this is what you are looking for? I'm not too sure how this relates to your
> performance issues however. Please can you expand a little.
> TIA,
> Paul Ibison
>
>
|||ST,
merge replication doesn't replicate the execution of stored procedures -
just the TSQL on initialization, (and not when the definitions change
either).
If you have disk fragmentation, then (out of hours) I'd reindex all the
tables then defragment the disk. Backup everything before doing this to an
external device. It sounds like you have some benchmark comparisons so
running the same counters afterwards should show a noticeable difference.
HTH,
Paul Ibison

Merge Replication Problem

Hi all,

OS: Windows 2000 Server
SQL: SQL Server Standard 2000

I was searching the forums and the web but didn't find any information on solving this problem.

On the publisher when I look at the Replication Monitor -> Merge Agents section I see the following error to only one of the 4 subscribers. I've tried to removing and recreating the subscriber, unfortunately that didn't work so i recreated the merge replication all together with a new name and removed the original, this also didn't solve the problem.

I'm worried this is a problem on the subscriber, recently we renamed the windows computer name (which caused some data access and login errors), after doing a registry rebuild for SQL all of that seemed to be cleared up. NOt sure if this helps but I guess some background can't hurt.

So here's the error info that comes up.

Error Information

Agent, Merge Replication Provider, -2147200994
The process could not make a generation at the 'Subscriber'.

Data Source, SUBSCRIBER_DB_NAME, 515
Cannot insert the value NULL into column 'nicknames', table 'MyDB.dbo.MSmerge_genhistory'; column does not allow nulls. INSERT fails.

Thanks for any help...You have to do a no-sync subscription.
Check the following :
select * from sysmerge_subscriptions
go
Run sp_helpserver on the subscribing server and the srvid should be 0 for the subscriber.|||Hi Satya,

Thank you very much for the reply, at the very least it got me looking into nosync subscriptions...

Unfortunately I wasn't able to figure out how to set one up as such, and if simply changing the srvid at the subscriber is all that needs to be done.

I followed your instructions and ran the two queries you specificied at the SUBSCRIBER (not sure if both were supposed to be run at the subscriber...) and here are the results (in the attached zipped, csv file..) the srvid is not 0 for any of the rows.

If you get a chance to look at it and see the problem, or what needs to be changed (or how I should setup the nosync subscription), please do let me know...

once again thank you very much.|||Refer to books online about dynamic snapshot and applying them manually.

If any triggers are involved then execute sp_addsynctriggers, before that follow books online about this SP.

Friday, March 9, 2012

merge replication generation problem

Merge Replication Web Sync - Pull subscriptions
publisher and distributor: SQL Server 2005 X64 build 2221
clients are SQL Express builld 2047
We have 3 of our clients that received the following error at the end
of a merge.
SessionStatistics:
============================
UploadInserts:4
DownloadInserts:1748
DownloadUpdates:67
DownloadDeletes:15
SchemaChanges:1
ChangeDeliveryTime:64sec
SchemaChangeandBulkInsertTime:26sec
DeliveryRate:28.66rows/sec
TotalSessionDuration:368sec
================================================== ===========
2007-04-1823:50:38.669 The merge process was unable to create a new
generation at the'Subscriber'.Troubleshoot by restarting the
synchronization with verbose history logging and specify an output
file to which to write.
Since that time, they recieve the same error message at the beginning
of every merge attempt and fail immediately:
2007-04-1900:28:06.672 The merge process was unable to create a new
generation at the 'Subscriber'...
We have marked for re-init, but they get the above message prior and
fail, before ever doing a re-init.
Has anyone seen this? Have any suggestions what to look for/at?
TIA,
jg
Hi,
I am having the same problems with Merge Replication, did you find a solution?
Cheers
Pieter
"johng@.garrisonenterprises.net" wrote:

> Merge Replication Web Sync - Pull subscriptions
> publisher and distributor: SQL Server 2005 X64 build 2221
> clients are SQL Express builld 2047
> We have 3 of our clients that received the following error at the end
> of a merge.
> SessionStatistics:
> ============================
> UploadInserts:4
> DownloadInserts:1748
> DownloadUpdates:67
> DownloadDeletes:15
> SchemaChanges:1
> ChangeDeliveryTime:64sec
> SchemaChangeandBulkInsertTime:26sec
> DeliveryRate:28.66rows/sec
> TotalSessionDuration:368sec
> ================================================== ===========
> 2007-04-1823:50:38.669 The merge process was unable to create a new
> generation at the'Subscriber'.Troubleshoot by restarting the
> synchronization with verbose history logging and specify an output
> file to which to write.
>
> Since that time, they recieve the same error message at the beginning
> of every merge attempt and fail immediately:
> 2007-04-1900:28:06.672 The merge process was unable to create a new
> generation at the 'Subscriber'...
>
> We have marked for re-init, but they get the above message prior and
> fail, before ever doing a re-init.
> Has anyone seen this? Have any suggestions what to look for/at?
> TIA,
> jg
>

Merge replication et al - please help a newbie...

Hi,
Hope you can help me with this one. Advice greatly appreciated. We
have a web application on a server (lets call it server "A"). Its
talking to a DB server (lets call it server "B"). We want to backup
server "B" so that in the event "B" fallsover - the backup server (lets
call it "C") will kick in and carry on from where "B" left off. When
"B" is up it will automatically sync any new transactions logged to "C"
The application on "A" will detect if "B" is down and automatically
switch to "C".
Once "B" is fixed and up and running - "C" will automatically re-sync
with "B" and everything will be grand again.
After looking at various failover models from transactional
replication to log shipping I think that merge replication will do the
trick (because I think it will fulfill all the requirements). The boss
does not want to use failover clustering due to expense.
Can anyone out there please advise on any suggestions/comments/things
to set or watch out for before we begin this process? Any user
experiences/advice much much appreciated.
Thanking you,
Al.For optimal performance use bi-directional transactional replication. While
merge replication will work it adds latency to each DML and the syncs will
take typically over a minute - so your exposure to data loss is greater.
With bi-directional transactional replication it could be seconds.
Note that you really should be using clustering for this.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
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
<almurph@.altavista.com> wrote in message
news:1156779259.621228.78930@.i3g2000cwc.googlegroups.com...
> Hi,
> Hope you can help me with this one. Advice greatly appreciated. We
> have a web application on a server (lets call it server "A"). Its
> talking to a DB server (lets call it server "B"). We want to backup
> server "B" so that in the event "B" fallsover - the backup server (lets
> call it "C") will kick in and carry on from where "B" left off. When
> "B" is up it will automatically sync any new transactions logged to "C"
> The application on "A" will detect if "B" is down and automatically
> switch to "C".
> Once "B" is fixed and up and running - "C" will automatically re-sync
> with "B" and everything will be grand again.
> After looking at various failover models from transactional
> replication to log shipping I think that merge replication will do the
> trick (because I think it will fulfill all the requirements). The boss
> does not want to use failover clustering due to expense.
> Can anyone out there please advise on any suggestions/comments/things
> to set or watch out for before we begin this process? Any user
> experiences/advice much much appreciated.
> Thanking you,
> Al.
>|||Thanks Hilary,
I heard about translational replication but *not* bi-directional
replication. I take it "works both ways" if you take my meaning. That
is, if B fails and C records some transactions it will sync those back
to B if and when B comes online again. I thought that transactional
replication would not do this.
I know I should be clustering but its expensive and I have buydget
limitations.
Thanks though for your feedback.
Al.|||On 29 Aug 2006 03:25:42 -0700, almurph@.altavista.com wrote:

>Thanks Hilary,
> I heard about translational replication but *not* bi-directional
>replication. I take it "works both ways" if you take my meaning. That
>is, if B fails and C records some transactions it will sync those back
>to B if and when B comes online again. I thought that transactional
>replication would not do this.
> I know I should be clustering but its expensive and I have buydget
>limitations.
> Thanks though for your feedback.
Bidirectional was in SQL2K but the wizards wouldn't do it, you had to
read BOL and script your own commands. Don't know if the SQL2005
wizard is smarter. There are of course the usual complications for
identity fields and such, for replication. You can easily spend more
company money on your time setting up and managing replication, than
you might spend on clustering. Though, the bidirectional replication
looks pretty elegant, from about 10,000 feet of altitude.
J.

Merge replication et al - please help a newbie...

Hi,
Hope you can help me with this one. Advice greatly appreciated. We
have a web application on a server (lets call it server "A"). Its
talking to a DB server (lets call it server "B"). We want to backup
server "B" so that in the event "B" fallsover - the backup server (lets
call it "C") will kick in and carry on from where "B" left off. When
"B" is up it will automatically sync any new transactions logged to "C"
The application on "A" will detect if "B" is down and automatically
switch to "C".
Once "B" is fixed and up and running - "C" will automatically re-sync
with "B" and everything will be grand again.
After looking at various failover models from transactional
replication to log shipping I think that merge replication will do the
trick (because I think it will fulfill all the requirements). The boss
does not want to use failover clustering due to expense.
Can anyone out there please advise on any suggestions/comments/things
to set or watch out for before we begin this process? Any user
experiences/advice much much appreciated.
Thanking you,
Al.For one thing, there is a separate replication newsgroup you might
want to try:
microsoft.public.sqlserver.replication
For a few hints, replication is always about 10x more difficult than
it looks, especially in recovery after problems, and I'd give serious
consideration to transactional replication instead, of course
depending on your database side, transaction rate, etc.
J.
On 28 Aug 2006 08:34:11 -0700, almurph@.altavista.com wrote:

>Hi,
> Hope you can help me with this one. Advice greatly appreciated. We
>have a web application on a server (lets call it server "A"). Its
>talking to a DB server (lets call it server "B"). We want to backup
>server "B" so that in the event "B" fallsover - the backup server (lets
>call it "C") will kick in and carry on from where "B" left off. When
>"B" is up it will automatically sync any new transactions logged to "C"
> The application on "A" will detect if "B" is down and automatically
>switch to "C".
> Once "B" is fixed and up and running - "C" will automatically re-sync
>with "B" and everything will be grand again.
> After looking at various failover models from transactional
>replication to log shipping I think that merge replication will do the
>trick (because I think it will fulfill all the requirements). The boss
>does not want to use failover clustering due to expense.
> Can anyone out there please advise on any suggestions/comments/things
>to set or watch out for before we begin this process? Any user
>experiences/advice much much appreciated.
>Thanking you,
>Al.

Merge replication et al - please help a newbie...

Hi,
Hope you can help me with this one. Advice greatly appreciated. We
have a web application on a server (lets call it server "A"). Its
talking to a DB server (lets call it server "B"). We want to backup
server "B" so that in the event "B" fallsover - the backup server (lets
call it "C") will kick in and carry on from where "B" left off. When
"B" is up it will automatically sync any new transactions logged to "C"
The application on "A" will detect if "B" is down and automatically
switch to "C".
Once "B" is fixed and up and running - "C" will automatically re-sync
with "B" and everything will be grand again.
After looking at various failover models from transactional
replication to log shipping I think that merge replication will do the
trick (because I think it will fulfill all the requirements). The boss
does not want to use failover clustering due to expense.
Can anyone out there please advise on any suggestions/comments/things
to set or watch out for before we begin this process? Any user
experiences/advice much much appreciated.
Thanking you,
Al.For one thing, there is a separate replication newsgroup you might
want to try:
microsoft.public.sqlserver.replication
For a few hints, replication is always about 10x more difficult than
it looks, especially in recovery after problems, and I'd give serious
consideration to transactional replication instead, of course
depending on your database side, transaction rate, etc.
J.
On 28 Aug 2006 08:34:11 -0700, almurph@.altavista.com wrote:
>Hi,
> Hope you can help me with this one. Advice greatly appreciated. We
>have a web application on a server (lets call it server "A"). Its
>talking to a DB server (lets call it server "B"). We want to backup
>server "B" so that in the event "B" fallsover - the backup server (lets
>call it "C") will kick in and carry on from where "B" left off. When
>"B" is up it will automatically sync any new transactions logged to "C"
> The application on "A" will detect if "B" is down and automatically
>switch to "C".
> Once "B" is fixed and up and running - "C" will automatically re-sync
>with "B" and everything will be grand again.
> After looking at various failover models from transactional
>replication to log shipping I think that merge replication will do the
>trick (because I think it will fulfill all the requirements). The boss
>does not want to use failover clustering due to expense.
> Can anyone out there please advise on any suggestions/comments/things
>to set or watch out for before we begin this process? Any user
>experiences/advice much much appreciated.
>Thanking you,
>Al.

Merge replication et al - please help a newbie...

Hi,
Hope you can help me with this one. Advice greatly appreciated. We
have a web application on a server (lets call it server "A"). Its
talking to a DB server (lets call it server "B"). We want to backup
server "B" so that in the event "B" fallsover - the backup server (lets
call it "C") will kick in and carry on from where "B" left off. When
"B" is up it will automatically sync any new transactions logged to "C"
The application on "A" will detect if "B" is down and automatically
switch to "C".
Once "B" is fixed and up and running - "C" will automatically re-sync
with "B" and everything will be grand again.
After looking at various failover models from transactional
replication to log shipping I think that merge replication will do the
trick (because I think it will fulfill all the requirements). The boss
does not want to use failover clustering due to expense.
Can anyone out there please advise on any suggestions/comments/things
to set or watch out for before we begin this process? Any user
experiences/advice much much appreciated.
Thanking you,
Al.For optimal performance use bi-directional transactional replication. While
merge replication will work it adds latency to each DML and the syncs will
take typically over a minute - so your exposure to data loss is greater.
With bi-directional transactional replication it could be seconds.
Note that you really should be using clustering for this.
--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
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
<almurph@.altavista.com> wrote in message
news:1156779259.621228.78930@.i3g2000cwc.googlegroups.com...
> Hi,
> Hope you can help me with this one. Advice greatly appreciated. We
> have a web application on a server (lets call it server "A"). Its
> talking to a DB server (lets call it server "B"). We want to backup
> server "B" so that in the event "B" fallsover - the backup server (lets
> call it "C") will kick in and carry on from where "B" left off. When
> "B" is up it will automatically sync any new transactions logged to "C"
> The application on "A" will detect if "B" is down and automatically
> switch to "C".
> Once "B" is fixed and up and running - "C" will automatically re-sync
> with "B" and everything will be grand again.
> After looking at various failover models from transactional
> replication to log shipping I think that merge replication will do the
> trick (because I think it will fulfill all the requirements). The boss
> does not want to use failover clustering due to expense.
> Can anyone out there please advise on any suggestions/comments/things
> to set or watch out for before we begin this process? Any user
> experiences/advice much much appreciated.
> Thanking you,
> Al.
>|||Thanks Hilary,
I heard about translational replication but *not* bi-directional
replication. I take it "works both ways" if you take my meaning. That
is, if B fails and C records some transactions it will sync those back
to B if and when B comes online again. I thought that transactional
replication would not do this.
I know I should be clustering but its expensive and I have buydget
limitations.
Thanks though for your feedback.
Al.|||On 29 Aug 2006 03:25:42 -0700, almurph@.altavista.com wrote:
>Thanks Hilary,
> I heard about translational replication but *not* bi-directional
>replication. I take it "works both ways" if you take my meaning. That
>is, if B fails and C records some transactions it will sync those back
>to B if and when B comes online again. I thought that transactional
>replication would not do this.
> I know I should be clustering but its expensive and I have buydget
>limitations.
> Thanks though for your feedback.
Bidirectional was in SQL2K but the wizards wouldn't do it, you had to
read BOL and script your own commands. Don't know if the SQL2005
wizard is smarter. There are of course the usual complications for
identity fields and such, for replication. You can easily spend more
company money on your time setting up and managing replication, than
you might spend on clustering. Though, the bidirectional replication
looks pretty elegant, from about 10,000 feet of altitude.
J.