Jira and Confluence on same SQL - NO COUNT option
Asked by marcingminski:

I have been running Confluence on Windows 2012 server connecting to a stand alone SQL Server (on another Windows Server) for some time with no issues.

Recently decided to install Jira Software on the same Windows host as Confluence connecting to the same SQL Server that also hosts Confluence database. I have followed the Jira deployment on SQL server guide, created new empty database called jira, set the appropriate collation etc as in:
> <https://confluence.atlassian.com/adminjiraserver/connecting-jira-applications-to-sql-server-2012-938846858.html>

The guide also says that the server-wide global SET NOCOUNT option must be se enabled. Since this is a server-wide setting it affects all connections and databases on that instance.

Setting NOCOUNT broke Confluence. It started throwing errors upon staring up, uploading documents, it would not create new page - it would just hang forever, it was not possible to go to configuration as it would throw an error upon elevating priviledges.

All errors were similar and todo with "null" values:

```
null id in com.atlassian.confluence.impl.journal.JournalEntry entry (don't flush the Session afterQuery an exception occurs
```

Upon turning back off the SQL wide setting NOCOUNT Confluence started working again but - as expected - Jira broke.

I have seen many posts suggesting it is possible to host both on the same SQL server. How?

Thanks


Answers:
author: Shannon S
body: Hi Marcin,

I'm reviewing the document, but I'm not finding where it says it needs to be enabled, but that it does need to be **DISABLED**.
> Turn off the SET NOCOUNT option. To turn off SET NOCOUNT:

*
  > Open **SQL Server Management Studio** and navigate to **Tools \> Options \> Query Execution \> SQL Server \> Advanced** . The following screenshot displays the configuration panel for this setting in MSSQL Server 2012. Ensure that the **SET NOCOUNT** option is **not selected.**
*
  > **You will also need to access the Server \> Properties \> Connections \> Default Connections properties box and clear the no count option.**

Can you please confirm where you're seeing on here that it needs to be enabled?

Regards,  
Shannon

comments: author: marcingminski
body: Very good question Shannon. I am not used to GUI so perhaps misunderstood what it asked for.

To me Disabled meant no ROWCOUNT returned back to the client i.e. SET NOCOUNT ON; but now I gather I misunderstood and it's the opposite.

The Confluence SQL guide does not explicitly say how to set NOCOUNT and by default in SQL it is set to OFF. Jira guide however explicilty says to set it to OFF, which may have confused me.

Either way, I could get either Jira or Confluence working but not both. However let me re-investigate, perhaps the cause was different.

Thank you for clarifying


author: Shannon S
body: Marcin,

You're welcome! If you get stuck on that you could raise the ticket in the Jira collection as it is likely not the NOCOUNT issue that is causing the problem.

Regards,

Shannon


author: marcingminski
body: Result! Reverted to snapshot before Jira install and started again from scratch but this time leaving NOCOUNT untouched and everything worked right away.

Thank you for helping me understand the guide! I feel like an idiot.

thanks


author: Shannon S
body: Glad you were able to get that reverted and get Jira up and running! :) Don't worry about that, I can see where the documentation might have been confusing.

Regards,

Shannon


Tags: jira

sql

windows