Can't migrate EAP6 from internal DB to MS-SQL (Could not determine database version - possible incorrect database properties)

I've been using TC EAP6-Build 15311 for a few days now and want to migrate it from the internal database to MS-SQL 2005. I followed the instructions here (http://confluence.jetbrains.net/display/TCD6/Migrating+to+an+External+Database), I copied the jtds.jar file to the lib/jdbc folder, created an MS-SQL properties file and I ran the maintainDB migrate tool. Because my data folder isn't in the normal location, I set the TEAMCITY_DATA_PATH env variable to point to c:\TeamCity\.BuildServer

Here's the properties file:

driverName=net.sourceforge.jtds.jdbc.Driver
connectionUrl=jdbc:jtds:sqlserver://192.168.10.62:1433/
connectionProperties.user=TeamCity
connectionProperties.password=<removed>
maxConnections=50
poolPreparedStatements=true


C:\TeamCity\bin>maintainDB migrate -T database.mssql.properties

TeamCity maintenance tool. Copyright 2010 JetBrains s.r.o. All Rights Reserved.

And here's the output I got when I ran the tool:

Command line arguments: migrate -T database.mssql.properties
Using TeamCity data directory: c:\TeamCity\.BuildServer
Using internal database.
Using source database
        database type: HSQLDB
        database driver: org.hsqldb.jdbcDriver
        connection: jdbc:hsqldb:file:c:/TeamCity/.BuildServer/system/buildserver

        login as: <empty>
Cannot proceed with 'migrate' command: Could not determine database version - possible incorrect database properties.
Critical error has occurred during command execution.




Can anyone help with this?

Thanks,
Mark
5 comments

Hi Mark,

could you please look through the teamcity-server.log - is the c:\TeamCity\.BuildServer directory is one that been really used by TeamCity installation?
If yes, please try to start TeamCity - does it work now?

If not, it looks like data corruption in HSQL database.

If TeamCity does work now, please provide me with the following files:

    C:/TeamCity/.BuildServer/system/buildserver.script
    C:/TeamCity/.BuildServer/system/version.dat

Thanks,
Leonid

0

Hi Leonid,

I started TeamCity after I tried up migrate the data and it's working fine. The server config screen in TC shows that it's using c:\TeamCity\.BuildServer as the data directory, I've attached a screen-shot showing that and also the other two files you requested. I forgot to mention in the first post that I upgraded from version 5.1.3 to the EAP of v6 - I'm not sure if that's an issue?

Edit: The start of the teamcity-server log shows:

[2010-08-18 15:16:40,750]   INFO -   jetbrains.buildServer.SERVER - Starting TeamCity server
[2010-08-18 15:16:41,437]   INFO - dServer.serverSide.ServerPaths - TeamCity data directory: c:/teamcity/.BuildServer/
[2010-08-18 15:16:41,890]   INFO -   jetbrains.buildServer.SERVER - TeamCity configuration version is 394


Thanks,
Mark

Attachment(s):
version.dat.zip
buildserver.script.zip
shot.png
0

Hi Mark,

thank you for the info.

This case is a bug; I've posted an issue: http://youtrack.jetbrains.net/issue/TW-13106
Please watch/vote for it. I'm going to fix it ASAP.

Best regards,
Leonid

0

Hi Mark,

a fix for this bug will included into the neares EAP version.
If you prefer to get the fix now, you can download build 15336 where the fix is included:

    ftp://ftp.intellij.net/pub/.teamcity/TW-15336

Best regards!

0

Please sign in to leave a comment.