How do I have a new Linux Jira installation point at an existing mssql database?

Manohar Venkataraman September 26, 2013

We have an existing Jira instance running on MSSQL. Because we need to provide Siteminder security we are installing Jira on linux/tomcat and want it to point back to the existing mssql database. When we use the info in the dbconfig we get the message: "The database specified is not empty. Please specify an empty database for your JIRA installation." How can we successfully point it at this database?

5 answers

1 accepted

0 votes
Answer accepted
Manohar Venkataraman October 7, 2013

I got our local DBA involved and we were able to resolve it. This is how we did it in the dbconfig.xml:
<jira-database-config>
<name>defaultDS</name>
<delegator-name>default</delegator-name>
<database-type>mssql</database-type>
<schema-name>dbo</schema-name>
<jdbc-datasource>
<url>jdbc:jtds:sqlserver://nyp-jiradb1-cj:1433/JIRA</url>
<driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
<username>jiraadm</username>
<password>password</password>
<pool-min-size>20</pool-min-size>
<pool-max-size>20</pool-max-size>
<pool-max-wait>30000</pool-max-wait>
<pool-max-idle>20</pool-max-idle>
<pool-remove-abandoned>true</pool-remove-abandoned>
<pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>
<validation-query>select 1</validation-query>
<min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis>
<time-between-eviction-runs-millis>300000</time-between-eviction-runs-millis>
<pool-test-while-idle>true</pool-test-while-idle>
</jdbc-datasource>
</jira-database-config>

1 vote
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 26, 2013

After installation you can stop the server, modify the dbconfig.xml to point to existing DB and then restart. That should pick it up. Installer will not allow connecting to an existing DB.

Make sure you have a copy of the DB just in case if anything goes wrong.

0 votes
shawn Thompson August 16, 2016

 

Hello -Jira-Quest.bmp

I have an existing MSSQL server with a database instance created for my new  JIRA install "MYDB;instance=local" .

However, when I tried to test the connection it fails "Could not connect to DB:Login failed for user ***** "  even though I was able to execute commands as that user on MSSQL? 

MSSQL version 2012

Linux Centos 7

 

Note: I notice that Manohar was able to get this working but only on his root MSSQL server not in a created instance linked to his server. for example <Server>\<Instance>

 

0 votes
Manohar Venkataraman October 1, 2013

Still working on this but its a combination of updating the dbconfig and following some of the existing documentation. Also, this error occurred on versions before 5.1.8 so shouldn't be an issue now:
https://confluence.atlassian.com/display/JIRA/Connecting+JIRA+to+MySQL

0 votes
Rakesh V September 26, 2013

Hello,

The solution provided by Jobin seems to be correct, however I would like to add my thoughts as well.

I got the similar error when I installed the application for the first time and I had pointed the schema to an already existing schema (which was non-empty).

I resolved the problem by creating a new EMPTY schema and provided the same in the DB configurations (The rest of the configurations like Database name, port, user credentials were not changed).

I hope my answer helps.

-Thanks,

Rakesh

Suggest an answer

Log in or Sign up to answer