Microsoft SQL Server

Top  Previous  Next

This manual assumes you already have Microsoft SQL Server 2000 (v8.0), 2005, or 2008 installed and running.

Instructions for SQL Server 2008 and alternate JDBC drivers

No single Microsoft JDBC driver supports all the versions of SQL Server that we support.  We ship with a driver that is compatible with many configurations, but not SQL Server 2008.  The following drivers can be installed and used in place of the shipped driver:

This driver supports SQL Server 2000, 2005 and 2008 running Java 1.4 or later:

       Microsoft SQL Server JDBC Driver 1.2 Download

This driver supports SQL Server 2000, 2005 and 2008 running Java 5.0 or later:

       Microsoft SQL Server JDBC Driver 2.0 EULA and Download

To install one of these drivers, or other JDBC driver:

1.Download the preferred driver.
2.Stop the Code Collaborator server, if it is running.
3.Go to the following location:
[Code Collaborator Server installation directory]/tomcat/common/lib
4.Replace the sqljdbc.jar in that directory with one just downloaded.
5.Start the Code Collaborator server.

Setting up the database

Create a database for Code Collaborator. It is recommended that you also create a username/password pair just for Code Collaborator and give this account full access to the database and no access to other databases. You should use a SQL Server account instead of Windows-based authentication because the Code Collaborator service might not be running under a normal Windows-based login.

During the GUI installation screens for the Code Collaborator server, you will be prompted for the SQL Server host name, TCP/IP port, database name, user name, and password. The installer will report any connectivity errors. When you visit the web page for Code Collaborator, it will detect that you have a new database and will create all tables, indexes, and views for you automatically.

SQL Server Limitations

With SQL Server 2000, text fields can contain a maximum 8000 characters. This includes changelist descriptions, review overview text, and comment and defect text. With SQL Server 2005 and later there is no such restriction.

Troubleshooting

If you get the error "The TCP/IP connection to the host has failed. java.net.UnknownHostException", you probably need to enable TCP/IP for your database.  By default SQL Server has the TCP/IP protocol disabled.  Code Collaborator needs this option enabled in order to access your database.

Open the SQL Server Configuration Manager and navigate to "Network Configuration" -> "Protocols".  Make sure TCP/IP is enabled.

By default SQL Server is configured to use dynamic ports, which means that the port used is changed each time the service is restarted. To use static ports instead open properties for "TCP/IP" and change the "IPAll" settings. Set "TCP Dynamic Ports" to blank and "TCP Port" to the port number you want to use.