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

> ⚠️ 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. Click **Settings** > **Marketplace Apps**.
2. Go to **Power Scripts** > **Configurations** > **Integrations** > **Datasources**.
3. Click **Add Datasource**.

---

## Key configuration settings

To create your datasource configuration, fill in the required fields (marked with an asterisk <span style="color: #ff5630">*****</span>) and any optional parameters. 

| **Configuration setting** | **Description** |
| --- | --- |
| **Name **<span style="color: #ff5630">*****</span> | A unique identifier for your data source. This name must be unique within Power Scripts. |
| **Database type **<span style="color: #ff5630">*****</span> | The type of database system you're connecting to. Select from popular options like PostgreSQL, MySQL, Oracle, or SQL Server. |
| **JDBC URL **<span style="color: #ff5630">*****</span> | The connection string that specifies how to connect to your database. This should follow the syntax required by the selected database driver. For example:  
jdbc:postgresql://localhost/mydb |
| **Username **<span style="color: #ff5630">*****</span> | If applicable, the authentication username for connecting to your database. |
| **Password **<span style="color: #ff5630">*****</span> | 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 completing 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 configured datasources and lets you 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

> Macro (contentbylabel)