Crucible 2.8 : Migrating to SQL Server

To migrate FishEye/Crucible to an SQL Server database, install SQL Server and follow the steps below.

Before You Begin

  • Check that you are using version of SQL Server that is supported for use with FishEye. See Supported platforms.

    An existing Java bug prevents connection with Java 1.6.0_29 and above (including Java 1.7.0). Read more about the issue and possible workarounds here.

Step 1. Install and Create an SQL Server Database

See the SQL Server Online resources (MSDN) for instructions on how to install and create an SQL Server database.

Please note the following FishEye/Crucible-specific information when installing and creating an SQL Server database:

  • The JDBC jtds drivers for SQLServer are bundled with Crucible. We do not support using the Microsoft distributed jdbc driver.
  • Your database server must be configured to use the Latin1_General_CS_AS collation set.

Step 2. Configure FishEye/Crucible to Use SQL Server and Migrate Data

In order to migrate to a different database backend, you must create a backup of SQL data, configure the database and finally import the data via a backup restoration process. This can be done from either the Crucible administration console, which streamlines the process, or via the command line tool which Crucible provides. These two methods are described below. The following resources may be of interest:

[ Configuring and Migrating via FishEye/Crucible's Administration Console ] [ Configuring and Migrating via the Command Line ]

Configuring and Migrating via FishEye/Crucible's Administration Console

Before you begin:

  • Note, during the migration process (which will take several minutes, depending on the size of your database and network throughput), the FishEye/Crucible instance will be inaccessible to users and external API clients. Users will see a maintenance screen that informs them of the process.
  • If you are attempting a migration after a previous migration has failed, you must drop all tables, indexes and constraints before attempting a new migration. This is because the destination database may contain data from the previous migration attempt.
  • Verify that you have the jtds JDBC driver .jar file in the classpath (by placing the .jar file in FISHEYE_INST/lib).
  • Ensure that the database user can log in to the database from the machine that FishEye/Crucible is running on and that all the required privileges are present.

To configure FishEye/Crucible to use SQL Server and migrate data using the Administration Console:

  1. Navigate to the 'Database' page in FishEye/Crucible's Administration console.
  2. Configure FishEye/Crucible to use SQL Server, as follows:
    • Select 'SQLServer' from the 'Type' dropdown.
    • Complete the appropriate fields, replacing the 'URL' (host, port and database name), 'User Name' and 'Password' as required.
      NOTE:  The default SQL server instance listens on port 1433.  If your instance is not the default, use the port number that is associated with your particular instance.
      e.g. URL:  jdbc:jtds:sqlserver://localhost:1433;databaseName=your database name here;
  3. Click 'Test Connection' to verify that FishEye/Crucible can log in to the database (see 'Testing the Connection' screenshot below).
  4. Click 'Save & Migrate Data' to start the migration process (see 'Migrating the Database' screenshot below). If the migration fails, FishEye/Crucible will not switch to the new database and will report the problems encountered.

Screenshots above: Configuring FishEye/Crucible to use SQL Server and migrating data (click to view full-size images)

Configuring and Migrating via the Command Line

To configure FishEye/Crucible to use SQL Server and migrate data using the Command Line:

  1. Create a backup of the sql data from the FishEye/Crucible instance. Information on how to create a backup can be found at Backing Up and Restoring FishEye Data \ Backing Up and Restoring Crucible Data
  2. Run the following command from the bin directory in FISHEYE_INST:

    $ ./fisheyectl.sh restore --sql \
            --file /path/to/backup.zip \
            --dbtype sqlserver2008 \
            --jdbcurl jdbc:jtds:sqlserver://hostname:port;databaseName=dbName; \
            --username crucible \
            --password password
    
  3. When the import is complete, FishEye/Crucible can be started and will use SQLServer.
[ Configuring and Migrating via FishEye/Crucible's Administration Console ] [ Configuring and Migrating via the Command Line ]