---
title: "App configuration - Cloud"
canonical: "https://support.appfire.com/space/SQL/74323863/App%20configuration%20-%20Cloud"
format: markdown
---
> Macro (aura-html)

<span style="color: #000000">This guide contains information on how the app must be configured for optimal performance.</span>

> ℹ️ ### Compatibility of databases with the app:
> ℹ️ 
> ℹ️ - <span style="color: #000000">MySQL is supported from version 8 (2018) onwards.</span>
> ℹ️ - <span style="color: #000000">SQL Server is supported from version 2005 onwards.</span>
> ℹ️ - <span style="color: #000000">Postgres is supported from version 9.5 (2016) onwards.</span>

<span style="color: #000000">After</span> <span style="color: #000000">[migrating](https://appfire.atlassian.net/wiki/x/ahtuB)</span> or <span style="color: #000000">[installing](https://appfire.atlassian.net/wiki/x/_xpuB)</span> <span style="color: #000000">*SQL for Confluence*</span><span style="color: #000000"> cloud app, navigate to the SQL for Confluence Configuration screen:</span>

1. <span style="color: #000000">Log in with the system administrator </span>[global permission](https://confluence.atlassian.com/doc/global-permissions-overview-138709.html).
2. <span style="color: #000000">Navigate to</span> > Macro (inline-media-image)

 <span style="color: #000000">***> Settings > Atlassian Marketplace***</span><span style="color: #000000">* *</span><span style="color: #000000">on the sidebar, or search SQL in the search text box.</span>
3. <span style="color: #000000">Click </span><span style="color: #000000">*SQL Configuration*</span><span style="color: #000000"> to manage the app configuration.</span>

<span style="color: #000000">The following configuration settings are available:</span>

- <span style="color: #000000">[Global configuration](#sqlCld_100_config_gc)</span>
- <span style="color: #000000">[Data source profiles](#sqlCld_100_config_profile)</span>

## > Macro (anchor)

Forge update notes

SQL for Confluence Cloud 4.0.0 uses Atlassian Forge.

Existing data source profiles, credentials, permissions, and configuration settings are preserved after the update. Administrators do not need to reconnect or reauthorize data sources.

After the update, existing data can take 1–2 minutes to appear in the app.

The Forge update includes minor user interface changes to SQL macros and configuration pages. Note that Macro Security isn’t available in the Forge version of SQL for Confluence Cloud.

## <span style="color: #000000">Global configuration</span>

<span style="color: #000000">Here, a Confluence administrator can configure the global behavior of SQL for Confluence macros.</span>

![image](media://a06d3535-95c2-47c1-9aed-597b6ac7b352)

| Parameter | Default value | Description |
| --- | --- | --- |
| <span style="color: #000000">Limit rows processed</span> | <span style="color: #000000">*250*</span> | <span style="color: #000000">Select the maximum number of rows to be processed and displayed on Confluence pages. This setting prevents queries from using excessive resources that can result in a large number of rows. Individual queries can use the </span><span style="color: #000000">*Maximum number of rows to retrieve and display*</span><span style="color: #000000"> parameter in the macro editor to override this value. The following options are available from a selection list:</span><br>- <span style="color: #000000">*250*</span>
- <span style="color: #000000">*500*</span>
- <span style="color: #000000">*1000*</span>
- <span style="color: #000000">*2500*</span>
- <span style="color: #000000">*5000*</span>
- <span style="color: #000000">*10000*</span>
- <span style="color: #000000">*25000*</span><br>> ⚠️ <span style="color: #000000">Refer to </span><span style="color: #000000">[this note](#sqlCld_100_config_paramPriority)</span><span style="color: #000000"> to know more about the default behavior for common parameters available in the configuration as well as macro editor.</span> |
| <span style="color: #000000">Limit query time</span> | <span style="color: #000000">*120*</span> | <span style="color: #000000">Select the time in seconds that a query can take before a forced timeout. This prevents queries that take too long, from impacting other users. Individual users can use the </span><span style="color: #000000">*Maximum number of seconds for query to run*</span><span style="color: #000000"> parameter in the macro editor to override this value.</span><br><span style="color: #000000">The following options are available from a selection list:</span><br>- <span style="color: #000000">*1*</span>
- <span style="color: #000000">*5*</span>
- <span style="color: #000000">*10*</span>
- <span style="color: #000000">*30*</span>
- <span style="color: #000000">*60*</span>
- <span style="color: #000000">*120*</span><br>> ⚠️ - <span style="color: #000000">Requires that the target database support the remote query timeout server configuration option (</span><span style="color: #000000">*Maximum number of seconds for query to run*</span><span style="color: #000000">).</span>
> ⚠️ - <span style="color: #000000">Refer to </span><span style="color: #000000">[this note](#sqlCld_100_config_paramPriority)</span><span style="color: #000000"> to know more about the default behavior for common parameters available in the configuration as well as macro editor.</span> |
| <span style="color: #000000">Rows per page</span> | <span style="color: #000000">10</span> | <span style="color: #000000">Select the number of rows to be displayed on a page. The total number of rows fetched depends on the limit applied on the number of rows to be processed (in </span><span style="color: #000000">*Limit rows processed*</span><span style="color: #000000"> and </span><span style="color: #000000">*Maximum number of rows to retrieve and display*</span><span style="color: #000000"> parameter in the macro editor). Based on this, a pagination bar is displayed below the table. The following options are available:</span><br>- <span style="color: #000000">*10*</span>
- <span style="color: #000000">*25*</span>
- <span style="color: #000000">*50*</span>
- <span style="color: #000000">*100*</span><br>> ⚠️ <span style="color: #000000">Refer to </span><span style="color: #000000">[this note](#sqlCld_100_config_paramPriority)</span><span style="color: #000000"> to know more about the default behavior for common parameters available in the configuration as well as macro editor.</span> |
| <span style="color: #000000">Transaction isolation level</span> | <span style="color: #000000">*Read committed*</span> | <span style="color: #000000">Specify the default isolation level to be used for transactions if the </span><span style="color: #000000">*Transaction isolation level*</span><span style="color: #000000"> macro parameter did not specify a specific level. The following options are available for selection:</span><br>- <span style="color: #000000">*Read committed *</span>
- <span style="color: #000000">*Read uncommitted*</span>
- <span style="color: #000000">*Repeatable read*</span>
- <span style="color: #000000">*Serializable*</span>
- <span style="color: #000000">*None*</span><br>> ⚠️ - <span style="color: #000000">This parameter requires that the target database support transaction isolation levels.</span>
> ⚠️ - <span style="color: #000000">Refer to </span><span style="color: #000000">[this note](#sqlCld_100_config_paramPriority)</span><span style="color: #000000"> to know more about the default behavior for common parameters available in the configuration as well as macro editor.</span> |
| <span style="color: #000000">Disable anti-XSS mode</span> | <span style="color: #000000">Off</span> | <span style="color: #000000">Anti-XSS mode reduces exposure to XSS exploits related to SQL app macros. This configuration allows an administrator to globally turn off anti-XSS mode only for the SQL Macro. To turn off anti-XSS mode, toggle the </span><span style="color: #000000">*Disable anti-XSS mode*</span><span style="color: #000000"> to ON.</span> |
| <span style="color: #000000">Help us improve the product</span> | On | <span style="color: #000000">Enable this option to allows us to collect some usage data that helps us improve our product continually. No private user data is sent. Please refer to </span><span style="color: #000000">[this page](https://appfire.atlassian.net/wiki/x/ehduB)</span><span style="color: #000000"> to know more about the information collected if this option is enabled.</span> |

## > Macro (anchor)

<span style="color: #000000">Data source profiles</span>

<span style="color: #000000">An administrator creates profiles that contain parameters used to access, query, and retrieve information from the required data source. In turn, users then choose a profile in the macro editor to display the information on Confluence pages. Some key points about profiles are:</span>

- <span style="color: #000000">Profiles allow user authentication to be hidden from page viewers and editors. Only Confluence administrators have access to this information.</span>
- <span style="color: #000000">Enables the macro editor to quickly configure the macro by reusing a shared definition for data source access.</span>
- <span style="color: #000000">Any configuration change takes effect immediately.</span>

> ❌ ### Important information:
> ❌ 
> ❌ <span style="color: #000000">Administrators must ensure to use credentials of database users with </span><span style="color: #000000">*read-only privileges*</span><span style="color: #000000"> for profiles intended for use with the </span><span style="color: #000000">*SQL Query macro*</span><span style="color: #000000">.</span> <span style="color: #000000">We recommend creating a read-only database user to be used specifically with the </span><span style="color: #000000">*SQL for Confluence *</span><span style="color: #000000">- </span><span style="color: #000000">*SQL Query*</span><span style="color: #000000"> macro.</span>

> ⚠️ <span style="color: #000000">At least one data source profile must be configured before using the </span><span style="color: #000000">*SQL for Confluence*</span><span style="color: #000000"> - </span><span style="color: #000000">*SQL Query*</span><span style="color: #000000"> macro.</span>

> ℹ️ ### How a profile affects macro behavior:
> ℹ️ 
> ℹ️ <span style="color: #000000">The </span><span style="color: #000000">*SQL Query*</span><span style="color: #000000"> macro behaves as follows depending on the chosen database and the database privileges the user (configured in the profile) holds:</span>

| <span style="color: #000000">Database</span> | Points to note |
| --- | --- |
| <span style="color: #000000">PostgreSQL</span><br><span style="color: #000000">MySQL</span> | <span style="color: #000000">Macro creates a read-only session for the database connection established through the specified profile. Given SQL statement(s) or the script file is executed, and results are displayed in a table in the Preview panel of the macro editor.</span><br>- <span style="color: #000000">Allows SQL statements or scripts in read-only mode only.</span>
- <span style="color: #000000">Error messages are displayed if Create, Insert, Update, or Delete SQL statements are given in editor or in a script attached to a page. This is because the database itself does not allow execution of such statements as the logged in user has read-only privileges.</span> |
| <span style="color: #000000">Microsoft SQL Server</span> | <span style="color: #000000">Given SQL statement(s) or the script file is executed, and results are displayed in a table in the Preview panel of the macro editor. Once the statements are run: </span><br>- <span style="color: #000000">the database reflects the operations performed, and, </span>
- <span style="color: #000000">the macro executes a rollback that reverts the database to its previous state. </span><br><span style="color: #000000">Thus, Confluence administrators must make sure to provide credentials of a </span><span style="color: #000000">*user with read-only privilege*</span><span style="color: #000000">s configured in the database.</span> |

<span style="color: #000000">The Data source profiles screen displays a complete list of profiles available for use with the macro, and also provides options to add, update, or delete profiles.</span>

![image](media://59b89498-3d3f-47e1-ba7a-3cac400ffbe6)

<span style="color: #000000">You can perform the following actions on this screen:</span>

- <span style="color: #000000">Click </span><span style="color: #000000">**Add Profile**</span><span style="color: #000000"> to create a profile as follows:</span>
  - <span style="color: #000000">[Step 1](#sqlCld_100_config_profile_add01)</span><span style="color: #000000"> - Specify the database that the macro may access.</span>
  - <span style="color: #000000">[Step 2](#sqlCld_100_config_profile_add02)</span><span style="color: #000000"> - Specify database and user authentication details.</span>
  - <span style="color: #000000">[Step 3](#sqlCld_100_config_profile_add03)</span><span style="color: #000000"> - Save the details to create a profile.</span>
- <span style="color: #000000">Click </span>:edit: <span style="color: #000000"> to edit the profile details. Click </span><span style="color: #000000">**Update profile**</span><span style="color: #000000"> to save the changes after updating the relevant parameters, or, </span><span style="color: #000000">**Cancel**</span><span style="color: #000000"> to return to the Data source profiles screen.</span>
- <span style="color: #000000">Click </span>> Macro (inline-media-image)

<span style="color: #000000"> to remove the profile. </span>

> ⚠️ Ensure that there are no macros in pages which reference profile(s) to be deleted. After the profile is deleted, the macro cannot connect to the configured data source in the pages, and relevant error messages are displayed.

### <span style="color: #000000">Create data source profiles</span>

<span style="color: #000000">Clicking the </span><span style="color: #000000">**Add profile**</span><span style="color: #000000"> button opens the Add profile wizard. The succeeding sections explain the information required to establish a connection with the required database.</span>

#### > Macro (anchor)

<span style="color: #000000">Add profile wizard - Step 1</span>

![image](media://f3c4b1c2-f25c-4544-b407-a675a128902c)

<span style="color: #000000">Select the database that the macro must access, query, and retrieve information. </span>

#### > Macro (anchor)

<span style="color: #000000">Add profile wizard - Step 2</span>

<span style="color: #000000">After selecting the relevant SQL </span><span style="color: #000000">database</span><span style="color: #000000">, provide details such as the database connection details, user authentication method, and more. </span>

![image](media://93b86be4-4c82-4805-8d4a-3c2d0ad88230)

<span style="color: #000000">The following table lists the parameters to be provided:</span>

| Section | Parameter | Default value | Description |
| --- | --- | --- | --- |
| > Macro (anchor) | <span style="color: #000000">Profile name</span> |  | <span style="color: #000000">Enter the name to be used for the profile. Users can then select from the list of profiles displayed in the macro editor. </span><span style="color: #000000">*This field is mandatory. *</span> |
| <span style="color: #000000">Database connection</span> | <span style="color: #000000">Hostname</span> |  | <span style="color: #000000">Enter the host name or the IP address of the database server to be accessed. </span><span style="color: #000000">*This field is mandatory. *</span><br>> ⚠️ ### Configuration note
> ⚠️ 
> ⚠️ <span style="color: #000000">Ensure that the database host allows connections from the </span><span style="color: #000000">*SQL for Confluence*</span><span style="color: #000000"> app. This requires updating the host's firewall settings to allow these IP addresses:</span>
> ⚠️ 
> ⚠️ - <span style="color: #000000">184.73.28.18</span>
> ⚠️ - <span style="color: #000000">52.45.207.55</span>
> ⚠️ 
> ⚠️ <span style="color: #000000">If these addresses are not allowed, errors are generated and relevant messages ar</span><span style="color: #000000">e shown.  </span> |
| <span style="color: #000000">Port</span> |  | <span style="color: #000000">Enter the port number required to access the relevant database on the server. </span><span style="color: #000000">*This field is mandatory.*</span> |
| <span style="color: #000000">Database</span> |  | <span style="color: #000000">Enter the database name the macros must query for information. </span><span style="color: #000000">*This field is mandatory.*</span> |
| <span style="color: #000000">Authentication type</span><br>> ❌ ### Important information:
> ❌ 
> ❌ <span style="color: #000000">Administrators must ensure to use credentials of database users with </span><span style="color: #000000">*read-only privileges*</span><span style="color: #000000"> for profiles intended for use with the </span><span style="color: #000000">*SQL Query macro*</span><span style="color: #000000">.</span> | <span style="color: #000000">Authentication type</span> | *Basic* | <span style="color: #000000">Select the authentication method to be used to connect to the specified database. </span><span style="color: #000000">*This field is mandatory.*</span><br><span style="color: #000000">The options are as follows:</span><br>- <span style="color: #000000">*Basic*</span><span style="color: #000000"> - This is the default authentication method. This method uses the basic user authentication (user name and password) to validate access to the required database.</span>
- <span style="color: #000000">*AWS IAM*</span><span style="color: #000000"> - This authentication method is used to manage access to Amazon Web Services (AWS) and resources securely with access keys.</span><br>> ⚠️ The [Amazon Relation Database Service (RDS) documentation](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAM.html) specifies the databases supported with IAM authentication as follows:
> ⚠️ 
> ⚠️ - Amazon RDS for MySQL
> ⚠️ - Amazon RDS for PostgreSQL
> ⚠️ 
> ⚠️ For more information about authenticating to a database instance using IAM, see [IAM database authentication for MySQL and PostgreSQL](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html).<br>> ✅ Refer to [this article](https://aws.amazon.com/iam/) for more information about IAM, and [this article](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html) to know more about AWS access keys used to authenticate users. |
| <span style="color: #000000">User</span> |  | <span style="color: #000000">Enter the user name to be used to log in the required database or AWS account. Based on the value of </span><span style="color: #000000">*Authentication type*</span><span style="color: #000000">, provide the following:</span><br>- <span style="color: #000000">*Basic*</span><span style="color: #000000">: Enter the user name or ID to be used to log into the required database. </span>
- <span style="color: #000000">*AWS IAM*</span><span style="color: #000000">: Enter the user ID of the AWS account used to log into the required database.</span><br><span style="color: #000000">*This field is mandatory.*</span> |
| <span style="color: #000000">Password</span> |  | <span style="color: #000000">Enter the password to be used along with the user name to access the required database. </span><span style="color: #000000">*This field is mandatory.*</span><br>> ⚠️ - <span style="color: #000000">This field appears only if </span><span style="color: #000000">*Authentication type*</span><span style="color: #000000"> is </span><span style="color: #000000">*Basic*</span><span style="color: #000000">.</span>
> ⚠️ - <span style="color: #000000">All profile sensitive information (such as passwords) are encrypted to provide enhanced security.</span> |
| <span style="color: #000000">AWS region</span> |  | <span style="color: #000000">Enter the AWS region (specified when creating the AWS account) where the relevant database is hosted. </span><br><span style="color: #000000">An AWS region is a physical location that contains clusters of data centers where cloud based services are accessed over the internet. For more information about regions, refer to the </span><span style="color: #000000">[AWS global infrastructure documentation](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/)</span><span style="color: #000000">. </span><br>> ⚠️ <span style="color: #000000">This field is displayed only if </span><span style="color: #000000">*Authentication type*</span><span style="color: #000000"> is </span><span style="color: #000000">*AWS IAM*</span><span style="color: #000000">.</span> |
| <span style="color: #000000">Key ID</span> |  | <span style="color: #000000">Enter the AWS key ID of the user to log in the required database. </span><span style="color: #000000">*This field is mandatory.*</span><br>> ⚠️ <span style="color: #000000">This field is displayed only if </span><span style="color: #000000">*Authentication type*</span><span style="color: #000000"> is </span><span style="color: #000000">*AWS IAM*</span><span style="color: #000000">.</span><br><span style="color: #000000">Access keys are long-term credentials for an IAM user or the AWS account root user. For more information about AWS access keys, refer to the </span><span style="color: #000000">[AWS IAM documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html)</span>. |
| <span style="color: #000000">Secret access key</span> |  | <span style="color: #000000">Enter the AWS secret access key (part of a user's AWS access key) to be used to log in the required database. </span><span style="color: #000000">*This field is mandatory.*</span><br>> ⚠️ <span style="color: #000000">This field is displayed only if </span><span style="color: #000000">*Authentication type*</span><span style="color: #000000"> is </span><span style="color: #000000">*AWS IAM*</span><span style="color: #000000">.</span><br><span style="color: #000000">For more information about AWS access keys, refer to the </span><span style="color: #000000">[AWS IAM documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html)</span>. |
| <span style="color: #000000">Test connection</span> |  | <span style="color: #000000">Click this link to test whether a connection can be established with the required database using the specified authentication details. After the test is completed, either of the following indicators are shown:</span><br>> Macro (nested-table) |
| <span style="color: #000000">Extended parameters</span> | <span style="color: #000000">Limit rows processed</span> | <span style="color: #000000">*250*</span> | <span style="color: #000000">Select the maximum number of rows to be processed and displayed on Confluence pages. This setting prevents queries from using excessive resources that can result in a large number of rows. </span><br><span style="color: #000000">Individual queries can use the </span><span style="color: #000000">*Limit rows processed*</span><span style="color: #000000"> parameter in the </span><span style="color: #000000">[macro editor](https://appfire.atlassian.net/wiki/x/8QtuB)</span><span style="color: #000000"> to override this value.</span><br><span style="color: #000000">The following options are available from a selection list:</span><br>- <span style="color: #000000">*250*</span>
- <span style="color: #000000">*500*</span>
- <span style="color: #000000">*1000*</span>
- <span style="color: #000000">*2500*</span>
- <span style="color: #000000">*5000*</span>
- <span style="color: #000000">*10000*</span>
- <span style="color: #000000">*25000*</span><br>> ⚠️ <span style="color: #000000">Refer to </span><span style="color: #000000">[this note](#sqlCld_100_config_paramPriority)</span><span style="color: #000000"> to know more about the default behavior for common parameters available in the configuration as well as macro editor.</span> |
| <span style="color: #000000">Limit query time</span> | <span style="color: #000000">*1*</span><span style="color: #000000">*20*</span> | <span style="color: #000000">Select the time in seconds that a query can take before a forced timeout. This prevents queries that take too long, from impacting other users. </span><br><span style="color: #000000">Individual users can use the </span><span style="color: #000000">*Limit query time*</span><span style="color: #000000"> parameter in </span><span style="color: #000000">[macro editor](https://appfire.atlassian.net/wiki/x/8QtuB)</span><span style="color: #000000"> to override this value.</span><br><span style="color: #000000">The following options are available from a selection list:</span><br>- <span style="color: #000000">*1*</span>
- <span style="color: #000000">*5*</span>
- <span style="color: #000000">*10*</span>
- <span style="color: #000000">*30*</span>
- <span style="color: #000000">*60*</span>
- <span style="color: #000000">*120*</span><br>> ⚠️ <span style="color: #000000">Refer to </span><span style="color: #000000">[this note](#sqlCld_100_config_paramPriority)</span><span style="color: #000000"> to know more about the default behavior for common parameters available in the configuration as well as macro editor.</span> |

> Macro (anchor)



> ⚠️ ### Priority used for common parameters in configuration and macro editor:
> ⚠️ 
> ⚠️ <span style="color: #000000">There are some parameters, such as </span><span style="color: #000000">*Limit rows processed*</span><span style="color: #000000"> or </span><span style="color: #000000">*Limit query time*</span><span style="color: #000000">, that are available in Global configuration, profile configuration, as well as macro editor. Any parameter defined at the macro level overrides the values set at the Global or profile configuration levels. </span><span style="color: #000000">The order of overriding the default setting is:</span>
> ⚠️ 
> ⚠️ <span style="color: #000000">***Macro level parameter > Profile configuration > Global configuration***</span>

#### > Macro (anchor)

<span style="color: #000000">Add wizard - Step 3</span>

<span style="color: #000000">Click </span>**Save profile**<span style="color: #000000"> to create the profile, or, </span><span style="color: #000000">**Cancel**</span><span style="color: #000000"> to go back to the Data source profiles screen. The newly created profile is now displayed along with the connection status on the Data source profiles screen.</span>

## <span style="color: #000000">Helpful resources</span>

- <span style="color: #000000">[Migration guide](https://appfire.atlassian.net/wiki/x/ahtuB)</span><span style="color: #000000"> to know more about migrating data from server/DC to cloud</span>
- <span style="color: #000000">[User guide](https://appfire.atlassian.net/wiki/x/1xVuB)</span><span style="color: #000000"> to understand app usage</span>