TFS: TF30040: The database is not correctly configured

After installing TFS on a Windows Server R2 Standar with a SQL server 2008 RD we were able to create collections during a few days. But suddenly, after a server restart we weren´t able to create them any more getting the error “TF30040: The database is not correctly configured”.

It took me a while to find out what the problem was and here is the solution i found.

Afthe reading the TFS logs , close to the “TF30040: The database is not correctly configured” error i saw a “tfs Failed to load Msxmlsql.dll ” error. Executing inside SQL this simple query game me the same info.

DECLARE @docHandle INT
DECLARE @error INT
EXEC sp_xml_preparedocument @docHandle OUTPUT, N''
SET @error = @@ERROR
IF @error = 0
BEGIN
  EXEC sp_xml_removedocument @docHandle
END

To fix the problem we need to find this Msxmlsql.DLL and his asociated Information file called “msxmlsql.rll”  on our original SQL server DVD and copy them to some folders.

Solution STEPS:

  1. Stop the SQL Instance.
  2. Locate the files on the DVD.

    msxmlsql.rll  –> \1033_ENU_LP\x64\Setup\sql_engine_core_shared_loc_msi\PFiles\SqlServr\100\Shared\Res\1033\msxmlsql.rll

    msxmlsql.dll –> \x64\Setup\sql_engine_core_shared_msi\PFiles\SqlServr\100\Shared\msxmlsql.dll

  3. Copy the files in the following folder if they exist:

msxmlsql.rll

C:\Program Files\Microsoft SQL Server\100\Shared\Resources\1033\
C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\Resources\1033

msxmlsql.dll
C:\Program Files\Microsoft SQL Server\100\Shared
C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn
C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQL\MSSQL\Binn

4 .- Star the SQL instance again.

5.-  Run the SQL command again and voila!!!! Everything working smooth!!!

I want to thanks to Martin CLAVREUIL for giving initial solution workaorund althought all this info was obtained from the following MSDN forums:

Hope it helps

Advertisements

One thought on “TFS: TF30040: The database is not correctly configured

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s