Configure data source profiles 10.x

On this page

Description

With release 5.2data source profiles allows administrators to configure data sources independent of application data sources. This can be helpful in some situations especially where it is important to bring a data source online without restarting Confluence. Later, the data source can be converted to an application server based data source for better performance and reduced server load. The data source profile needs pretty much all the same database configuration information that normally would be used in an application server data source. This will give some examples.

Steps

  1. Go to UPM and find SQL for Confluence.
  2. Press Configure button.
  3. Select the View and modify data source profiles tab.
  4. Click Add profile.
  5. Add an entry based on your specific configuration values and the examples give - column 3 specifically.

Use absolute paths

When you are just starting, use an absolute file path to configure your dbJar parameter. After you have that working, you can experiment with using a relative path instead if that is important for your environment. Check the server log for errors if there are problems locating your jar file.

Examples

Database InformationJDBC Driver

Profile Configuration

Application Server Resource Configuration

Type: PostgreSQL
Database name: test
Location: localhost
Port: 5432 (default)
 
Macro uses:
  dataSource=testDS
postgresql-42.2.2.jar

In directory: 
    <install-dir>/lib 
Add a profile named: testDS 
with profile value:
 
dbDriver=org.postgresql.Driver |
dbUrl=jdbc:postgresql://localhost:5432/test |
dbUser=confluence|dbPassword=confluence |
dbJar=lib/postgresql-42.2.2.jar
<Resource name="jdbc/testDS" 
  auth="Container" 
  type="javax.sql.DataSource"
  driverClassName="org.postgresql.Driver"
  url="jdbc:postgresql://localhost:5432/test"
  username="confluence"
  password="confluence"
  maxActive="10"
  maxIdle="10"
  validationQuery="Select 1"
/>
Type: My SQL
Database name: test
Location: localhost
Port: 1433 (default)
 
Macro uses:
  dataSource=testDS
mysql-connector-java-5.1.47.jar

In directory: 
    <install-dir>/lib 
Add a profile named: testDS 
with profile value:
 
dbDriver=com.mysql.jdbc.Driver |
dbUrl=jdbc:jtds:sqlserver://localhost:3306/test |
dbUser=confluence|dbPassword=confluence |
dbJar=lib/mysql-connector-java-5.1.47.jar
<Resource name="jdbc/testDS" 
  auth="Container" 
  type="javax.sql.DataSource"
  driverClassName="net.sourceforge.jtds.jdbc.Driver"
  url="jdbc:jtds:sqlserver://localhost:1433/test"
  username="confluence"
  password="confluence"
  maxActive="10"
  maxIdle="10"
  validationQuery="Select 1"
/>
Type: MS SQL Server
Database name: test
Location: localhost
Port: 2433
 
Macro uses:
  dataSource=testDS
mssql-jdbc-7.0.0.jre8.jar

In directory: 
    <install-dir>/lib 
Add a profile named: testDS 
with profile value:
dbDriver=com.microsoft.sqlserver.jdbc.SQLServerDriver |
dbUrl=jdbc:sqlserver://localhost:2433;database=test;integratedSecurity=false |
dbUser=confluence | dbPassword=confluence | 
dbJar=../lib/mssql-jdbc-7.0.0.jre8.jar

Similarly.


Type: Oracle
Database name: test
Location: localhost
Port: 1521 (default)
 
Macro uses:
  dataSource=testDS
ojdbc6-11.2.0.3.jar

In directory: 
    <install-dir>/lib 
Add a profile named: testDS 
with profile value:
 
dbDriver=oracle.jdbc.OracleDriver |
dbUrl=jdbc:oracle:thin:@206.189.142.13:1521/XE |
dbUser=confluence|dbPassword=confluence |
dbJar=.../oracle/ojdbc6/11.2.0.3.jar
<Resource name="jdbc/testDS" 
  auth="Container" 
  type="javax.sql.DataSource"
  driverClassName="oracle.jdbc.OracleDriver"
  url="jdbc:oracle:thin:@localhost:1521:test"
  username="confluence"
  password="confluence"
  maxActive="10"
  maxIdle="10"
  maxWait="10000"
  validationQuery="Select 1"
/>

MS SQL named instances

You may need to add ;instance=<instance_name> to the URL string.

Log a request with our support team.

Confluence®, Jira®, Atlassian Bamboo®, Bitbucket®, Fisheye®, and Atlassian Crucible® are registered trademarks of Atlassian®
Copyright © 2005 - 2024 Appfire | All rights reserved. Appfire™, the 'Apps for makers™' slogan and Bob Swift Atlassian Apps™ are all trademarks of Appfire Technologies, LLC.