Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,551,881
Community Members
 
Community Events
184
Community Groups

Where is the username and password stored for SQL Server database access?

Edited

confluence.cfg.xml does not show username and password for SQL Server database login.

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 18, 2023

Welcome to the Atlassian Community!

In most cases, it has to contain the database connection details, for Confluence to work.  The exceptions are:

  • The Confluence has been configured to use a local embedded database (h2, not suitable for a production server).  You may find blank entries for username/password, or even missing lines in this case, depending on version.
  • You have chosen to use JNDI in Tomcat instead of JDBC.  You will find the database connection details in <confluence installation directory>/conf/server.xml   See https://confluence.atlassian.com/doc/configuring-a-datasource-connection-937166084.html

Confluence is working with a JDBC connection. Policies require the password to be changed every 60 days. Where is the password stored? If I change the password on the SQL Server user, I need to update it somewhere else so that the application can still log in to the database. The confluence.cfg.xml file does not show the current username and password that is in use, so I do not know where to update the password so the application works after changing the password.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 19, 2023

If you are using a JDBC connection, then the username, password, and connection string are in <confluence home>/confluence.cfg.xml 

If you haven't got them in there, then you are not using a JDBC connection.

Could you be looking in a sample or copy of the confluence.cfg.xml?

I went to the confluence home directory and the confluence.cfg.xml file has none of our data in it. I don't know where else it could be.

I've searched the entire server, and there is only 1 confluence.cfg.xml file. We are using a JDBC connection that connects to a SQL Server database. The username we setup is 'confluenceuser', but the line in the xml file has the username as 'sa'. 

in a related issue, we are also using jira, and I can't find the file where the jira username and password are stored either. There is not a dbconfig.xml file anywhere.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 19, 2023

So you do have a username set in the file, as I would expect from a JDBC connection.  Could you show us the rest of the file?  Please do obscure anything sensitive, we just need to see the raw XML and that any particular tag pair contains some data.

Jira won't work without a dbconfig.xml file in the home (data) directory, unless you've got a JNDI connection.l

Here are the contents of the file. This file is in the confluence home directory on the IIS server. I feel like this is not the correct file, but do not know where to look to find it. As stated before, this is the only confluence.cfg.xml file on the server. 

<confluence-configuration>
<setupStep>Complete</setupStep>
<setupType>Install</setupType>
<buildNumber>8803</buildNumber>
<properties>
<property name="access mode">READ_WRITE</property>
<property name="admin.ui.allow.daily.backup.custom.location">false</property>
<property name="admin.ui.allow.manual.backup.download">false</property>
<property name="admin.ui.allow.site.support.email">false</property>
<property name="atlassian.license.message">********</property>
<property name="atlassian.license.message">********</property>
<property name="attachments.dir">${confluenceHome}/attachments</property>
<property name="confluence.setup.server.id">********</property>
<property name="confluence.webapp.context.path">/confluence</property>
<property name="finalizedBuildNumber">8803</property>
<property name="hibernate.connection.autocommit">false</property>
<property name="hibernate.connection.driver_class">org.h2.Driver</property>
<property name="hibernate.connection.isolation">2</property>
<property name="hibernate.connection.password"></property>
<property name="hibernate.connection.provider_class">com.atlassian.confluence.impl.hibernate.DelegatingHikariConnectionProvider</property>
<property name="hibernate.connection.username">sa</property>
<property name="hibernate.database.lower_non_ascii_supported">true</property>
<property name="hibernate.dialect">com.atlassian.confluence.impl.hibernate.dialectH2V4200Dialect</property>
  <property name="hibernate.hikari.idleTimeout">30000</property>
<property name="hibernate.hikari.maximumPoolSize">60</property>
<property name="hibernate.hikari.minimumIdle">20</property>
<property name="hibernate.hikari.registerMbeans">true</property>
<property name="hibernate.setup">true</property>
<property name="jwt.private.key">********</property>
<property name="jwt.public.key">********</property>
<property name="lucene.index.dir">${localHome}/index</property>
<property name="spring.datasource.hikari.registerMbeans">true</property>
<property name="synchrony.encryption.disabled">true</property>
<property name="synchrony.proxy.enabled">true</property>
<property name="webwork.multipart.saveDir">${localHome}/temp</property>
</properties>
</confluence-configuration>


Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 20, 2023

Yep, that makes sense.

Your Confluence is not connected to an MS-SQL server, it is using the local embedded database.

The database driver is showing as "h2", with a username of "sa", which, by default, does not need a password.

name="hibernate.connection.driver_class">org.h2.Driver</property>
<property name="hibernate.connection.isolation">2</property>
<property name="hibernate.connection.password"></property>
<property name="hibernate.connection.provider_class">com.atlassian.confluence.impl.hibernate.DelegatingHikariConnectionProvider</property>
<property name="hibernate.connection.username">sa</property>
<property

The correct confluence.cfg.xml file has been located. 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 20, 2023

Ahh, good!  i was hoping that was the problem!

My usual trick is to forget that I, as a normal user, can't see everything another normal user (like the one running the Confluence service) can see.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events