Fazer projeto de rede SQL SERVER entre varios terminais SERVER <> Terminal1 <> Terminal2
$30-250 USD
Closed
Posted over 5 years ago
$30-250 USD
Paid on delivery
Tenho a conexão no modo de publicação de dados entre SQL SERVER e Terminal.
So o problema e monitorar a conexao no caso e dar a prioridade de conexão.
Tanbem precizo disparar o monitor tanto no servidor quanto no terminal
o Codigo Exemplo que tenho e este.
' Define the server, publication, and database names.
Dim subscriberName As String = subscriberInstance
Dim publisherName As String = publisherInstance
Dim publicationName As String = "AdvWorksProductTran"
Dim subscriptionDbName As String = "AdventureWorks2012Replica"
Dim publicationDbName As String = "AdventureWorks2012"
' Create a connection to the Publisher.
Dim conn As ServerConnection = New ServerConnection(publisherName)
Dim subscription As TransSubscription
Try
' Connect to the Publisher.
[login to view URL]()
' Instantiate the push subscription.
subscription = New TransSubscription()
[login to view URL] = conn
[login to view URL] = publicationDbName
[login to view URL] = publicationName
[login to view URL] = subscriptionDbName
[login to view URL] = subscriberName
' If the push subscription and the job exists, start the agent job.
If [login to view URL]() And Not [login to view URL] Is Nothing Then
' Start the Distribution Agent asynchronously.
[login to view URL]()
Else
' Do something here if the subscription does not exist.
Throw New ApplicationException([login to view URL]( _
"A subscription to '{0}' does not exists on {1}", _
publicationName, subscriberName))
End If
Catch ex As Exception
' Implement appropriate error handling here.
Throw New ApplicationException("The subscription could not be synchronized.", ex)
Finally
[login to view URL]()
End Try
Precizo monitorar a conexao dos dois lados e tanbem para ser em linguagem vb.net