Problem Migrating to Oracle DB using MaintainDB Utility

Trying to migrate from internal database to an Oracle database. MaintainDB seems to "hang" after attempt to connect to Oracle. I had an account setup name 'teamcity' with permissions as specified on http://www.jetbrains.net/confluence/display/TCD5/Setting+up+an+External+Database

Here is my command line:

C:\TeamCity\bin>maintainDB migrate -T D:\TeamCity\.BuildServer\config\database.oracle.properties -A D:\TeamCity\.BuildServer

and the output:

TeamCity maintenance tool. (C) 2000-2009 JetBrains s.r.o.

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

        login as: <empty>
Connected to the Source DB successfully.
Using explicitly specified target database settings: D:\TeamCity\.BuildServer\config\database.oracle.properties
Using target database
        database type: ORACLE
        database driver: oracle.jdbc.driver.OracleDriver
        connection: jdbc:oracle:thin:@dvlp2
        login as: teamcity



Contents of database properties file:


driverName=oracle.jdbc.driver.OracleDriver
connectionUrl=jdbc:oracle:thin:@dvlp2
connectionProperties.user=teamcity
connectionProperties.password=teamcity

maxConnections=50

connectionProperties.SetBigStringTryClob=true

validationQuery=select 1 from dual

0
10 comments

Steven,

Do you still have the problem?
Could you please take a thread dump at the moment when the tool is hanging.

0

Thank you for the feedback!

According to the dump, there is an error connecting to the database, but maintainDB do not reporting the error. We've created an issue for the problem, please watch it at http://youtrack.jetbrains.net/issue/TW-10860.

Could you please check that database properties are correct and you able to connect to the database with this properties under the same account as TeamCity uses?

0

I am able to connect to Oracle via the Windows client using the same credentials that are supplied in the database.properties file. The only thing that I can think of at the moment is that perhaps there is an error with the connectionUrl property or a problem with the Oracle client jars TC is using.

0

Steven, do you have a TeamCity server running when you start migration? If so, try again with stopped TeamCity server.

0

TeamCity server was in fact stopped when I attempted migration.

0

Please ignore my last comment, it was not related to this issue.


0

Hello Steven,

> connectionUrl=jdbc:oracle:thin:@dvlp2

The "dvlp2" is an alias that is specified in the "tnsnames.ora" file, isn't it?
Unfortunately, the thin driver doesn't refer to the tnsnames file. Could you please specify the connection URL in the following form:

connectionUrl=jdbc:oracle:thin:@<hostname>:<port>:<instancename>

The port is usually 1521.

Best regards!

P.S. Please let me know did it help. Thanks!

Leonid

0

P.S. If you prefer to use oracle connection with tnsnames aliases,
write me the version of your oracle software (and edition – XE or not) and I'll try to help you how to manage it.

Best regards,
Leonid

0

You were exactly right. I was specifying the TNS identifier. Once I changed that to the real hostname it worked perfectly.

Thanks!

0

Please sign in to leave a comment.