Configuring an SQL Server database

Set up a SQL Server database to work with the IBM® Rational® Jazz™ Team Server.

This procedure assumes that the following prerequisites have been met:

Note: The default login name defined in JazzInstallDir/server/teamserver.properties file for a SQL Server database is jazzDBuser and the default password is jazzDBPswd. These values are used in the steps below for creating a database. You can substitute these values with the user name and password for your database.

Setting up a database

Note: This section describes how to set up the SQL Server database by using the command line tool sqlcmd, which is provided with the SQL Server installation. You can also use a visual tool, such as SQL Server Studio Management, which is also available for the Express™ version as SQL Server Studio Management Express. See the SQL Server documentation or an SQL Server database administrator (DBA) for more information.

To set up an SQL Server database by using the command tool sqlcmd:

  1. Create a Rational Jazz Team Server database. From the command line tool, type:
    CREATE DATABASE jazz 
    GO 
  2. Create a user and password and change the ownership of the Rational Jazz Team Server database. From the command line tool, type:
    CREATE LOGIN jazzDBuser
    WITH PASSWORD = 'jazzDBPswd';
    USE jazz;
    exec sp_changedbowner 'jazzDBuser'
    GO 
  3. Change the collation of the Rational Jazz Team Server database. From the command line tool, type:
    ALTER DATABASE jazz COLLATE SQL_Latin1_General_CP437_CS_AS 
    GO

Configuring the server

Note: By default, the teamserver.properties file in JazzInstallDir/server directory is not set up to connect to a SQL Server database. All default settings, along with SQL Server-specific settings, are contained in the teamserver.sqlserver.properties file in the same directory.

To configure the server:

  1. Make a backup copy of the JazzInstallDir/server/ teamserver.properties file before making the edits as described in the next step.
    Note: Backing up the original teamserver.properties file enables you to restore the file to the previous working version. By default, the DB Provider is derby.
  2. Edit the JazzInstallDir/server/ teamserver.properties file by adding # characters at the beginning of each line of the section shown below:
    #
    # DERBY Configuration
    #
    # JDBC DB location, specifying this property disables system-based selection of default location
    #com.ibm.team.repository.db.vendor=DERBY
    #com.ibm.team.repository.db.jdbc.location=repositoryDB
  3. Edit the following section in the teamserver.properties file in JazzInstallDir/server directory and change the information listed below to match your setup.
    com.ibm.team.repository.db.vendor = SQLSERVER
    com.ibm.team.repository.db.jdbc.location=//SQL SERVER MACHINE IP:SQL SERVER TCIP PORT;databaseName=JAZZ DATABASE NAME;user=JAZZ USERNAME;password={password}
    com.ibm.team.repository.db.jdbc.password=JAZZ LOGIN PASSWORD
  4. Create a directory called JazzInstallDir/server/server/sqlserver and copy thethe JDBC drivers JAR file sqljdbc.jar file into it. See http://msdn2.microsoft.com/en-us/data/aa937724.aspx for more information.
  5. Open the server.startup.dat in the JazzInstallDir/server, navigate to the line set SQLSERVER_JDBC=%START_DIR%\sqlserver and modify the section so that it looks as shown below:
    set JAVA_PTS=-Djava.awt.headless=true - 
    DSQLSERVER_JDBC="%SQLSERVER_JDBC%" -
    DORACLE_JDBC=%ORACLE_JDBC%" - DDB21_JDBC="%DB21_JDBC%" -
    DDB2Z_JDBC="%DB2Z_JDBC%" -
    Dorg.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin=true -
    Dcom.ibm.team.repository.provision.profile="%cd%"\provision_profiles -
    Dcom.ibm.team.repository.tempDir=%TEMP% -Dcom.ibm.rqm.create.samples=false -
    Xss512k -Xmx700M

You have completed setting up your database. Now, create the Rational Jazz Team Server database tables. For more information, see Creating Jazz Server database tables.

Troubleshooting

If the repotools command does not succeed, check the log file named repotools_createTables.log, located in the JazzInstallDir/server directory.

Also, verify the following:

The database code for Rational Jazz Team Server was designed to be generic and standard in order to run on multiple database platforms; however, differences between the enterprise database vendors exist in syntax, optimization strategies, and locking semantics. The server has been tested on SQL Server using a combination of automated tests and simulations of normal workloads and stress testing. The simulation of normal workloads showed acceptable performance. In some instances database deadlocks have been observed in automated concurrency tests; however, these have not been consistently reproduced on different server hardware.

The server is designed to service a large number of simultaneous requests. In exceptional cases, deadlocks can occur in the repository database, as similar or equal objects are updated concurrently in transactions associated with the requests. These are rare, but normal events. The system is designed to be defensive against this, and data integrity is maintained; there is no loss of data. Occasionally, deadlocks are logged by tasks, such as build engine execution. Generally, the condition is detected, and the task is re-tried. The deadlock can result in a failed build. In very rare cases, it can be a user action, such as working with work items or source code, that is aborted to resolve a deadlock. In that case, the user action fails and an error with details regarding a deadlock is displayed to the user. The user can then retry the action.

All deadlocks encountered are logged on the server to provide information about what happened when the deadlock occurred. The log entry has text similar to the following: com.ibm.team.repository.common.RetryableDatabaseException: Serialization failure.

If your system encounters deadlocks, see the error log, which is available at https://servername:9443/jazz/service/com.ibm.team.repository.common.internal.IFeedService?category=SystemLog.

If you encounter frequent deadlock exceptions, contact your product support, or check the forums on jazz.net for the latest information, updates, or mitigating techniques.


Feedback