Error when installing Lync Archive or Monitoring databases

I hit an odd problem at a customer last week when trying to install the Lync Server 2013 Archiving and Monitoring databases on their existing SQL server. They had (sensibly) set up separate drives for SQL data and logs and wanted the Lync databases put on the correct drives. They usually put them on the root of the drive, no base folder.

I defined the database in Topology Builder, Publish Topology and got the Create Databases dialog. I manually specified the file locations:

sqlissue1

Yet the process fails with the little red cross – so what’s going on?

sqlissue2 sqlissue3

InstallDatabaseInternalFailure: An internal error has occurred while trying to create or update the database.

Error: Default path ‘H:’ obtained from Sql Server does not have a drive letter. Please check your SQL Server installations and try again.

The SQL Server event viewer shows 18456 events, saying that login failed – “Token-based server access validation failed with an infrastucture error”.

sqlissue4

So what is going on here? Some things I tried or verified:

  • Account permissions (sysadmin on instance, domain admin)
  • UAC disabled
  • Firewall disabled
  • Plenty of free space on the drives
  • Creating a database manually from the SQL server
  • Lync server could get to the instance OK via Management Studio and create a database
  • Tried creating folders on the SQL server drives and installing DBs to there
  • Using Install-CSDatabase cmdlet via the shell instead of Topology Builder

The culprit: the default paths for the instance were set to the root of the volume. In this state, it doesn’t matter what path you specify to install the databases to, it will always fail.

Workaround: change the default paths for the instance (even if only temporarily).

In SQL Server Management Studio, right-click on the instance, and select Properties.

sqlissue7

Under Database Settings, Default Database Location, change both paths to something else (it has to be valid, but can be anything as long as it’s not at the root of the volume). Click OK to save changes.

sqlissue6

The problem seems to be that when you specify the root of a volume, SQL Server does not keep the trailing backslash (eg. H:\ is stored as H:). The Install-CSDatabase cmdlet appears to retrieve the default path for the instance and SQL considers it invalid, even if you’ve told it to install to a different path.

Trying it now and it works fine, even with the same settings as before (installing to the root of the drives):

sqlissue8

Probably not a common issue but one to consider if you have problems installing the Monitoring or Archiving databases for Lync Server.

The customer (and my lab for screenshots) are on SQL Server 2008 R2 RTM. I have also tested with SP2 and the issue is the same. I’ll try out on SQL Server 2012 at some point to see if that does the same.