Changing Server ID for Test Installations

Still need help?

The Atlassian Community is here for you.

Ask the community

This page tells you how to obtain a new server ID to use in a test installation of a JIRA application. Please note this is not essential but is recommended. Your production installation will not be directly affected if your test server has the same server ID as production. However, application links may be affected if you do not change the server ID. The separate server ID also helps the support team to distinguish between your servers.

Server IDs are used in Application Links - this is tracked under APL-629 - Getting issue details... STATUS .

  • Changing a Server ID will break existing Application Links
  • Two applications with the same Server ID may encounter problems when linked together or when linked through another application

If you would like to change the server ID on your test installation, you will need to acquire a new server ID for your test environment.

1) Acquire a new Server ID:

  1. Install a new, temporary instance of the JIRA application. See Installing JIRA applications. Make sure the installation points to a new, empty home directory and a new, empty database
  2. Start the new, temporary instance. A new server ID will be created in the database.

  3. Run the following query on your new database to retrieve the new ID:

    select * from propertystring where id in (select id from propertyentry where PROPERTY_KEY='jira.sid.key');

2) Replace the Server ID on your instance:

  1. Use this new server ID in your test instance. You need to change <ID> in the above query with the new server id. The format is 4 sets of 4 capitalized alpha numeric characters separated by hyphens. Example: BP8Q-WXN6-SKX3-NB5M

    UPDATE propertystring SET propertyvalue = '<ID>' where id = (select id from propertystring where id in (select id from propertyentry where PROPERTY_KEY='jira.sid.key'));

    (Please note that this SQL UPDATE command above will not work for MySQL environments.  It tends to generate an error such as (ERROR 1093 (HY000): You can't specify target table 'propertystring' for update in FROM clause)  As such there is an alternative query you can run to perform the same change:)

    UPDATE propertystring SET propertyvalue = '<ID>' where id = (select id from propertyentry where PROPERTY_KEY='jira.sid.key');
  2. Restart your test server.

 

Last modified on Jul 31, 2018

Was this helpful?

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