Вопрос

I'm trying to move my TeamCity instance to SQL Server. I followed the instructions in the docs for Setting up an External Database.

Now I'm going through Migrating to an External Database and running the maintainDb command:

.\maintainDB.cmd migrate -A c:\users\jkodroff\.buildserver -T C:\Users\jkodroff\.BuildServer\config\database.properties

And I get this output:

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.

I've verified that both sqljdbc.jar and sqljdbc4.jar are in the directory indicated, so what gives?

Нет правильного решения

Другие советы

The fact that you have sqljdbc.jar and sqljdbc4.jar indicates that you are using the Microsoft SQL Server JDBC Driver, but the connection string is for the jTDS driver. Make sure you use the correct connection string for the Microsoft SQL Server JDBC or that you use the jTDS JDBC driver instead.

Second: you should use either sqljdbc.jar (which is for Java 5) or sqljdbc4.jar (which is for Java 6 and later), not both; loading both might lead to unexpected behavior due to classloading order etc!

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top