---
title: "Database import"
canonical: "https://support.appfire.com/space/AIP/10257314/Database%20import"
format: markdown
---
> Macro (aura-html)

This guide explains how to import assets and keep them synchronized with a database or Configuration Management Database (CMDB) tool.

## Set up database synchronization

1. Navigate to **Settings** > **External System Configuration**.
2. Click **Add Database Configuration**.
3. Define the connection details.

4. **Name:** Enter a recognizable name for this configuration (for example, `Production Database`).
5. **URL:** Provide the database connection URL. Refer to your database provider's documentation for specific URL formats (for example, PostgreSQL: `jdbc:postgresql://localhost:5432/jira8.5.1`).
6. **Driver:** Specify the JDBC driver class required to connect to your database.
  - Download the appropriate driver JAR file.
  - Place the JAR file in the Jira installation directory under the `lib` folder.
  - Restart Jira for the changes to take effect.

| **Database** | **Driver Class** | **Description** |
| --- | --- | --- |
| Microsoft SQL Server | com.microsoft.sqlserver.jdbc.SQLServerDriver |  |
| MySQL | com.mysql.jdbc.Driver<br>com.mysql.cj.jdbc.Driver | Connector/J version 5.1<br>Connector/J version 8<br>See [https://dev.mysql.com/doc/connector-j/en/connector-j-versions.html](https://dev.mysql.com/doc/connector-j/en/connector-j-versions.html) for more information. |
| PostgreSQL | org.postgresql.Driver |  |
| Oracle | oracle.jdbc.OracleDriver |  |

7. **User:** Enter the username with access to the database.
8. **Password:** Provide the password for the specified user. (Note: Password is encrypted during storage. Anytime you want to edit a configuration, you must enter the password again.)
9. **Cron Expression:** Schedule synchronization using a cron expression (for example, `0 0 * * *` for daily sync at midnight).
10. **Acting Jira User:** Select a Jira user with permissions to create, update, and delete assets.
11. **Is Active:** Enable or disable synchronization for this configuration.
12. **Test Connection:** Verify the connection details by clicking *Test Connection*.
13. Click **Save**.

## Asset Type mapping

1. Click **Assets** > **Settings** > **External System Configuration**.
2. After creating a database configuration, select its name.
3. Click **Configure** to access the mapping options.
4. Define mapping details.
5. **Name: **Assign a descriptive name for this mapping (for example, `Import Servers`).
6. **Asset Type: **Select the Jira asset type you want to populate with data from the database.
7. **Selector: **The selector is an SQL query. Write an SQL query to retrieve data from your database table. You can test and refine these queries directly in a database client tool. Data will be fetched from this execution result.

> ℹ️ **Notes**:
> ℹ️ 
> ℹ️ - Please try SQL queries on a database client first.
> ℹ️ - Consider database schema requirements (tables or views) before defining selectors.

8. **Date Format: **Specify date formats (for example, yyyy-MM-dd for 1994-01-17) if your database stores these values in character fields. Refer to [https://docs.oracle.com/javase/10/docs/api/java/text/SimpleDateFormat.html](https://docs.oracle.com/javase/10/docs/api/java/text/SimpleDateFormat.html) for formatting options.
9. **Date Time Format: **Specify date-time formats (for example, yyyy-MM-dd hh:mm:ss.s for 1994-01-17 09:00:00.0) if your database stores these values in character fields. Refer to [https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html](https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html) for formatting options.
10. **Delimiter: **If multiple values are kept in a character field, a delimiter (for example, comma) will split them while importing. Delimiter provides importing multiple select attributes like Checkbox and List Box - Multiple.
11. **Define Non-Existing Attribute Options:** When the imported value is not an option for the attribute, this option allows you to define these values as a new option for attributes like Checkbox, Dropdown List, List Box, List Box - Multiple, and Radio Button.
12. **Ignore Attribute Existence: **When an attribute is not defined in the Asset Type Schemes of the selected Asset Type, this option allows the asset to be created without undefined attribute value. Otherwise, the asset will not be created.
13. **Delete Missing Objects:** This option provides full synchronization with the database. If enabled, the synchronization system will delete the manually created assets (the assets that are not imported from the database) in the selected Asset Type.
14. **Update Multiple Objects:** Identifiers provide the Asset Uniqueness. When multiple assets are found with the identifier search, this option decides whether all found assets will be updated or none of them.
15. **Ignore Empty Values: **Prevent empty values from being imported.
16. **Ignore Invalid Values:** When an imported value is not invalid for an attribute, the asset will not be created. With this option, the asset will be created without the attribute, which has an invalid value.
17. **Is Active: **Enable or disable synchronization for this specific Asset Type Mapping. (**Note:** Asset Name Field Mapping must be defined for activation.)
18. Click **Save**.

## Field mapping

This allows you to define how data from your database columns will be used to populate attributes in your assets.

1. Navigate to **Assets** > **Settings** > **External System** **Configuration**.
2. Go to the database configuration you’ve created, and expand it.
3. Click **Create new Field Mapping**.
4. Define mapping details.
5. **Attribute Name:** Select the Jira asset type attribute you want to import data for.

If **Asset List** or **Asset List by Form** is selected as Attribute, these fields will appear:

- **Referenced Asset Match Type: **Decide which way to fill asset list fields.

6. **Query Column:** Choose the column containing the data to import.

> ⚠️ Columns are fetched from the database, so ensure the connection with the database is successful.

7. **Delimiter:** Define a delimiter (if needed) to separate multiple values imported into list-based attributes. This field is available for Asset List, Asset List By Form, Checkbox, List Box - Multiple, and Jira Multiple Users attributes.
8. **Concatenator:** Use this to combine data from multiple database columns into a single attribute value in Jira.

> ✅ **Example: **
> ✅ 
> ✅ For an Employee asset type, the asset name field needs to be imported from two different columns `first_name` and `last_name`. The concatenator is defined as `-`. In this case, the asset name field will be imported as `First-Name`.

9. **Is Identifier:** This searches if the imported asset exists in the system. If the asset exists, it will be updated. If not, a new asset will be created.
10. Click **Save**.