Overview
At least one Data Source or Data Source Profile needs to be configured before you can use the SQL Macro or SQL-query or SQL-file.
Description
This page describes two methods of configuring Data Sources for SQL macros.
The SQL Macros use Data Sources to access databases. A Data Source defines the access parameters, including credentials. The database access information required for each method remains the same. Similarly, the database must allow access if the information provided, regardless of the method used.
Method | Primary Benefit | Key Attributes | Documentation | Express Edition | Pro Edition |
---|---|---|---|---|---|
Data Source Profiles | Convenience |
| Configure Data Source Profiles | ||
Application Server-based Data Source | Performance |
| Configure Application Server-based Data Sources |
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 for long-term use.
Macro Security for data source access control
Macro Security for Confluence can be used to control access to specific Data Sources, as stated above, regardless of the method used.
Use Cache and Future macros around SQL macros
Reduce the load on your server with faster response times by using Cache for Confluence app for heavy use scenarios.
The Data Source is referenced using the dataSource (Data Source name) parameter. The exact configuration of a Data Source is specific to a database and application server. A Confluence administrator must set up the configuration, and the Confluence application server must be restarted for changes to take effect. The configuration must be done very carefully as any errors in doing so, will render the Data Source unusable. Each database that is accessed in Confluence requires a Data Source configuration.