An error occurred while applying SQL script for the feature RtcDatabaseStore

Hello Readers,

I have been recently rebuilding my Lab Environments and ran into this error on my Edge Server when trying to setup Lync Server Components.

An error occurred while applying SQL script for the feature RtcDatabaseStore

image

So what did the log file state?

****Creating DbSetupInstance for ‘Microsoft.Rtc.Common.Data.RtcDatabase’****
Initializing DbSetupBase
Parsing parameters…
Found Parameter: SqlServer Value eg01.lyncme.local\rtclocal.
Found Parameter: SqlFilePath Value C:\Program Files\Common Files\Microsoft Lync Server 2013\DbSetup.
Found Parameter: Serveracct Value RTC Component Local Group;RTC Server Local Group.
Found Parameter: Adminacct Value RTC Local Administrators.
Found Parameter: Roacct Value RTC Local Read-only Administrators.
Found Parameter: DbPath Value C:\CsData\RtcDatabaseStore\rtclocal\DbPath.
Found Parameter: LogPath Value C:\CsData\RtcDatabaseStore\rtclocal\LogPath.
Found Parameter: DynDbPath Value C:\CsData\RtcDatabaseStore\rtclocal\DynDbPath.
Found Parameter: DynLogPath Value C:\CsData\RtcDatabaseStore\rtclocal\DynLogPath.
Found Parameter: Role Value se.
Trying to connect to Sql Server eg01.lyncme.local\rtclocal. using windows authentication…
Sql version: Major: 11, Minor: 0, Build 3128.
Sql version is acceptable.
Validating parameters…
DbName rtc validated.
SqlFilePath C:\Program Files\Common Files\Microsoft Lync Server 2013\DbSetup validated.
DbFileBase rtc validated.
DbPath C:\CsData\RtcDatabaseStore\rtclocal\DbPath validated.
Effective database Path: \\eg01.lyncme.local\C$\CsData\RtcDatabaseStore\rtclocal\DbPath.
LogPath C:\CsData\RtcDatabaseStore\rtclocal\LogPath validated.
Effective Log Path: \\eg01.lyncme.local\C$\CsData\RtcDatabaseStore\rtclocal\LogPath.
****Creating DbSetupInstance for ‘Microsoft.Rtc.Common.Data.RtcDynDatabase’****
Initializing DbSetupBase
Parsing parameters…
Found Parameter: SqlServer Value eg01.lyncme.local\rtclocal.
Found Parameter: SqlFilePath Value C:\Program Files\Common Files\Microsoft Lync Server 2013\DbSetup.
Found Parameter: Serveracct Value RTC Component Local Group;RTC Server Local Group.
Found Parameter: Adminacct Value RTC Local Administrators.
Found Parameter: Roacct Value RTC Local Read-only Administrators.
Found Parameter: DbPath Value C:\CsData\RtcDatabaseStore\rtclocal\DbPath.
Found Parameter: LogPath Value C:\CsData\RtcDatabaseStore\rtclocal\LogPath.
Found Parameter: DynDbPath Value C:\CsData\RtcDatabaseStore\rtclocal\DynDbPath.
Found Parameter: DynLogPath Value C:\CsData\RtcDatabaseStore\rtclocal\DynLogPath.
Found Parameter: Role Value se.
Trying to connect to Sql Server eg01.lyncme.local\rtclocal. using windows authentication…
Sql version: Major: 11, Minor: 0, Build 3128.
Sql version is acceptable.
Validating parameters…
DbName rtcdyn validated.
SqlFilePath C:\Program Files\Common Files\Microsoft Lync Server 2013\DbSetup validated.
DbFileBase rtcdyn validated.
DbPath C:\CsData\RtcDatabaseStore\rtclocal\DbPath validated.
Effective database Path: \\eg01.lyncme.local\C$\CsData\RtcDatabaseStore\rtclocal\DbPath.
LogPath C:\CsData\RtcDatabaseStore\rtclocal\LogPath validated.
Effective Log Path: \\eg01.lyncme.local\C$\CsData\RtcDatabaseStore\rtclocal\LogPath.
Checking state for database rtc.
Checking state for database rtc.
RtcDyn db state is: DbState_UpToDate
Database rtcdyn set to mode Restricted.
Dyn Data Path = C:\CsData\RtcDatabaseStore\rtclocal\DynDbPath, Dyn Log Path = C:\CsData\RtcDatabaseStore\rtclocal\DynLogPath.
Database rtcdyn set to mode Multiple.
Creating database rtcdyn from scratch. Data File Path = C:\CsData\RtcDatabaseStore\rtclocal\DynDbPath, Log File Path= C:\CsData\RtcDatabaseStore\rtclocal\DynLogPath.
Setting the database rtcdyn to single user mode.
Database rtcdyn set to mode Single.
Dropping Database rtcdyn.
Clean installing database rtcdyn.
Setting the database rtcdyn to restricted mode.
Database rtcdyn set to mode Restricted.
Setting database options.
Creating objects from dbcommon.sql.
Creating database objects.
Executing Types.sql…
Executing roles.sql in rtcdyn…
Executing dbrtcdyn.sql…
Reindexing…
Re-indexing table ActiveConference.
Updating statistics for table ActiveConference.
Re-indexing table ActiveMcu.
Updating statistics for table ActiveMcu.
Re-indexing table CallNotificationEvents.
Updating statistics for table CallNotificationEvents.
Re-indexing table CategorySubscription.
Updating statistics for table CategorySubscription.
Re-indexing table DbConfigDateTime.
Updating statistics for table DbConfigDateTime.
Re-indexing table DbConfigInt.
Updating statistics for table DbConfigInt.
Re-indexing table DbErrorMessage.
Updating statistics for table DbErrorMessage.
Re-indexing table DeliveryContext.
Updating statistics for table DeliveryContext.
Re-indexing table Endpoint.
Updating statistics for table Endpoint.
Re-indexing table FrontEnd.
Updating statistics for table FrontEnd.
Re-indexing table HomedResourceDynamic.
Updating statistics for table HomedResourceDynamic.
Re-indexing table Mcu.
Updating statistics for table Mcu.
Re-indexing table McuHealth.
Updating statistics for table McuHealth.
Re-indexing table McuPublication.
Updating statistics for table McuPublication.
Re-indexing table NotifyPipeUri.
Updating statistics for table NotifyPipeUri.
Re-indexing table Participant.
Updating statistics for table Participant.
Re-indexing table ParticipantMcuSession.
Updating statistics for table ParticipantMcuSession.
Re-indexing table ParticipantSignalingSession.
Updating statistics for table ParticipantSignalingSession.
Re-indexing table ParticipantSubscriptionSession.
Updating statistics for table ParticipantSubscriptionSession.
Re-indexing table PublishedInstance.
Updating statistics for table PublishedInstance.
Re-indexing table Registrar.
Updating statistics for table Registrar.
Re-indexing table RegistrarEndpoint.
Updating statistics for table RegistrarEndpoint.
Re-indexing table RemoteDeliveryContext.
Updating statistics for table RemoteDeliveryContext.
Re-indexing table RemotePublisher.
Updating statistics for table RemotePublisher.
Re-indexing table RemoteSelfDeliveryContext.
Updating statistics for table RemoteSelfDeliveryContext.
Re-indexing table RemoteSelfSubChangeCategoryFilter.
Updating statistics for table RemoteSelfSubChangeCategoryFilter.
Re-indexing table RemoteSelfSubExistsCategoryFilter.
Updating statistics for table RemoteSelfSubExistsCategoryFilter.
Re-indexing table RemoteSelfSubOutputCategoryFilter.
Updating statistics for table RemoteSelfSubOutputCategoryFilter.
Re-indexing table RemoteSubscriber.
Updating statistics for table RemoteSubscriber.
Re-indexing table ReplicatedEndpoints.
Updating statistics for table ReplicatedEndpoints.
Re-indexing table SelfSubscription.
Updating statistics for table SelfSubscription.
Re-indexing table SprocDef.
Updating statistics for table SprocDef.
Re-indexing table SprocExecuteError.
Updating statistics for table SprocExecuteError.
Re-indexing table SubscriptionDynamic.
Updating statistics for table SubscriptionDynamic.
Re-indexing table SubscriptionStatic.
Updating statistics for table SubscriptionStatic.
Re-indexing table Task.
Updating statistics for table Task.
Re-indexing table UscDownNotifiedRegistrarEndpoint.
Updating statistics for table UscDownNotifiedRegistrarEndpoint.
Updating database roles.
Setting owner for database rtcdyn to sa.
Creating login EG01\RTC Component Local Group.
The server principal ‘EG01\RTC Component Local Group’ already exists.

To resolve this issue we need to get into the SQL on the Edge Server. I have done this by installing SQL Management Studio

Browse to Security –> Logins

Then delete

  • RTC Components Local Group
  • RTC Local Administrators
  • RTC Local Config Replicator
  • RTC Local Read-only Administrator
  • RTC Server Local Group

image

And now you should be able to successfully complete Step 2: Set Up Lync Server Components

image

Regards

Andrew Price

3 thoughts on “An error occurred while applying SQL script for the feature RtcDatabaseStore”

  1. Thanks Andrew, ran into this on a Skype for Business Edge server deployment.

    In my case, there was a typo in the Edge server name, which was picked up after running step 1 of the deployment wizard. I corrected the server name, and attempted to continue onto step 2, but was unsuccessful (until I found your blog of course).

    Cheers,

    Damien

Leave a Reply

Your email address will not be published. Required fields are marked *