Setting up a SQL Server database

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

This procedure assumes that the following prerequisites have been met:

Remember: 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

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 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 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 Jazz Team Server database. From the command line tool, type:
    ALTER DATABASE jazz COLLATE SQL_Latin1_General_CP437_CS_AS 
    GO

Configuring the server

Remember: 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. Rename the following files:
    • Rename the JazzInstallDir/server/conf/jazz/teamserver.properties file to teamserver.OtherDBProvider.properties
    • Rename the teamserver.sqlserver.properties file to teamserver.properties
    Tip: Renaming 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 server configuration file if you used a different user name, password, or db name, installed SQL server on a different machine than Jazz Team Server, or are using a port other than the default. Open the file teamserver.properties in JazzInstallDir/server/conf/jazz 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
    Important: Do not change the password={password} text in the property com.ibm.team.repository.db.jdbc.location. The user password must be specified in the property com.ibm.team.repository.db.jdbc.password.
To specify the jar file location for JDBC:
  1. In the same directory as the server scripts (JazzInstallDir/server), create a directory named sqlserver.
  2. Locate the SQL Server JDBC driver JAR file, named sqljdbc.jar. The location can vary depending on where the drivers were installed, as noted in the prerequisites section. Copy the file into the newly created sqlserver directory.
  3. Specify the JDBC JAR file location for JDBC by completing the following task:
    • Set up the environment variable SQLSERVER_ABSPATH to point to the directory that contains the JAR file. If the path contains space characters, you must include them with quotations.
      Tip: If you use WebSphere® Application Server, configure a property named SQLSERVER_JDBC; then set it to the absolute file path (not URL) to the SQL Server JDBC drivers directory. For more information, see the WebSphere Application Server setup instructions. Note the file path for later use in these instructions.

What to do next

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

Alternatively, return to the Installation roadmaps to review the next steps in the installation.

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:


Feedback