08/10/2013

Failed to register with back-end database. Microsoft Lync Server 2013

When moveing CMS to another SQL server there can be some issue where you get this kind of error.
Failed to register with back-end database. Microsoft Lync Server 2013, Master Replicator Agent will continuously attempt to reconnect to the back-end. While this condition persists, no replication will be done.

The Connection string: Data Source = customer.domain.com;

Database = xds;

Max Pool Size = 5;

Connection Timeout = 60;

Connection Reset = false;

Enlist = false;

Integrated Security = true;

Pooling = true;

Exception: [229] System.Data.SqlClient.SqlException (0x80131904): The EXECUTE permission was denied on the object 'XdsRegisterComponent', database 'xds', schema 'dbo'.

at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()

at System.Data.SqlClient.SqlDataReader.get_MetaData()

at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)

at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite)

at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)

at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)

at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)

at System.Data.SqlClient.SqlCommand.ExecuteReader()

at Microsoft.Rtc.Common.Data.DBCore.Execute(SprocContext sprocContext, SqlConnection sqlConnection, SqlTransaction sqlTransaction)

ClientConnectionId:8905e52a-39b3-4a44-85d6-4ad63755960c

Cause: Possible issues with back-end database.

Resolution:

Ensure the back-end is functioning correctly.

what I did to fix this was easy when I found the solution. I just added users RTCUniversalServerAdmin account to the sysadmin role for the SQL Server.
Then we get this in the event logg:
Successfully connected to back-end using the connection string of

Data Source = customerSQL.domain.com;

Database = xds;

Max Pool Size = 5;

Connection Timeout = 60;

Connection Reset = false;

Enlist = false;

Integrated Security = true;

Pooling = true;

1 comment: