On this page
Description
This information is primarily for the Confluence or SQL for Confluence administrator.
Data source profiles allow the administrator to provide additional configuration for use by SQL macros. See Release notes 5.2 for details on the new capabilities this provides. Data source profiles can be stand-ins for data sources referenced by macros using the dataSource parameter. They are treat the same. This includes how you configure Macro Security for Confluence. Think of data source profiles as just additional data sources for use.
How to implement role based security for SQL queries provides an example use case.
Definition
Each data source profile is identified by a unique name. Name is case specific, just like application server defined data sources. The value field is a | (bar) separated list of parameter expressions of the form name=value. This is just like wiki markup macro parameters. Parameters are case insensitive.
Screen Shot
- Go to Manage Add-ons in Confluence administration
- Find the SQL for Confluence add-on in the list
- Click on the Configure button
Parameters
Copy and paste the configuration into your data source profile configurationQuick Configurations
- Change the name to something meaningful for your organization
- Modify the url to your database server
- Modify the database name (from test to the name of database you want to query)
- Modify the user and password to be match the user credentials defined for the the database server
To test: create a page and use Insert -> Markup to add the following wiki markup : {sql-query:dataSource=example} select 1 {sql-query}
dataSource not found
All 5 db parameters are required when defining db access directly. Otherwise you will likely get a dataSource not found message.
Using the lib location
Often, using the lib location (example: dbJar=lib/ojdbc6.jar) is best especially if you already have or later intend to define an application server based data source. The following is for a standalone installation.