Driver for SQL Server cannot be found by migration command

I run the following command, and get the output below:

PS C:\TeamCity\bin> .\maintainDB.cmd migrate -A c:\users\jkodroff\.buildserver -T C:\Users\jkodroff\.BuildServer\config\database.properties
Java executable is found: 'C:\Program Files\Java\jdk1.6.0_35\bin\java.exe'.
Using logs directory C:\TeamCity\logs
TeamCity maintenance tool. Copyright 2013 JetBrains s.r.o. All Rights Reserved.

Command line arguments: migrate -A c:\users\jkodroff\.buildserver -T C:\Users\jkodroff\.BuildServer\config\database.properties
Using TeamCity data directory: C:\Users\jkodroff\.BuildServer
Using database settings from the TeamCity data directory for source database: C:\Users\jkodroff\.BuildServer\config\database.properties
Using source database
        database type: MSSQL
        connection string: jdbc:jtds:sqlserver://localhost:1433/teamcity
Cannot proceed with 'migrate' command: A driver for the source database not found. Please ensure you have driver jars in C:\Users\jkodroff\.BuildServer\lib\jdbc.
Critical error has occurred during command execution.

Looking in the directory indicated, I see both files I downloaded per the instructions:
sqljdbc.jar
sqljdbc4.jar

Any idea what may be wrong?  It sure would be nifty if TeamCity instead used something like MongoDB, which doesn't require such a big installation footprint....

1 comment
Comment actions Permalink

jkodroff@gmail.com wrote:

Using source database

        database type: MSSQL
        connection string: jdbc:jtds:sqlserver://localhost:1433/teamcity
Cannot proceed with 'migrate' command: A driver for the source database not found. Please ensure you have driver jars in C:\Users\jkodroff\.BuildServer\lib\jdbc.
Critical error has occurred during command execution.

Looking in the directory indicated, I see both files I downloaded per the instructions:
sqljdbc.jar
sqljdbc4.jar


The connection URL is looking for the jTDS driver but you've got the MS driver in the lib/jdbc directory. Either correct the URL to use the MS driver or add the jTDS driver to the lib/jdbc directory. If you use the MS driver you should remove the sqljdbc.jar this jar is for Java 5 an earlier and the sqljdbc4.jar is for running on Java 6.

Rod

0

Please sign in to leave a comment.