SQL Datasource configuration

SQL Datasource configuration

Data sources give your scripts the ability to connect to external databases, which greatly expands the number of potential solutions using Power Scripts for Jira Cloud. 

You can define your SQL data source in two ways: as a Java Naming and Directory Interface (JNDI) resource or directly through the Power Scripts for Jira Cloud interface. This guide focuses on configuring SQL connection pools through the Power Scripts interface.

JNDI is a Java API that allows applications to look up data sources that are configured at the server level. When you create a data source directly through our Power Scripts interface instead, it exists only within Power Scripts for Jira Cloud and cannot be accessed by other applications.

If both a JNDI resource and a Power Scripts interface-defined data source share the same name, the Power Scripts version takes precedence. For example, if a JNDI datasource named 'customer_database' exists and you create a Power Scripts datasource with the same name, scripts will connect to the Power Scripts-defined database source.

How to access the Datasources configuration

To access the Datasources configuration:

  1. Open the Jira admin settings and select Apps.

  2. Go to Power Apps Config > Integrations > Datasources.

  3. Use the Add Datasource button to add a new configuration.


Key configuration settings

To create your datasource configuration, fill in the required fields (marked with an asterisk *) and any optional parameters you wish to customize. 

Configuration setting

Description

Configuration setting

Description

Name *

A unique identifier for your data source. This name must be unique within Power Scripts.

Database type *

The type of database system you're connecting to. Select from popular options like PostgreSQL, MySQL, Oracle, or SQL Server.

Driver class *

 

JDBC URL *

The connection string that specifies how to connect to your database. This should follow the syntax required by the selected database driver (e.g., jdbc:postgresql://localhost/mydb).

Username *

If applicable, the authentication username for connecting to your database.

Password *

If applicable, the authentication password associated with the username for database access.

Validation query

The SQL query used to validate connections from the pool to ensure they're still active.

Initial size

The number of database connections created when the pool is initialized.

Max Active

The maximum number of database connections that can be allocated and used simultaneously.

Max Idle

The maximum number of database connections allowed to remain unused in the connection pool.

Min Idle

The minimum number of database connections that should be maintained in the unused connection pool.

After filling in the datasource configuration settings and parameters:

  • Click Test to verify your connection settings before saving. This will attempt to establish a connection with your database using the provided parameters and display any errors that might occur.

  • Click Save once your connection test succeeds to create the datasource, making it immediately available for use in your scripts.


Manage datasources

The datasources screen lists all your configured datasources and allows you to modify, test, and remove them as needed. Changes to datasources are applied immediately. There are currently no built-in tools for monitoring SQL connection pool performance, so you'll need to use external monitoring tools specific to your database system.

Important notes:

  • The appropriate JDBC driver must be installed in your Jira instance before creating a datasource.

  • There is no warning when removing a datasource that is in use by your scripts, so take care when performing these operations.


More configuration guides

 

Need support? Create a request with our support team.

Copyright © 2005 - 2025 Appfire | All rights reserved.