To set up a SQL Server database to use with Design
Management Server,
you can either use the command line or a visual tool such as SQL Server
Studio Management.
Before you begin
- Install SQL Server with case-sensitive database collation selected
as the default setting.
- Ensure that the server security is in the mode named SQL
Server and Windows Authentication Mode.
- Enable the TCP protocol for SQL Server:
- From the Start menu, run the SQL Server Configuration Manager.
- Expand .
- Right-click the TCP/IP protocol and then
click Enable.
- Restart the SQL Server service by double-clicking SQL
Server Services, right-clicking the running service, and
then clicking Restart.
- Install the Microsoft SQL
Server JDBC driver on the model server. This driver is available here: SQL Server JDBC driver download. The download
includes both sqljdbc.jar and sqljdbc4.jar. You must use sqljdbc4.jar.
- Log in as a user who is a member in the sysadmin fixed
server role or an owner of the database.
- Install a tool to work with the database. You can either use the sqlcmd command-line
tool, which is provided with the SQL server installation, or install
SQL Server Management Studio.
To enable the
sqlcmd tool:
- From the Start menu, run the SQL Server Configuration Manager.
- Expand .
- Double-click the Named Pipes protocol.
- Enable the named pipes protocol and specify the following name
in the Pipe Name field:
\\.\pipe\sql\query
- Click OK.
- Restart the SQL Server Service by double-clicking SQL
Server Services, right-clicking the running service, and
then clicking Restart.
- Ensure that SQL Server and SQL Server Browser are running on the
database server.
Procedure
The following instructions assume that you are using
the sqlcmd tool, but you can also use the SQL Server
Management Studio.
- On the database server, while logged in as a database administrator,
open a command prompt window and run the sqlcmd command
to connect to the database. For example, you can run
this command:
sqlcmd -S localhost\instanceName
Use
the name of the database instance for instanceName.
- While connected to the database, run the following commands
to create a database and user for the Jazz™ Team Server application:
CREATE DATABASE JTS
GO
CREATE LOGIN jtsDBuser
WITH PASSWORD = 'jtsDBpw';
USE JTS;
exec sp_changedbowner 'jtsDBuser'
GO
- Run the following command to change the collation setting
for the database:
ALTER DATABASE JTS COLLATE SQL_Latin1_General_CP437_CS_AS
GO
- Run the following command to change the row version system
for the database:
ALTER DATABASE JTS SET READ_COMMITTED_SNAPSHOT ON
GO
- Similarly, configure 3 additional databases for Design
Management Server (DM),
the data warehouse (DW) and Configuration Management Server (VVC)
substituting the <DB_name> for the names of
the databases (DM, DW, and VVC).
- Create the database and user:
CREATE DATABASE <DB_name>
GO
CREATE LOGIN <DB_name>DBuser
WITH PASSWORD = '<DB_name>DBpw';
USE <DB_name>;
exec sp_changedbowner '<DB_name>DBuser'
GO
- Change the collation setting:
ALTER DATABASE <DB_name> COLLATE SQL_Latin1_General_CP437_CS_AS
GO
- Change the row version system:
ALTER DATABASE <DB_name> SET READ_COMMITTED_SNAPSHOT ON
GO
- Close the database connection with the command exit.
- Create an environment variable named SQLSERVER_JDBC_DRIVER_FILEand
point to the sqljdbc4.jar JDBC driver. The location
of the driver varies depending on your installation.
Click .
- Click the Advanced tab; then
click Environmental Variables.
- In the System variables list,
click New.
- In the Variable name field, enter SQLSERVER_JDBC_DRIVER_FILE,
and in the Variable value field type C:\Path_to_JDBC_dirver\sqljdbc4.jar.
On Linux systems, add the following environment
variable declaration:SQLSERVER_JDBC_DRIVER_FILE =.:Path_to_JDBC_dirver/sqljdbc4.jar.
What to do next
If you use the Design
Management Server setup
wizard to configure the server, no further database customization
is necessary. This setup wizard configures the databases and creates
the necessary tables.
If you are not running the setup wizard,
you can customize the databases manually; for information, see Setting up an SQL Server database in the Rational® Team Concert installation
documentation.