How to Configur NFeed to access SQL Server data

Trying to configure NFeed to access SQL Server data.. Instruction mention regarding JNDI resources in JIRA's context file and also database drivers. Are there more concise instrutions anywhere specifically for SQL Server?

3 answers

Disclaimer: I don't work for Valiantsys, and I couldn't find documentation for this either, but they state here that it's just a JNDI datasource.

Using some historical JIRA docs (we do everything with the cool spiffy configurator we supply now), you'd add this to your server.xml or jira.xml (depending how you deployed jira)

<Engine name="Catalina" defaultHost="localhost">
      <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
 
        <Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false">
          <Resource name="jdbc/myDS" auth="Container" type="javax.sql.DataSource"
            username="[enter db username]"
            password="[enter db password]"
            driverClassName="net.sourceforge.jtds.jdbc.Driver"
            url="jdbc:jtds:sqlserver://yourhost:1433/yourdb"
            maxActive="20"

            />

Of note is the Resource name part. You'd need to add a new resource for each datasource you want.

Hi Tim,

Thanks for your response. What configurator is that? I would love to see how it works.

It's nothing too crazy. Take a look in the bin folder: config.[bat|sh] (depending on windows/linux). You type in some db config, and it autopopulates in the conf/server.xml. This only works for the JIRAdb datasource config: it won't help you do the configuration of more datasources.

Hi Tim,

I have stand alone Jira deployed on SQL Server with JIRA Database on the same server. So which file should I be using? Also, I have gone into the server.xml file and see the ..

<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
<Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false">
<Resource name="jdbc/myDS" auth="Container" type="javax.sql.DataSource"
username="[enter db username]"
password="[enter db password]"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://yourhost:1433/yourdb"
maxActive="20"
/>

but where do I add the second source? I need to add a second datasource to another SQL server database.

Your help with this is much appreciated.

You would use the server.xml file, and declare a second datasource right under the one that exists:

&lt;Engine name="Catalina" defaultHost="localhost"&gt;
&lt;Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"&gt;
&lt;Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false"&gt;
&lt;Resource name="jdbc/myDS" auth="Container" type="javax.sql.DataSource"
username="[enter db username]"
password="[enter db password]"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://yourhost:1433/yourdb"
maxActive="20"
/&gt;
&lt;!--Second Datasource begins here --&gt;
&lt;Resource name="jdbc/myOtherOtherDatasource" auth="Container" type="javax.sql.DataSource"
username="[enter db username]"
password="[enter db password]"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://yourhost:1433/yourOtherOtherDatasource"
maxActive="20"
/&gt;

<!-- End Second Data Source -->

<!-- Begin possible 3rd data source ... etc -->

I only tried connecting to jiras own DB. Nothing has to be configured. It just works. Later on i'm going to try an external DB then i'll post my result for you here.... If nobody else does before

For jira's own database, the plugin autodetects. If you need another db, you'll have to set up a JNDI datasource.

Thank you Tim for the support.

I will watch more closely the answers forum now, to answer the question on nFeed.

Regards

Cyrille

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Featured Groups

Tuesday tips & tricks: What is the Atlassian Community?

It's officially Tuesday, which means it's officially time for another tip to help you better navigate this space we call the Atlassian Community. 😄 I got a great question from community member, Sa...

143 views 6 8
View post

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