Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

...

Overview

Info

At least one data source or data source profile must be configured before you can use

...

the SQL Macro

...

, SQL-query Macro, or, SQL-file.

This page describes two methods to configure Data Sources data sources for the macros provided by SQL for Confluence. SQL Macros macros use Data Sources data sources to access databases. A Data Source A data source defines the access parameters including credentials. The same database access information is required for each method. Similarly, the database must allow access using the information provided no matter which method is used.

MethodPrimary BenefitKey AttributesDocumentationExpress EditionPro Edition
Data Source Profilessource profilesConvenience
  • SQL for Confluence specific configuration
  • Convenience 
    • Configuration change in affect immediately
    • File system access not needed
  • Can reference application server defined Data Sourcesdata sources
  • Recommended for evaluation, testing, short term scenarios
  • Medium or heavier use scenarios should also employ Cache for Confluence
Configure Data Source Profilesdata source profiles(tick)(tick)
Application Serverserver-based Data Sourcedata sourcePerformance
  • Application server based configuration
  • Best performance via connection pooling/reuse
  • Requires Confluence restart after configuration change
  • Recommended for long term/heavy use scenarios
Configure Application Serverapplication server-based Data Sources - 9.xdata sources(error)(tick)


Tip

You can configure data sources using either of the methods or both - for instance use a data source profile while testing or for low-use scenarios, then switch to a server-based data source when/if it becomes clear it is going to be around for a long while.


Tip
titleMacro Security for data source access control

Macro Security for Confluence can  can be used to control access to specific Data Sources data sources in the same way no matter what method is used.


Tip
titleUse Cache and Future macros around SQL macros

Give your users better response times and reduce the load on your server by using Cache for Confluence macros  macros for heavy use scenarios.

The Data Source The data source is referenced using the dataSource (Data Source data source name) parameter. The exact configuration of a Data Source a data source is application server and database specific. The configuration must be done by a Confluence administrator and the Confluence application server must be restarted for changes to be active. The configuration must be done very carefully as any errors result in the Data Source the data source being unusable (sad). Each database you need to access in Confluence needs to a have a Data Source a data source configuration.