Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

We recommend using MySQL. TeamCity is tested most extensively and as a result might be a bit more stable with MySQL (see also the recommended settings).

Anchor
generalSteps
generalSteps

...

  1. Ensure you have TeamCity Data Directory. If it is a fresh TeamCity installation, run TeamCity with the default settings to initialize the directory.
  2. Ensure you have a backup of existing data if you already have functional TeamCity installation.
  3. Setup external database as described below for each database type.
  4. Make sure TeamCity server is not running.
  5. Install Database driver.
  6. Configure connection to the database in <TeamCity Data Directory>\config\database.properties file.
  7. Start the server.

...

Supported versions
Recommended database server settings:

Installation:

  1. Download the MySQL JDBC driver from http://dev.mysql.com/downloads/connector/j/.
  2. Install MySQL connector driver jar (mysql-connector-java-*-bin.jar from the downloaded archive).
  3. Create an empty database for TeamCity in MySQL and grant permissions to modify this database to a user from which TeamCity will work with this database.
  4. In the <TeamCity data directory>/config folder rename database.mysql.properties file to database.properties and specify the required settings in this file:
    Code Block
    connectionUrl=jdbc:mysql://<host>/<database name>
    connectionProperties.user=<user>
    connectionProperties.password=<password>
    

...

  1. Create an Oracle user account for TeamCity (with CREATE SESSION, CREATE TABLE, EXECUTE ON SYS.DBMS_LOCK permissions).
    Wiki Markup
    {hidden-data
    }for the last one: login with user "Sys" and execute SQL: "grant execute on dbms_Lock to <teamcity-user>;"{hidden-data}
  2. Get the Oracle JDBC driver from your Oracle server installation or download it from Oracle web site.
    Supported driver versions are 10.2.0.1.0 and higher.
    It should be two files:
    • ojdbc14.jar
    • orai18n.jar (can be omitted if missing in the driver verison)
      Place them into <TeamCity data directory>/lib/jdbc directory.
  3. In the <TeamCity data directory>/config folder create file database.properties and specify the required settings in this file:
    Code Block
    connectionUrl=jdbc:oracle:thin:@<host>:1521:<servicename>
    connectionProperties.user=<user>
    connectionProperties.password=<password>
    
    Note

    Make sure TeamCity user have quota for accessing table space

...

On TeamCity server side

You can use either JTDS JDBC driver (open source) or MS native JDBC driver (free for downloading).

Anchor
jtds
jtds

...

  1. Ensure that Sybase server is set up to use case-insensitive table names.
    This can be done in Sybase server config utility:
    1. Click on the "Configure Adaptive Server" button and select the server from the list
    2. Click on the "Language" button
    3. Click the button under the "Sort Order" label, and select the case-insensitive option (for example, "Dictionary order, case insensitive, accent insensitive").
  2. Create a new empty database and apply the following options:
    Use the actual database name instead of DB_NAME.
    Code Block
    use master
    go
    create database DB_NAME on general = 4096
                        log on general = 1024 with override
    go
    exec master..sp_dboption DB_NAME, "allow nulls by default", true
    go
    exec master..sp_dboption DB_NAME, "select into", true
    go
    exec master..sp_dboption DB_NAME , "trunc log on chkpt" , true
    go
    exec master..sp_dboption DB_NAME, "ddl in tran", true
    go
    exec master..sp_dboption tempdb, "ddl in tran", true
    go
    checkpoint
    go
    commit
    go
    
  3. Ensure the user that will be used by TeamCity to access the database has necessary permissions.
    Use the actual database name instead of DB_NAME, user name instead of TC_USER and password instead of TC_USER_PASSWORD.
    Code Block
    use DB_NAME
    go
    exec sp_adduser 'TC_USER', 'TC_USER_PASSWORD', null
    go
    exec sp_modifylogin TC_USER, defdb, 'DB_NAME'
    go
    grant create default to TC_USER
    go
    grant create table to TC_USER
    go
    grant create view to TC_USER
    go
    grant create rule to TC_USER
    go
    grant create procedure to TC_USER
    go
    commit
    go
    
  4. Get the driver (file jconn3.jar that can be found in <Sybase home directory>/jConnect-6_0/classes) and place it to <TeamCity data directory>/lib/jdbc.
  5. In the <TeamCity data directory>/config folder create or modify the database.properties file and specify the following settings in this file, replacing DB_NAME, TC_USER and TC_USER_PASSWORD with the values used during database configuration:
    Code Block
    connectionUrl=jdbc:sybase:Tds:<HOST_NAME>:5000
    connectionProperties.user=<TC_USER>
    connectionProperties.password=<TC_USER_PASSWORD>
    



See also:

Panel
bgColor#FFFFFF
borderStyledashed

Installation and Upgrade: Migrating to an External Database