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.
- Stop the SQL Instance.
- 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
- Copy the files in the following folder if they exist:
C:\Program Files\Microsoft SQL Server\100\Shared\Resources\1033\
C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\Resources\1033
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