all groups > sql server replication > august 2006 >
You're in the

sql server replication

group:

2 machines..how hard could it be


Re: 2 machines..how hard could it be Hilary Cotter
8/31/2006 10:07:31 PM
sql server replication:
There is a condition where the log reader or distribution agent hang due to
depleted buffers. Try to run distrib from the command line using the
arguments passed to your distribution agent and see if it works.

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



[quoted text, click to view]

2 machines..how hard could it be JEFFREY BRANDT
8/31/2006 11:39:27 PM
I have two Windows XP SP2 machines with full installs of SQL Server 2005.
Both machines are on a Class III private network with four computers on it,
and no server.

Machine A has a database that we'd like to end up, in full, on Machine B,
once per day at 12:05AM.

Seems like Machine A should be the Publisher and Distributor, and
Machine B should have a subscription.

We get Machine A to make the files into a directory on its hard drive.

The replicatoin monitor on Machine A sees that Machine B is activating, but

The data in the tables never changes.

I've burned up 2 days on this, and would like the 'top 5' things to check.

Man, this shouldn't be this hard.

Some have suggested a scheduled IMPORT, but I can't figure out SSIS either.




Re: 2 machines..how hard could it be Paul Ibison
9/1/2006 12:00:00 AM
Have a look for any blocking issues on the subscriber (sp_who2) and also run
dbcc inputbuffer to see what is actually happening on the subscriber.
Another thing to check is the owner of the distribution agent's job - should
be sa. Another thing to do is logging to a text file to see if any more info
is received.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

RE: 2 machines..how hard could it be SteveO
9/4/2006 6:06:37 AM
Paul,
Can you or Hilary elaborate on how to get more information from the Merge agent errors?
I'm programming web sync merge use the RMO using the Agent.Synchronize() method which returns the ubiquitous 'Subscription expired or does not exists'.
I've verified my replisapi.dll/?diag to the Distributing IIS server. My subscription.loadproperties() method returns true.
I hope I'm nearing the final hurdle in what has been a long slogg to get Web Sync merge replication between SQL 2005 standard and express.

You help would be appriciated.

From http://www.developmentnow.com/g/114_2006_8_0_0_814752/2-machines-how-hard-could-it-be.htm

Posted via DevelopmentNow.com Groups
Re: 2 machines..how hard could it be Hilary Cotter
9/4/2006 9:58:31 AM


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



[quoted text, click to view]

Re: 2 machines..how hard could it be Hilary Cotter
9/4/2006 10:00:35 AM
Use the output command. In this code sample I demostrate it. I mark the
section right here Steve0

Imports Microsoft.SqlServer.Replication 'create a reference to c:\
Imports Microsoft.SqlServer.Management.Smo
Imports Microsoft.SqlServer.Management.Common
Imports Microsoft.SqlServer.Server


Public Class Form1

'Make changes to the below entries to match your topology
'--------------------------------------------


Dim publicationName As String = "PublicationName"
Dim publisherName As String = "SERVER"
Dim publisherLogin As String = "Non_sa_account_in_the_pal"
Dim publisherPassword As String = "Password"
Dim publicationDbName As String = "PublicationDB"
Dim distributorLogin As String =
"DBO_account_in_the_distributionDatabase"
Dim distributorPassword As String = "Password"
Dim distributorAddress As String = "10.10.10.10"
Dim internetTimeout As Integer = 3000
Dim subscriberLogin As String = "Non_sa_account_on_the_Subscriber"
Dim subscriberPassword As String = "Password"
Dim subscriberName As String = "SubscriberMachineName"
Dim subscriptionDbName As String = "AdventureWorksReplica" '''

Dim hostname As String = "SubscriberMachineName"
Dim subscriberSynchronizationAccount =
"WindowsNTAccountOnTheSubscriberShouldBeInTheLocalAdministratorsGroup"
Dim subscriberSynchronizationPassword = "Password"
Dim internetLogin As String = "BasicAuthenticationAccountOnWebServer"
Dim internetPassword As String = "password"
Dim OutputVerboseLevel As Integer = 3

Dim outputFile As String = "C:\replication.out"

Dim webSyncUrl As String =
"https://server.MyDomain.com/MyVirtualDirectory/replisapi.dll"

'--------------------------------



Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

' The publication must support anonymous Subscribers, pull
' subscriptions, and Web synchronization.
' Define the Publisher, publication, and databases.


'Create the Subscriber connection.
Dim conn As ServerConnection = New ServerConnection(subscriberName)

' Create the objects that we need.
Dim subscription As MergePullSubscription

Try
' Connect to the Subscriber.
'conn.Connect()


' Define the pull subscription.
subscription = New MergePullSubscription()
subscription.ConnectionContext = conn
subscription.PublisherName = publisherName
subscription.PublicationName = publicationName
subscription.PublicationDBName = publicationDbName
subscription.DatabaseName = subscriptionDbName
subscription.HostName = hostname

' Specify an anonymous Subscriber type since we can't
' register at the Publisher with a direct connection.
subscription.SubscriberType = MergeSubscriberType.Anonymous

' Specify the Windows login credentials for the Merge Agent job.
subscription.SynchronizationAgentProcessSecurity.Login =
subscriberSynchronizationAccount
subscription.SynchronizationAgentProcessSecurity.Password =
subscriberSynchronizationPassword

' 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 = internetLogin
subscription.InternetPassword = internetPassword

' Ensure that we create a job for this subscription.
subscription.CreateSyncAgentByDefault = True

' Create the pull subscription at the Subscriber.

If subscription.IsExistingObject() = True Then
Synchronize.Visible = True
CreateSubscription.Visible = False
Else
Synchronize.Visible = False
CreateSubscription.Visible = True
End If
Catch ex As Exception
' Implement the appropriate error handling here.
MessageBox.Show(ex.InnerException.ToString())

Finally
conn.Disconnect()
End Try



End Sub

Private Sub CreateSubscription_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles CreateSubscription.Click

' The publication must support anonymous Subscribers, pull
' subscriptions, and Web synchronization.
' Define the Publisher, publication, and databases.


'Create the Subscriber connection.
Dim conn As ServerConnection = New ServerConnection(subscriberName)

' Create the objects that we need.
Dim subscription As MergePullSubscription

Try
' Connect to the Subscriber.
'conn.Connect()


' Define the pull subscription.
subscription = New MergePullSubscription()
subscription.ConnectionContext = conn
subscription.PublisherName = publisherName
subscription.PublicationName = publicationName
subscription.PublicationDBName = publicationDbName
subscription.DatabaseName = subscriptionDbName
subscription.HostName = hostname

' Specify an anonymous Subscriber type since we can't
' register at the Publisher with a direct connection.
subscription.SubscriberType = MergeSubscriberType.Anonymous

' Specify the Windows login credentials for the Merge Agent job.
subscription.SynchronizationAgentProcessSecurity.Login =
subscriberSynchronizationAccount
subscription.SynchronizationAgentProcessSecurity.Password =
subscriberSynchronizationPassword

' 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 = internetLogin

subscription.InternetPassword = internetPassword

' Ensure that we create a job for this subscription.
subscription.CreateSyncAgentByDefault = True

' Create the pull subscription at the Subscriber.
subscription.Create()
Synchronize.Visible = True
Catch ex As Exception
AddThis Social Bookmark Button