Versions Compared

Key

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

...

Note
titleCompatibility of databases with the app:
  • MySQL is supported from version 8 (2018) onwards.

  • SQL Server is supported from version 2005 onwards.

  • Postgres is supported from version 9.5 (2016) onwards.

After migrating or installing SQL for Confluence cloud app, navigate to the SQL for Confluence Configuration screen:

...

Here a Confluence administrator may configure global behavior of SQL for Confluence macros.

Image RemovedImage Added

ParameterDefault valueDescription
Limit rows processed

250

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 Maximum number of rows to retrieve and display parameter in the macro editor to override this value. The following options are available from a selection list:

  • 250
  • 500
  • 1000
  • 2500
  • 5000
  • 10000
  • 25000
Note

Refer to this note to know more about the default behavior for common parameters available in the configuration as well as macro editor.


Limit query time

120

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 Maximum number of seconds for query to run parameter in the macro editor to override this value.

The following options are available from a selection list:

  • 1
  • 5
  • 10
  • 30
  • 60
  • 120
Note
  • Requires that the target database support the remote query timeout server configuration option (Maximum number of seconds for query to run).
  • Refer to this note to know more about the default behavior for common parameters available in the configuration as well as macro editor.


Rows per page10

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 Limit rows processed and Maximum number of rows to retrieve and display parameter in the macro editor). Based on this, a pagination bar is displayed below the table. The following options are available:

  • 10
  • 25
  • 50
  • 100


Note

Refer to this note to know more about the default behavior for common parameters available in the configuration as well as macro editor.


Transaction isolation levelRead committed

Specify the default isolation level to be used for transactions if the Transaction isolation level macro parameter did not specify a specific level. The following options are available for selection:

  • Read committed 
  • Read uncommitted
  • Repeatable read
  • Serializable
  • None
Note
  • This parameter requires that the target database support transaction isolation levels.
  • Refer to this note to know more about the default behavior for common parameters available in the configuration as well as macro editor.


Disable anti-XSS modeOffAnti-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 Disable anti-XSS mode to ON.
Help us improve the productOnEnable 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 this page to know more about the information collected if this option is enabled.

...

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.

Image RemovedImage Added

You can perform the following actions on this screen:

  • Click Add Profile to create a profile as follows:

    1. Step 1 - Specify the database that the macro may access.
    2. Step 2 - Specify database and user authentication details.
    3. Step 3 - Save the details to create a profile.
  • Click  to edit the profile details. Click Update profile to save the changes after updating the relevant parameters, or, Cancel to return to the Data source profiles screen.
  • Click  to remove the profile. 

    Note

    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. 


...

SectionParameterDefault valueDescription
Anchor
sqlCld_100_config_profileHostname
sqlCld_100_config_profileHostname
Profile name
Enter the name to be used for the profile. Users can then select from the list of profiles displayed in the macro editor. This field is mandatory. 
Database connectionHostname

Enter the host name or the IP address of the database server to be accessed. This field is mandatory. 

Note
titleConfiguration note

Ensure that the database host allows connections from the SQL for Confluence app. This requires updating the host's firewall settings to allow these IP addresses:

  • 184.73.28.18
  • 52.45.207.55

If these addresses are not allowed, errors are generated and relevant messages are shown.  


Port
Enter the port number required to access the relevant database on the server. This field is mandatory.
Database
Enter the database name the macros must query for information. This field is mandatory.

Authentication type

Warning
titleImportant information:

Administrators must ensure to use credentials of database users with read-only privileges for profiles intended for use with the SQL Query macro.


Authentication typeBasic

Select the authentication method to be used to connect to the specified database. This field is mandatory.

The options are as follows:

  • Basic - This is the default authentication method. This method uses the basic user authentication (user name and password) to validate access to the required database.
  • AWS IAM - This authentication method is used to manage access to Amazon Web Services (AWS) and resources securely with access keys. 

    Note

    The Amazon Relation Database Service (RDS) documentation 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.


    Tip

    Refer to this article for more information about IAMand this article to know more about AWS access keys used to authenticate users. 


User

Enter the user name to be used to log in the required database or AWS account. Based on the value of Authentication type, provide the following:

  • BasicEnter the user name or ID to be used to log into the required database. 
  • AWS IAM: Enter the user ID of the AWS account used to log into the required database.

This field is mandatory.

Password

Enter the password to be used along with the user name to access the required database. This field is mandatory.

Note
  • This field appears only if Authentication type is Basic.
  • All profile sensitive information (such as passwords) are encrypted to provide enhanced security.


AWS region

Enter the AWS region (specified when creating the AWS account) where the relevant database is hosted.

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 AWS global infrastructure documentation

Note

This field is displayed only if Authentication type is AWS IAM.


Key ID

Enter the AWS key ID of the user to log in the required databaseThis field is mandatory.

Note

This field is displayed only if Authentication type is AWS IAM.

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 theAWS IAM documentation.

Secret access key

Enter the AWS secret access key (part of a user's AWS access key) to be used to log in the required database. This field is mandatory.

Note

This field is displayed only if Authentication type is AWS IAM.

For more information about AWS access keys, refer to the AWS IAM documentation.

Test connection

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:

IndicatorDefinition

Indicates that the connection information supplied for the data source profile enabled a successful validation. Thus, further connections can be made from Confluence to the targeted database.

Note that this indicator does not imply that the profile is actually being used on a Confluence page.

Indicates that the connection specific information is incorrect, and thus, the connection to the targeted database is not established.

A relevant error message about the connection failure is displayed along with this indicator. If this indicator is displayed, update the profile details with the relevant changes.


Extended parametersLimit rows processed250

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 Limit rows processed parameter in the macro editor to override this value.

The following options are available from a selection list:

  • 250
  • 500
  • 1000
  • 2500
  • 5000
  • 10000
  • 25000


Note

Refer to this note to know more about the default behavior for common parameters available in the configuration as well as macro editor.


Limit query time120

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 Limit query time parameter in macro editor to override this value.

The following options are available from a selection list:

  • 1
  • 5
  • 10
  • 30
  • 60
  • 120
Note

Refer to this note to know more about the default behavior for common parameters available in the configuration as well as macro editor.


...

Click Save profile to create the profile, or, Cancel 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.

Helpful resources