Preinstalling SQL Express 2012 SP1 for Lync Server 2013

Continuing the previous blog post (, the same method can also be applied for Lync Server 2013.

Lync Server 2013 RTM installation package comes with SQL Express 2012 RTM, thus preinstalling SQL Express 2012 SP1 will become a handy solution to avoid the need to patch the server after Lync Server 2013 installation.

The change with Lync Server 2013 however is that the Front End server now consists of two SQL Express 2012 instances, RTCLOCAL and LYNCLOCAL.

RTCLOCAL instance contains the rtc, rtcdyn, and xds databases, whilst LYNCLOCAL instance contains the lyss database.


The SQL Express 2012 SP1 x64 version can be downloaded from:


And the following one liner can be used to preinstall SQL Express 2012 SP1 RTCLOCAL instance:



The following one liner can be used to preinstall SQL Express 2012 SP1 LYNCLOCAL instance:


NOTE: If you happen to choose to install SQL Express 2012 SP1 using the GUI instead, please note that TCP/IP is not enabled by default and will cause Lync database installation to fail. This can be corrected easily by enabling TCP/IP on both RTCLOCAL and LYNCLOCAL instances using SQL Server Configuration Manager.

Comments (9)

  1. Anonymous says:

    When I run these two commands, then continue to install Lync, I get the well documented error (when the install tries to run Import-CSConfiguration) Cannot open database "xds" requested by the login. The login failed. Login failed for user 'DOMAINNAMEAdministrator'

    The solution is to uninstall the Lync components, uninstall SQL Express 2012 SP1, and let Lync install SQL Express 2012. Are there some permissions missing from the command lines above? What equivalent command does the Lync installer use? In the log for another Lync Server 2013 install I can see these lines:

    Publisheracct=RTC Local Administrators;NT AUTHORITYSYSTEM

    Replicatoracct=NT SERVICEREPLICA;RTC Local Config Replicator

    Consumeracct=RTC Server Local Group;RTC Component Local Group;RTC Local Read-only Administrators;NT AUTHORITYSYSTEM

    Do these need to be added somehow to the SQLEXPR_x64_ENU arguments above?

  2. Anonymous says:

    For a Standard Server you also need to run the command a third time to install the /INSTANCENAME=RTC.

  3. Pat Richard says:

    Is it just me, or are both of those install commands the same? And missing some double quotes?

  4. Pat Richard says:

    Ah – if you copy and paste, it's there. Just not visible on this page due to formatting.

  5. Bo Eschricht says:

    I got the same ‘Cannot open database “xds” requested by the login’ error after having first installed SQL using the deployment wizard, then uninstalled SQL , then installed SQL using above method.

    The reason seems to be that Lync assumes the replica of xds is up and running which is not the case after the above operations.

    I fixed the error by uninstalling the Lync Core Components feature named “Feature_LocalMgmtStore”: msiexec /I {8901ADFC-435C-4E37-9045-9E2E7A613285} REMOVE=”Feature_LocalMgmtStore” /qb
    After that I ran the Deployment wizard again with success.
    Maybe a repair can do the trick, I didn’t try that.

    In case the GUID for the Core Components package changes, look it up this way: wmic product WHERE “Name like ‘%Lync%'” GET Name,IdentifyingNumber

    Hope this helps.

  6. Mahdi Jafari says:

    thanks very much

  7. Pat Richard says:

    SQL Express 2012 SP2 is out now, and can be downloaded from I’ll have it added to my prereq script at soon.

  8. Jon says:

    Bo, that worked for me, thanks!!!!!

  9. Stefan Libiseller says:

    I think reinstall is not necessary. Have a look at the SQL management studio and the SQL’s data directory.You will possibly not see the xds DB in the management stufio, but find a xds.mdf there that can be re-attached.

    Re-attach the DB and retry the setup step.

Skip to main content