Friday, July 31, 2009

Configuring TeamCity with SQL Server 2008 Express

I tried to configure TeamCity with SQL Server 2005 (both Express & none Express versions), but I haven't ever try with SQL Server 2008 Express. So when I install Windows 7 RTM, I think it's the time to update to SQL Server 2008 Express. Based on David's post, I update the configuration process as I did.

  • Install SQL Server Express 2008
  • Configure SQL Server Express 2008 to use a static port (default port for SQL Server is 1433) 'cause it uses dynamic port by default.
  • Create an empty database for TeamCity, example "TeamCity", with _CI_AI collation as mentioned here
  • Install TeamCity (you can grap the latest EAP of TeamCity here)
  • Download Microsoft's JDBC driver from here, extract it then copy sqljdbc.jar, but not sqljdbc4.jar, to [TeamCity installation folder]\webapps\ROOT\WEB-INF\lib (I'm not sure why David mentioned that we need to copy auth/x64/sqljdbc_auth.dll to that folder, but even I didn't copy it, seems TeamCity still works well on Windows 7 RTM x64)
  • Create/replace database.properties in [TeamCity Build Server folder]\config with this content
        driverName=com.microsoft.sqlserver.jdbc.SQLServerDriver
    connectionUrl=jdbc:sqlserver://localhost:1433;database=TeamCity;user=[your_user_name];password=[your_password];

    maxConnections=50
    poolPreparedStatements=false

    connectingTimeout=10000
    connectingAttemptsInterval=1000
    validationQuery=select 1
    I don't know why connectionProperties.user and connectionProperties.password don't work and I need to add the user name and password to connection string
  • Start TeamCity Web Server service, TeamCity should use SQL Server 2008 Express as back-end data storage from now on

1 comment:

Anonymous said...

Thank you, this worked for me!