Unable to connect to SQL Server 2014 developer version

Hi,

 

I have successfully installed my JIRA and SQL server 2014 on server. It started with embedded databased and worked well.

I want to change the DB to into SQL sever. Hence I changed the dbconf file as mentioned in the Atlassian documentation. But unable to connect and getting error. Please help.

My connection details are below.

<jira-database-config>
<name>defaultDS</name>
<delegator-name>default</delegator-name>
<database-type>mssql</database-type>
<schema-name>xxxxxxx</schema-name>
<jdbc-datasource>
<url>jdbc:jtds:sqlserver://xxxxxxx:1433/NewDay_JIRA</url>
<driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
<username>xxxxxxx</username>
<password>xxxxxxx</password>
<pool-min-size>20</pool-min-size>
<pool-max-size>20</pool-max-size>
<pool-max-wait>30000</pool-max-wait>
<min-evictable-idle-time-millis>4000</min-evictable-idle-time-millis>
<time-between-eviction-runs-millis>5000</time-between-eviction-runs-millis>
<pool-max-idle>20</pool-max-idle>
<pool-remove-abandoned>true</pool-remove-abandoned>
<pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>
</jdbc-datasource>
</jira-database-config>

But still I am unable to connect and getting error message like ....

Database: JIRA couldn't connect to your database

 

2 answers

0 votes

Hi Kumar,

I would follow the instructions in Switching Databases:

  1. Create an export of your data as an XML backup. See Backing up data for details.
  2. Create a new database on your new database server to house JIRA's data. See the appropriate database configuration guide in the Connecting JIRA to a database section for the database creation instructions.
  3. Shut down your JIRA server.
  4. Make a backup of your JIRA home directory and JIRA installation directory.
  5. Delete the dbconfig.xml file in your JIRA home directory.
  6. Restart JIRA and you should see the first step of the JIRA setup wizard for configuring your database connection.
  7. Configure JIRA's connection to your new database (created in step 2 above) and click the 'Next' button.
  8. On the 'Application Properties' setup page, click the 'import your existing data' link and restore your data from the XML backup created in step 1 above.

Cheers,

Branden

Thank you Branden for your reply. I finally figured out the reason. TCP/IP was disabled in my SQL server configuration server. After enabling it, JIRA is able to connect to the DB.

0 votes

What value are you using for the URL tag?   You don't need to disclose the exact value, I'm just interested to learn if you are using a hostname, IP address, or the value 'localhost'.   From what I can see of your dbconfig.xml that looks fine, but it could be that SQL isn't listening on that port/address you are using to try to connect to.

If this is a hostname, then it is possible that the server can't resolve it's own hostname.  That tends to happen when the server is configured to use a DNS server that doesn't know how to resolve that hostname to the expected IP address.


If JIRA and SQL are on the same machine, then I would recommend trying to use the localhost address.   This is the equivalent of the 127.0.0.1 or the ::1 address that you might see in some systems.


It might be you have to configure SQL to listen to port 1433 on a specific interface of that system.  Details on how to do this are in https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/configure-a-server-to-listen-on-a-specific-tcp-port   I believe the default is listening on localhost for 1433, but you might have to make sure the SQL server is listening the port/address that you are actually trying to connect to.

Thank you Heinzer for your reply. I finally figured out the reason. TCP/IP was disabled in my SQL server configuration server. After enabling it, JIRA is able to connect to the DB.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Mar 28, 2018 in Jira Software

Can a company’s culture make or break agile adoption?

Can a new-to-agile team survive and thrive in a non-agile culture? If so, what advice would you give to those trying to be agile in a non-agile culture? What's the key(s) to success? Share your thoug...

17,657 views 18 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you