# Data sources

Procedure: Enable the Database Tools and SQL plugin

This functionality relies on the  Database Tools and SQL plugin, which  is bundled and enabled in IntelliJ IDEA   by default. If the relevant features are not available, make sure that you did not disable the plugin.

> **Note:**
> Database Tools and SQL functionality support is limited in IntelliJ IDEA without the Ultimate subscription.

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) to open settings and then select `Plugins`.

2. Open the Installed tab, find the Database Tools and SQL plugin, and select the checkbox next to the plugin name.

Data source is a connection configuration. It stores a list of connection details that are used to establish connection to a database. For example, host, port, database name, driver, SSH and SSL configuration settings, and so on. In data source settings, you can also select databases and schemas for introspection and display in   Database   tool window , and change the driver for your connection.

[Video](https://www.youtube.com/v/drZRJgeK4og)

You can configure your data sources in the   Data Sources and Drivers  dialog (  `Shift+Enter` (Windows), `⌘ I` (macOS), `⇧ ⏎` (IntelliJ IDEA Classic (macOS)), `⌘ I` (macOS System Shortcuts), `Shift+Enter` (XWin), `Shift+Enter` (GNOME), `Shift+Enter` (KDE), `Shift+Enter` (Emacs), `Shift+Enter` (Sublime Text), `⌘ I` (Sublime Text (macOS)), `Shift+Enter` (NetBeans), `Shift+Enter` (Visual Studio), `⌘ I` (Visual Studio (macOS)), `Shift+Enter` (Eclipse), `⌘ I` (Eclipse (macOS)) ) . To access the dialog, in the    Database   tool window  ( `View  | Tool Windows |  Database` ) , click ![the Data Source Properties button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/database-plugin.icons.expui.manageDataSources.svg) Data Sources on the toolbar.

![Data source with connection details for a PostgreSQL database](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_connection_details_postgresql_default.png)

You can view the list of created data sources and explore them in the    Database   tool window  ( `View  | Tool Windows |  Database` ) .

![Data sources in Database tool window](https://resources.jetbrains.com.cn/help/img/idea/2026.2/data_sources_list.png)

In IntelliJ IDEA project, settings of all data sources are stored in the [dataSources.xml file](#locate_the_datasources_xml_file) located in the project directory under the `.idea` subdirectory.

In IntelliJ IDEA, you can create the following data sources:

* Database data sources: connection configurations for the operational databases that contain data. For different databases, IntelliJ IDEA provides complete support and basic support. Complete support of a database includes such features as enhanced code completion and better retrieval of database objects (introspection). All the inspections, quick-fixes, and other coding assistance features are also available, whereas basic support has limited features available. For more information on the support types, refer to the [Other databases](other-databases.html) topic.

* Data Definition Language (DDL) data sources: SQL files that contain data definition language statements (refer to [DDL data sources](ddl-data-sources.html)).

## Create a data source

To connect to a database and start working with it, create a data source that will contain the connection details and specify those details for the database that you are connecting to.

### Use AI agents

You can also use AI agents to create data sources.   For more information about setting up MCP Server, refer to  [MCP Server](mcp-server.html).

The following video demonstrates how to use AI agents to create a data source from a JDBC URL and based on connection details.

[Video](https://youtube.com/v/QuQWOww0JNs?si=DQokxA0e6tJ6S5uL&t=41)   In the video below, AI Agent imports data sources from other tools.

[Video](https://youtube.com/v/QuQWOww0JNs?si=DQokxA0e6tJ6S5uL&t=144)

### Supported databases

IntelliJ IDEA can connect to databases running locally or remotely, whether on host servers or cloud platforms.

To create a data source and run a test connection to your database, follow the instructions provided in a dedicated topic.

Complete support
: The IDE provides complete support for the following databases:
:
:
:
: * [Amazon DocumentDB](documentdb.html)
:
: * [Amazon DynamoDB](dynamodb.html)
:
: * [Amazon Redshift](amazon-redshift.html)
:
: * [Apache Cassandra](apache-cassandra.html) v. 2.1–5
:
: * [Apache Derby](apache-derby.html) v. 10
:
: * [Apache Hive](apache-hive.html) v. 2-4
:
: * [Azure SQL Database](azure-sql-database.html) v. 10–17
:
: * [ClickHouse](clickhouse.html) v. 19–25
:
: * [CockroachDB](cockroachdb.html) v. 19–26
:
: * [Couchbase Query Service](couchbase-query.html) v. 6.6–7
:
: * [Exasol](exasol.html) v. 6–8
:
: * [Google BigQuery](bigquery.html)
:
: * [Greenplum](greenplum.html) v. 5.17–7.x
:
: * [H2](h2.html) v. 1.4–2.2
:
: * [HSQLDB](hsqldb.html) v. 2.3–2.7
:
: * [IBM Db2 LUW](ibm-db2-luw.html) v. 10–12
:
: * [MariaDB](mariadb.html) v. 5–12
:
: * [Microsoft SQL Server](microsoft-sql-server.html) v. 10–17
:
: * [Microsoft SQL Server LocalDB](connecting-to-sql-server-express-localdb.html)
:
: * [MongoDB](mongodb.html) v. 3-8
:
: * [MySQL](mysql.html) v. 5.1–9.x
:
: * [Oracle](oracle.html) v. 9–23
:
: * [PostgreSQL](postgresql.html) v. 9.1–18
:
: * [Redis](redis.html) v. 5-8
:
: * [Snowflake](snowflake.html)
:
: * [SQLite](sqlite.html)
:
: * [Sybase ASE](sybase-ase.html) v. 15-16
:
: * [Vertica](vertica.html) v. 7.1–9.1

Basic support
: For the databases listed below, [basic support](other-databases.html) is provided:
:
:
:
: * Amazon Athena
:
: * Apache Ignite
:
: * Apache Phoenix
:
: * Apache Spark
:
: * Databricks
:
: * Denodo
:
: * DuckDB
:
: * Elasticsearch
:
: * Firebird
:
: * Google Cloud Spanner
:
: * IBM Informix
:
: * InterSystems IRIS
:
: * Mimer SQL
:
: * OpenEdge
:
: * Presto
:
: * SAP HANA
:
: * SingleStore
:
: * Tarantool
:
: * Teradata Vantage
:
: * TiDB
:
: * TmaxTibero
:
: * Trino
:
: * YugabyteDB

DDL data sources
: To create a DDL data source, follow the instructions from the [DDL data sources](ddl-data-sources.html) topic.

Cloud databases
: IntelliJ IDEA also supports the following cloud databases:
:
:
:
: * [Alibaba Cloud](https://www.alibabacloud.com/product/databases) * [ApsaraDB for MySQL](mysql.html) * [ApsaraDB for PostgreSQL](postgresql.html) * [ApsaraDB for Microsoft SQL Server](microsoft-sql-server.html) * [Tair (Redis)](redis.html) * [ApsaraDB for Redis](redis.html) * [ApsaraDB for MongoDB](mongodb.html)
:
: * [MongoDB Atlas](mongodb.html)
:
: * AWS * [Amazon Aurora for MySQL](mysql.html) * [Amazon Aurora for PostgreSQL](postgresql.html) * [Amazon RDS for MariaDB](mariadb.html) * [Amazon RDS for Microsoft SQL Server](microsoft-sql-server.html) * [Amazon RDS for MySQL](mysql.html) * [Amazon RDS for Oracle](oracle.html) * [Amazon RDS for PostgreSQL](postgresql.html) * [Amazon DynamoDB](dynamodb.html) * [Amazon Redshift](amazon-redshift.html)
:
: * Azure * [Azure SQL Database](azure-sql-database.html) * [Azure Synapse Analytics](azure-sql-database.html) * [Azure Database for MySQL](mysql.html) * [Azure Database for PostgreSQL](postgresql.html) * [Azure Cache for Redis](redis.html)
:
: * Google * [Cloud for MySQL](mysql.html) * [Cloud for PostgreSQL](postgresql.html) * [Cloud for SQL Server](microsoft-sql-server.html) * [Google BigQuery](bigquery.html)
:
: * [Huawei Cloud](https://www.huaweicloud.com/intl/en-us/product/) * [RDS for MySQL](mysql.html) * [RDS for PostgreSQL](postgresql.html) * [RDS for MariaDB](mariadb.html)
:
: * IBM * [IBM Cloud Databases for MongoDB](mongodb.html) * [IBM Cloud Databases for Redis](redis.html) * [IBM Cloud Databases for MySQL](mysql.html) * [IBM Db2 on Cloud](ibm-db2-luw.html)
:
: * [Oracle Cloud (Oracle Database)](oracle.html)

## Copy of a data source

Duplicating a data source preserves all the connection settings, including the password. A data source can only be duplicated within a single project.

Procedure:

1. You can duplicate the connection configuration either in   Database   tool window  or in the  Data Sources and Drivers :

* In Database tool window , select the data source you want to duplicate, right-click it and select `Copy/Paste | Duplicate`. ![Duplicate your data source in Database tool window](https://resources.jetbrains.com.cn/help/img/idea/2026.2/duplicate_data_source_database_tool_window.png)

* In the left area of the Data Sources and Drivers dialog ( `Shift+Enter` (Windows), `⌘ I` (macOS), `⇧ ⏎` (IntelliJ IDEA Classic (macOS)), `⌘ I` (macOS System Shortcuts), `Shift+Enter` (XWin), `Shift+Enter` (GNOME), `Shift+Enter` (KDE), `Shift+Enter` (Emacs), `Shift+Enter` (Sublime Text), `⌘ I` (Sublime Text (macOS)), `Shift+Enter` (NetBeans), `Shift+Enter` (Visual Studio), `⌘ I` (Visual Studio (macOS)), `Shift+Enter` (Eclipse), `⌘ I` (Eclipse (macOS)) ) , select the data source you want to duplicate and click ![the Duplicate icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.copy.svg) Duplicate on the toolbar. ![Duplicate your data source in the Data Source and Drivers dialig](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_duplicate_data_source_data_source_dialog.png)

Alternatively, select the data source and press `Ctrl+D` (Windows), `⌘ D` (macOS), `⌘ D` (IntelliJ IDEA Classic (macOS)), `⌘ D` (macOS System Shortcuts), `Ctrl+D` (XWin), `Ctrl+D` (GNOME), `Ctrl+D` (KDE), `Meta+D` (Emacs), `Ctrl+Shift+D` (Sublime Text), `⌘ ⇧ D` (Sublime Text (macOS)), `Ctrl+D` (NetBeans), `Ctrl+D` (Visual Studio), `⌘ D` (Visual Studio (macOS)), `Ctrl+D` (Eclipse), `Ctrl+D` (Eclipse (macOS)).

IntelliJ IDEA will create a new data source with the same settings, including the password.

2. Click OK to      save your new data source and close the dialog.

![Duplicated data source in the Data Source and Drivers dialig](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_duplicate_data_source_final.png)

## Delete a data source

Procedure:

You can delete a data source in one of the following ways:

* To delete the data source using its context menu, in the    Database   tool window  ( `View  | Tool Windows |  Database` ) , right-click the data source that you want to delete and select Remove Data Source.

* To delete a data source in the Data Sources and Drivers dialog, follow these steps:

1.

Open data source properties by doing one of the following:

* On the Database tool window toolbar, click ![The Data Sources icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/database-plugin.icons.expui.manageDataSources.svg) Data Sources.

* Press `Shift+Enter` (Windows), `⌘ I` (macOS), `⇧ ⏎` (IntelliJ IDEA Classic (macOS)), `⌘ I` (macOS System Shortcuts), `Shift+Enter` (XWin), `Shift+Enter` (GNOME), `Shift+Enter` (KDE), `Shift+Enter` (Emacs), `Shift+Enter` (Sublime Text), `⌘ I` (Sublime Text (macOS)), `Shift+Enter` (NetBeans), `Shift+Enter` (Visual Studio), `⌘ I` (Visual Studio (macOS)), `Shift+Enter` (Eclipse), `⌘ I` (Eclipse (macOS)) .

![Open the Data Source and Drivers dialog](https://resources.jetbrains.com.cn/help/img/idea/2026.2/open_data_sources_and_drivers_dialog.png)

2. In the left pane of the dialog, select the data source that you want to delete and click ![](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.remove.svg) Remove on the toolbar.

* To delete a data source in the Data Sources and Drivers dialog via its context menu, in the left pane of the dialog, right-click the data source that you want to delete and select Remove.

> **Tip:**
> You can also select the data source that you want to delete and press `Delete` (Windows), `⌦` (macOS), `⌦` (IntelliJ IDEA Classic (macOS)), `⌦` (macOS System Shortcuts), `Delete` (XWin), `Delete` (GNOME), `Delete` (KDE), `Delete` (Emacs), `Delete` (Sublime Text), `⌦` (Sublime Text (macOS)), `Delete` (NetBeans), `Delete` (Visual Studio), `⌦` (Visual Studio (macOS)), `Delete` (Eclipse), `⌦` (Eclipse (macOS)).

## Configure display options for data sources

You can group, assign a color, and filter objects in the   Database   tool window  ( `View  | Tool Windows |  Database` ).

Procedure: Group data sources in folders

IntelliJ IDEA allows to move a data source to a new folder or to an existing one.

* To move a data source to a new folder, do the following:

1.

Right-click the item and select `Move | To Folder`. Alternatively, press `F6` (Windows), `F6` (macOS), `F6` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ I` (macOS System Shortcuts), `F6` (XWin), `F6` (GNOME), `F6` (KDE), `F6` (Emacs), `F6` (Sublime Text), `F6` (Sublime Text (macOS)), `Ctrl+M` (NetBeans), `Ctrl+R, O` (Visual Studio), `⌘ R, O` (Visual Studio (macOS)), `Alt+Shift+V` (Eclipse), `⌘ ⌥ V` (Eclipse (macOS)).

2.

If there are no existing folders yet, IntelliJ IDEA will show the New Folder dialog. If there are existing folders already, the Move to Folder popup will appear. In the popup, select New Folder.

3.

In the New Folder dialog, type the folder name. You can use a forward slash (`/`) to define nesting. For example, the `QA/Quick` name will create the `Quick` folder inside the `QA` folder.

![Create a new folder to group data sources](https://resources.jetbrains.com.cn/help/img/idea/2026.2/move_to_folder_create.png)

* To move a data source to an existing folder, do the following:

1.

Right-click the item and select `Move | To Folder`. Alternatively, press `F6` (Windows), `F6` (macOS), `F6` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ I` (macOS System Shortcuts), `F6` (XWin), `F6` (GNOME), `F6` (KDE), `F6` (Emacs), `F6` (Sublime Text), `F6` (Sublime Text (macOS)), `Ctrl+M` (NetBeans), `Ctrl+R, O` (Visual Studio), `⌘ R, O` (Visual Studio (macOS)), `Alt+Shift+V` (Eclipse), `⌘ ⌥ V` (Eclipse (macOS)).

2. From the Move to Folder popup, select the target folder.

![Move an item to a folder](https://resources.jetbrains.com.cn/help/img/idea/2026.2/database_tree_move_to_folder.png)

To undo an operation, press `Ctrl+Z` (Windows), `⌘ Z` (macOS), `⌘ Z` (IntelliJ IDEA Classic (macOS)), `⌘ Z` (macOS System Shortcuts), `Ctrl+Z` (XWin), `Ctrl+Z` (GNOME), `Ctrl+Z` (KDE), `Ctrl+Shift+Minus` (Emacs), `Ctrl+Z` (Sublime Text), `⌘ Z` (Sublime Text (macOS)), `Ctrl+Z` (NetBeans), `Ctrl+Z` (Visual Studio), `⌘ Z` (Visual Studio (macOS)), `Ctrl+Z` (Eclipse), `⌘ Z` (Eclipse (macOS)).

> **Tip:**
> Additionally, you can move a data source to an existing folder by dragging it there.

Procedure: Assign a color to a data source

1. In   Data Sources and Drivers  dialog (  `Shift+Enter` (Windows), `⌘ I` (macOS), `⇧ ⏎` (IntelliJ IDEA Classic (macOS)), `⌘ I` (macOS System Shortcuts), `Shift+Enter` (XWin), `Shift+Enter` (GNOME), `Shift+Enter` (KDE), `Shift+Enter` (Emacs), `Shift+Enter` (Sublime Text), `⌘ I` (Sublime Text (macOS)), `Shift+Enter` (NetBeans), `Shift+Enter` (Visual Studio), `⌘ I` (Visual Studio (macOS)), `Shift+Enter` (Eclipse), `⌘ I` (Eclipse (macOS)) ) , select the data source for which you want to assign a color.

2. Click the circle in the Name field to select a color.

3. Apply the changes and close the dialog.

> **Tip:**
> For more examples about using colors with data sources, refer to [the following video at youtube.com](https://www.youtube.com/watch?v=U5SOD-eeK50&t=250s).

Procedure: Use full names of data sources

By default, the Shorten Tab Titles option is enabled. A data source name in the tab title is shortened to 36 characters.

* Right-click a tab of a query console and select Shorten Tab Titles.

[Video](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_shorten_names_of_data_sources.mp4)

## Share data sources

In IntelliJ IDEA, you can share data sources between different projects within a single IDE instance and also between different IDE instances. To share data sources between projects, you have to change their accessibility level. To share data sources between IDEs, you have to either copy and paste them or use the IDE settings export and import features.

### Share data sources between projects

Data sources in IntelliJ IDEA are available at two levels: project and global. The project level means that you can access a data source only from the project where this data source was created initially. At the global level, a data source is available for other projects. By default, a data source is available at the project level.

To share a data source between different projects inside your IDE, you need to move the data source to the global level.

Procedure:

1. In the   Database   tool window ,  click ![the Data Source Properties button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/database-plugin.icons.expui.manageDataSources.svg) Data Source Properties on the toolbar.

2. In the   Data Sources and Drivers  dialog (  `Shift+Enter` (Windows), `⌘ I` (macOS), `⇧ ⏎` (IntelliJ IDEA Classic (macOS)), `⌘ I` (macOS System Shortcuts), `Shift+Enter` (XWin), `Shift+Enter` (GNOME), `Shift+Enter` (KDE), `Shift+Enter` (Emacs), `Shift+Enter` (Sublime Text), `⌘ I` (Sublime Text (macOS)), `Shift+Enter` (NetBeans), `Shift+Enter` (Visual Studio), `⌘ I` (Visual Studio (macOS)), `Shift+Enter` (Eclipse), `⌘ I` (Eclipse (macOS)) )  that opens, select the data source you want to make global, right-click it and select ![the Make Global icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.export.svg) Make Global.

Alternatively, click ![the Make Global icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.export.svg) Make Global on the toolbar.

![Make a data source global in the Data Source and Drivers dialog](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_data_sources_make_global.png)

3. Click OK to    save your changes and close the dialog  .

To make a data source local again, click ![the Move to Project icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.import.svg) Move to Project that replaces ![the Make Global icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.export.svg) Make Global for the data source.

![Global and project level data sources in the Data Source and Drivers dialog](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_data_sources_global.png)

### Share data sources between IDE instances

In IntelliJ IDEA, you can share data sources by either copying their settings to clipboard or using the XML file that includes settings for all the project data sources. Also, you can export and import the file using the IDE settings export and import features.

> **Note:**
> The resulted XML does not include password information, unless it was provided within a JDBC URL for the URL only connection type.  For more information about this connection type, refer to  [Data Source and Drivers dialog reference topic](data-sources-and-drivers-dialog.html#url_only).

The reason is that IntelliJ IDEA does not have its own password store. It either uses the native password management system or KeePass. To change the way your IDE stores passwords, in IDE settings `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)), navigate to `Appearance & Behavior | System Settings | Passwords`.  For more information about storing passwords in IntelliJ IDEA, refer to  the [Passwords](reference-ide-settings-password-safe.html) topic.

Procedure: Copy data sources to clipboard

In IntelliJ IDEA, you can copy a data source to the clipboard. When you do this, the IDE copies the connection settings as an XML snippet. You can paste the snippet to another IDE and create a copy of your original data source there.

1. In the   Database   tool window ,  select the data source you want to copy.

2. Right-click the selected data source and navigate to `Copy/Paste | Copy Data Source` to copy your data source to the clipboard. Alternatively, press `Ctrl+C` (Windows), `⌘ C` (macOS), `⌘ C` (IntelliJ IDEA Classic (macOS)), `⌘ C` (macOS System Shortcuts), `Ctrl+C` (XWin), `Ctrl+C` (GNOME), `Ctrl+C` (KDE), `Ctrl+Insert` (Emacs), `Ctrl+C` (Sublime Text), `⌘ C` (Sublime Text (macOS)), `Ctrl+C` (NetBeans), `Ctrl+C` (Visual Studio), `⌘ C` (Visual Studio (macOS)), `Ctrl+C` (Eclipse), `⌘ C` (Eclipse (macOS)).

IntelliJ IDEA copies the XML snippet with connection settings.

3. Switch to the target IDE or send the data source to another user.

4. In the target IDE, open   Database   tool window .

5. In the   Database   tool window , click ![the New icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) New and select Import from Clipboard. Alternatively, right-click the   Database   tool window  and select `Copy/Paste | Paste Data Source` (or press `Ctrl+V` (Windows), `⌘ V` (macOS), `⌘ V` (IntelliJ IDEA Classic (macOS)), `⌘ V` (macOS System Shortcuts), `Ctrl+V` (XWin), `Ctrl+V` (GNOME), `Ctrl+V` (KDE), `Shift+Insert` (Emacs), `Ctrl+Shift+V` (Sublime Text), `⌘ ⇧ V` (Sublime Text (macOS)), `Ctrl+V` (NetBeans), `Ctrl+V` (Visual Studio), `⌘ V` (Visual Studio (macOS)), `Ctrl+V` (Eclipse), `⌘ V` (Eclipse (macOS))).

6. In the   Data Sources and Drivers  dialog (  `Shift+Enter` (Windows), `⌘ I` (macOS), `⇧ ⏎` (IntelliJ IDEA Classic (macOS)), `⌘ I` (macOS System Shortcuts), `Shift+Enter` (XWin), `Shift+Enter` (GNOME), `Shift+Enter` (KDE), `Shift+Enter` (Emacs), `Shift+Enter` (Sublime Text), `⌘ I` (Sublime Text (macOS)), `Shift+Enter` (NetBeans), `Shift+Enter` (Visual Studio), `⌘ I` (Visual Studio (macOS)), `Shift+Enter` (Eclipse), `⌘ I` (Eclipse (macOS)) )  dialog that opens, enter the password for the database or schema you are connecting to with this data source.

7. Click OK to      save your new data source and close the dialog.

[Video](https://resources.jetbrains.com.cn/help/img/idea/2026.2/share_between_different_ide_instances.mp4)

For every IntelliJ IDEA project, there is a `dataSources.xml` file that stores settings for all data sources of the project. By copying this file, you can share the data sources with another IDE instance. Also, you can store the file under VCS to keep track of changes and to synchronize the data sources list between several users.

The `dataSources.xml` file is stored under the `.idea` subdirectory of a dedicated project settings directory in the [IDE projects directory](directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html).

Procedure: Locate the dataSources.xml file

1. In the  Project tool window ,  expand the project directory and `.idea` directory nodes and locate the `dataSources.xml` file.

2. Right-click the `dataSources.xml` file and select `Open In | <file browser>`.

![Locate the dataSources.xml file](https://resources.jetbrains.com.cn/help/img/idea/2026.2/datasources_xml_file_location.png)

You can also export and import the data source settings file by using the IDE settings export and import feature with the `settings.zip` file. The `settings.zip` file includes only data sources that are available at the global level.  For more information about changing a level, refer to  [Change the project level to global](#share-data-sources-between-different-projects).

Procedure: Export global data source settings to a ZIP archive

> **Note:**
> You can export only [global data sources](#share-data-sources-between-different-projects). If you have no global data sources, you will not see Database: global data sources on the export list.

1. Select `File | Manage IDE Settings | Export Settings` from the main menu.

2. In the Export Settings… window, click Select None.

3. In the Export Settings… window, select Database: global data sources.

> **Tip:**
> You can also export JDBC drivers settings and various user settings (for example, user parameter patterns) by selecting Database: drivers and Database: settings from the list. Ensure that you downloaded or created at least one driver. Otherwise, the Database: drivers menu item will not appear on the list.

4. In the Export settings to field, specify a path to the directory where you want to store the `settings.zip` file.

![alt_export_sata_sources_settings_zip](https://resources.jetbrains.com.cn/help/img/idea/2026.2/share_data_source_settings_export_archive.png)

Procedure: Import global data source settings from a ZIP archive

1. Select `File | Manage IDE Settings | Import Settings…` from the main menu.

2. In the file browser window, locate the `settings.zip` file that you exported, and select it.

3. In the Select Components to Import window, select Database: global sources.

> **Tip:**
> You can also select other components to import. For example, Database: drivers and Database: settings.

4. Click OK.

5. In the Restart Needed window, click OK to restart your IDE.

6. Open the   Data Sources and Drivers  dialog (  `Shift+Enter` (Windows), `⌘ I` (macOS), `⇧ ⏎` (IntelliJ IDEA Classic (macOS)), `⌘ I` (macOS System Shortcuts), `Shift+Enter` (XWin), `Shift+Enter` (GNOME), `Shift+Enter` (KDE), `Shift+Enter` (Emacs), `Shift+Enter` (Sublime Text), `⌘ I` (Sublime Text (macOS)), `Shift+Enter` (NetBeans), `Shift+Enter` (Visual Studio), `⌘ I` (Visual Studio (macOS)), `Shift+Enter` (Eclipse), `⌘ I` (Eclipse (macOS)) ) , enter necessary connection credentials in the data source properties. If the data source is on a local or network drive, ensure that the path to this data source is correct.

7. To ensure that the connection to the data source is successful, click Test Connection.

![alt_import_sata_sources_settings_zip](https://resources.jetbrains.com.cn/help/img/idea/2026.2/share_data_source_settings_import_archive.png)

## Tips and tricks

Procedure: Share all the connections with passwords

1. Open settings by pressing `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) and navigate to `Appearance & Behavior | System Settings | Passwords`.

2. Select the In KeePass option.

3. In the Database field, specify a path for the KDBX file in the directory where you store your project.

4. Copy the whole directory with your project to another computer.

5. On another computer, open settings by pressing `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) and navigate to `Appearance & Behavior | System Settings | Passwords`.

6. In the Database field, type a path to the copied KDBX file.

7. Click `File | Open…` and navigate to the directory with copied project files.

## See also

### Reference

[Data sources and their elements](database-tool-window.html#icons-for-data-sources-and-their-elements) [Data Sources and Drivers dialog](data-sources-and-drivers-dialog.html)

### Tool Windows

[Database tool window](database-tool-window.html)

