You’re logged onto the Lync Server 2013 server and attempt to use Topology Builder to download the Lync topology:
… but receive the following error:
Cannot open database "xds" requested by the login. The login failed.Login failed for user 'someDomain\someAdmin'. ---> System.Data.SqlClient.SqlException: Cannot open database "xds" requested by the login. The login failed.Login failed for user 'someDomain\someAdmin'.
The following is the complete output:
Attempting to perform the InitializeDefaultDrives operation on the 'FileSystem' provider failed.
System.Management.Automation.CmdletInvocationException: Cannot read topology. Verify that the topology data is accessible. ---> Microsoft.Rtc.Common.Data.SqlConnectionException: Cannot open database "xds" requested by the login. The login failed.Login failed for user 'someDomain\someAdmin'. ---> System.Data.SqlClient.SqlException: Cannot open database "xds" requested by the login. The login failed.Login failed for user 'someDomain\someAdmin'. at System.Data.SqlClient.SqlInternalConnection.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.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.Rtc.Common.Data.DBCore.PerformSprocContextExecution(SprocContext sprocContext) --- End of inner exception stack trace --- at Microsoft.Rtc.Management.Store.Sql.XdsSqlConnection.ReadDocItems(ICollection`1 key) at Microsoft.Rtc.Management.ScopeFramework.AnchoredXmlReader.Read(ICollection`1 key) at Microsoft.Rtc.Management.WritableConfig.AnchoredXmlSchemaCache.get_Item(ScopeClass scopeClass) at Microsoft.Rtc.Management.Xds.ManagementConnection.GetAnchoredXmlWrapperFromReader(SchemaId schemaId) at Microsoft.Rtc.Management.Xds.ManagementConnection.ReadTopologyXml(TypedXml& typedXml, AnchoredXml& anchoredXml) at Microsoft.Rtc.Management.Xds.ManagementConnection.ReadTopology(TypedXml& topologyXml, Topology& topology) at Microsoft.Rtc.Management.Xds.XdsCmdlet.<ReadTopology>b__5() at Microsoft.Rtc.Management.Internal.Utilities.DeImpersonator.<>c__DisplayClass1.<Run>b__0() at Microsoft.Rtc.Management.Internal.Utilities.DeImpersonator.Run[T](Boolean dropImpersonation, Func`1 func) at Microsoft.Rtc.Management.Xds.XdsCmdlet.ReadTopology() --- End of inner exception stack trace --- at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate) at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper() at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()
Another common error is the following:
Download Current Topology
Topology Builder could not copy the topology from the Central Management store. Cannot read topology. Verify that the topology data is accessible.
I’ve been called a few times over the past year for this error and realized that the more prominent explanations out there on the internet right now is that this can happen during an install of Lync Server 2013 where errors might be thrown and the solution is to reinstall. While this may be true because a failed install may leave an XDS database that’s incomplete, the calls I’ve received in the past are usually from administrators who have had Lync Server 2013 running in their environment but noticed this error even though the environment is working as expected. The cause for this error in my past experience with the indicated symptoms is that the administrator is using an account that does not have permissions to the XDS database (just as the error indicates).
I believe SQL Server 2000 was the last version of SQL that automatically assigned local administrators sysadmin rights in the database and while I know many administrators typically enter domain admins in as administrators during SQL Server 2005, 2008 and 2012 installs, larger organizations do not. This is why the companies I see this happen most are larger ones with dedicated SQL administrators that do not like regular Active Directory administrators to have full sysadmin rights to their precious SQL servers.
The database in question here is the XDS database stored on either a backend database server if you’re using the Enterprise Edition of Lync Server 2013 or the local SQL install if you are using the Standard Edition. Taking a peak into the XDS database’s Security node displays the following accounts that are assigned some permissions to the XDS database:
- localServer\RTC Local Administrators
- localServer\RTC Local Config Replicator
- localServer\RTC Local Read-only Administrator
Now I will admit that I don’t usually work with large clients that have individual teams for various Microsoft products but there are the odd ones that do so the Lync administrator may not have any permissions to the SQL database hosting the Lync databases. What I find interesting is that either of the following is happening for standard edition installs:
- The Lync installer for standard edition adds the account used to install Lync as an administrator as a sysadmin for the local SQL instance.
- SQL Server Express automatically adds the account installing it as a sysadmin for the SQL instance.
I haven’t actually really looked into this but I do believe it’s a result of #2. To cut a long story short, what basically needs to be done here is to either grant the account that is having problems downloading the topology sysadmin to the database or db_owner rights to the XDS database. Adding the account to any of the accounts listed above (i.e. domain\RTCUniversalServerAdmins) does not work and adding the account to the CSAdministrators group doesn’t either.