Migrating to SQL Server

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

To migrate Fisheye/Crucible to an SQL Server database, install SQL Server and follow the steps below. When they are used together, Fisheye and Crucible share the same external database.

Before you begin

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

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:

  • Starting from Fisheye 4.7.1, we introduce support for the Microsoft distributed jdbc driver.
  • The Fisheye database user must have permission to connect to the database and to create and populate tables.
  • The database user should not be the database owner, but should be in the db_owner role. (See SQL Server Startup Errors for details.)
  • Your database must be configured to use one of the following as collation set:
    • Latin1_General_CS_AS
    • SQL_Latin1_General_CP1_CS_AS
  • Your database should be configured to use snapshot mode for the transaction isolation level. To enable snapshot mode, run:

    ALTER DATABASE crucible
       SET READ_COMMITTED_SNAPSHOT ON;

    See this and this Microsoft MSDN articles for more information.
    Note that it is preferable to run the above command after stopping Fisheye/Crucible (and with no other applications connected to the SQL Server database), especially if you find that the alter statement does not complete quickly.

On this page:

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

Option 1: Migrate using the UI (Fisheye/Crucible Administration)

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.
  • 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.
  • If your database is hosted on a SQL Server cluster, you must include the instance name in the JDBC URL wit the following syntax: 

    For Fisheye 4.7.0 or earlier:

    jdbc:jtds:sqlserver://hostname:port;databaseName=dbName;instance=instance_name;

    For Fisheye 4.7.1 and later:

    jdbc:sqlserver://hostname:port;databaseName=dbName;instance=instance_name;

To configure Fisheye/Crucible to use SQL Server and migrate data using the administration console:

  1. Click  > Administration > Database.
  2. Configure Fisheye/Crucible to use SQL Server, as follows:
    • Select appropriate SQLServer version from the Type dropdown, matching the version of database you are running.
    • Complete the appropriate fields, replacing the URL (host, port and database name), User Name and Password as required, using the same connection details as used when creating the SQL Server database in Step 1 above.
      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:sqlserver://localhost:1433;databaseName=dbName;
  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: Configuring Fisheye/Crucible to use SQL Server and migrating data (click to view full-size images)

Option 2: Migrate using 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 <FishEye installation directory>/bin directory: 
    For Fisheye 4.7.0 or earlier:

    $ ./fisheyectl.sh restore --sql \
            --file /path/to/backup.zip \
            --dbtype sqlserver2012 \
            --jdbcurl "jdbc:jtds:sqlserver://hostname:port;databaseName=dbName;" \
            --username crucible \
            --password password

    For Fisheye 4.7.1 and later:

    $ ./fisheyectl.sh restore --sql \
            --file /path/to/backup.zip \
            --dbtype sqlserver2012 \
            --jdbcurl "jdbc:sqlserver://hostname:port;databaseName=dbName;" \
            --username crucible \
            --password password
  3. When the import is complete, Fisheye/Crucible can be started and will use SQLServer.
Last modified on Jan 19, 2017

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.