The login SA does not exist on this server

By | September 6, 2014

While deploying a Lync 2013 pool for a client, we ran into issues publishing the new Lync Topology and installing databases.

cms-topo-error
cms-topo-error-xml

Looking at the Create database log, the issue occurs while the database owner is being set:

Setting owner for database xds to sa.
Exception Stack:
Type: Microsoft.SqlServer.Management.Smo.FailedOperationException, Message: Set owner failed for Database ‘xds’.
Type: Microsoft.SqlServer.Management.Smo.SmoException, Message: An exception occurred in SMO.
Type: System.ArgumentException, Message: The login ‘sa’ does not exist on this server.

Using SQL Management Studio we see the problem database stuck in “Restricted User” mode and find that the SQL team’s best practice is to rename the SA account.
sms-ru-sa

The quick fix is to simply rename the account back to SA, drop the database and publish the Topology again.
sms-sa-rename
cms-success
sms-success

Keep in mind if you don’t drop the blank problem database, you will see another error while publishing the Topology:

An internal error has occured while trying to create or update the database.
Error: Database xds could not be updated because it requires major upgrade from version 0 to version 10.

cms-update-error

After recreating the issue in my lab

  • I have found that no matter which new database(Central Management/Enterprise Edition Back End/Monitoring/Archiving/Persistent Chat) is deployed the SA account must exist and can’t be renamed.
    topo-db-error
  • The SA account doesn’t have an impact on deploying Lync Monitoring Reports.
  • Although during normal operation renaming the SA account back to something else doesn’t impact Lync services, going through the database update procedure that is part of installing Lync Server Cumulative Updates ( http://support.microsoft.com/kb/2809243 ) will run into the same problem.
    update-error

    update-success

Leave a Comment