How to setup TeamCity 3.1.2 (build 6881) to use SQL Server 2005?

How can I setup TeamCity 3.1.2 (build 6881) to use SQL Server 2005?

Has anyone encountered any issues with using SQL Server 2005 with TeamCity 3.1.2 ?

-Ahmed

3 comments

Probably this will help: http://www.jetbrains.net/confluence/display/TCD4/SettingupanExternalDatabase#SettingupanExternalDatabase-MicrosoftSQLServer2005

--
Pavel Sher

0

I just did it this morning. Below my response will be what Yegor Yarko sent me as help, but first just the few issues I had:

1) When I ran the migrateDB.bat, it runs a findjava.bat file. The path references in that were not quite right because it didn't find the java.exe the first time it ran. I executed the migrateDB from my TeamCityApp path, but it still didn't find it. I just modified the FindJava.bat file to point to where it was (]]>\jre\bin and then that part went fine.
2) I had problems setting the Source Database Properties in the migrateDb.properties file. It had nothing to do with JetBrains, but I just couldn't get it right. Basically, you have to set it to the directory of your data, so in my case it was "E:/Development/Tools/TeamCity/server/buildserver", but you have to make sure to use the / and I think it is case sensitive.
3) Also, every time you run it, it attempts to create the tables on your destination database. With my above problems, it the tables already existed (from my previous failed migration) and the table generator complained about that. The first two times, I went and dropped my database and then recreated an empty database, but that got frustrating. So, finally I found that if you add:

forceClean=true

...into the migrateDb.properties file in the Target Database Properties section, then it will wipe your database clean and start over.


After I worked through these minor issues, I had no problems and everything just worked. Here's what Yegor replied to my question:




"Here are the relevant documentation pages. They correspond to the version of TeamCity that is not released yet, but SQL Server-related parts can be used for 3.1 version of TeamCity too.

Setup External Database

Migration between databases:



If you use want to migrate your data, you can use the following settings in the dbMigration.properties file:
targetDriver=net.sourceforge.jtds.jdbc.Driver
targetURL=jdbc:jtds:sqlserver://:[:Port]/ targetUser= targetPassword=]]>

Do not forget to create a backup copy before migrating."

0

Please sign in to leave a comment.