I recently installed TeamCity with an external SQL Server database. I will go through the steps to install TeamCity and configure the database which was very straight forward. I mostly followed the directions found in the JetBrains documentation but added some steps where I was not familiar.
After downloading TeamCity for Windows, install it…
And complete the initialization process.
Shutdown the TeamCity server.
Set up SQL Server Database and User
Now, create a new SQL Server database with case-sensitive collation (as a short-cut choose a collation that ends with “_CS_AS”). I chose to have the TeamCity server open a connection with username and password instead of Integrated Security, so I created a new user with “dbo” rights for the TeamCity database. You can find instructions on how to use Integrated Security for SQL Server authentication here.
Install sqljdbc Driver and Set TeamCity Properties
Download the Native MS sqljdbc driver from here, unpack the driver and copy sqljdbc4.jar the the <TeamCity Data Directory>libjdbc directory. I used the default installation directory which made my TeamCity Data Directory C:ProgramDataJetBrainsTeamCity.
In the <TeamCity Data Directory>config folder, open database.mssql.properties.dist file in a text editor.