IntelliJ IDEA 2020.3 Help

Database connection

To issue a query to a database, you must create a data source connection. Data source is the location of your data and can be a server or a DDL file. The data source includes a name and connection settings that are dependent on the data source type.

Amazon Redshift

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select Amazon Redshift.

  3. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  4. From the Connection type list, select a type of connection that you want to use:

    • Default: connect by using Host, Port, and Database.

    • IAM cluster/region: connect by using Database, Region, and Cluster.

    • URL only: connect by using the JDBC URL that you can copy in settings of your Amazon Redshift cluster.

  5. From the Authentication list, select an authentication method.

    • pgpass: by using the PGPASS file. You can store this file in the user's home directory (for example, /Users/jetbrains/.pgpass ). You can read more about the password file in The Password File at postgresql.org.

    • User & Password: by using your login and password.

    • AWS profile: by using a named profile. A named profile is a collection of settings and credentials that you can use for authentication. Named profiles are stored in CREDENTIALS files. Default directories for these files are ~/.aws/credentials (Linux and macOS) and %USERPROFILE%\.aws\credentials (Windows).

  6. In your Redshift dashboard, create a Redshift cluster.

    For more information about the Amazon Redshift cluster, read Getting Started with Amazon Redshift.

  7. In settings of the Redshift cluster, copy the JDBC URL.

  8. Paste the JDBC URL from the Redshift cluster settings to the URL field in IntelliJ IDEA.

  9. In User and Password fields, specify your Redshift credentials.

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

Integration with Amazon Redshift

Apache Cassandra

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select Apache Cassandra.

  3. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  4. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set empty.

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

Integration with Apache Cassandra

Apache Derby

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select Apache Derby.

  3. From the Driver list, select the type of the JDBC driver that you want to use. For remote connections, select Apache Derby (Remote). For embedded databases, select Apache Derby (Embedded).

  4. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  5. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set empty.

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

Integration with Apache Derby

Apache Hive

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select Apache Hive.

  3. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  4. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set empty.

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

Integration with Apache Hive

Azure SQL Database

Microsoft Azure supports PostgreSQL, MySQL, MariaDB, and other Database Management Systems (DBMS). If you want to connect to these data sources, create data source connections that correspond to these DMBS. In IntelliJ IDEA, these connections already include necessary JDBC drivers. So, if you want to connect to the Azure database for PostgreSQL, create the PostgreSQL connection.

  1. In your Microsoft Azure account, create an SQL data source. For more information about the Azure SQL Database, read Azure SQL Database Documentation.

  2. In IntelliJ IDEA, navigate to File | Data Sources Shift+Enter.

  3. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select Azure SQL Database.

  4. At the bottom of the data source settings area, click the Download missing driver files link.

  5. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set empty.

  6. To use Azure Active Directory Authentication, select Azure Active Directory password from the Authentication list. You might need to download additional libraries for Active Directory Authentication. To use SQL authentication, select User & Password.

    Note: the Use Windows domain authentication checkbox is available only on Windows.

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

Integration with Azure SQL Database

ClickHouse

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select ClickHouse.

  3. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  4. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set empty.

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

Integration with ClickHouse

Couchbase Query

IntelliJ IDEA supports the Couchbase Query Query service, not the Couchbase Query Analytics service.

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select Couchbase Query.

  3. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  4. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    You can skip the port field or set the port number to 11210 that is the default port for the Couchbase Query Query Service.

    To delete a password, right-click the Password field and select Set empty.

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

Integration with Couchbase Query

Exasol

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select Exasol.

  3. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  4. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set empty.

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

Integration with Exasol

Greenplum

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select Greenplum.

  3. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  4. From the Authentication list, select an authentication method.

    • pgpass: by using the PGPASS file. You can store this file in the user's home directory (for example, /Users/jetbrains/.pgpass ). You can read more about the password file in The Password File at postgresql.org.

    • User & Password: by using your login and password.

  5. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set empty.

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

Integration with Greenplum

H2

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select H2.

  3. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  4. From the Connection type list, select the connection mode: Remote, In-memory, Embedded. For more information about these modes, see the official H2 documentation.

  5. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set empty.

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

Integration with H2

HSQLDB

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select HSQLDB.

  3. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  4. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set empty.

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

Integration with HSQLDB

IBM Db2 LUW

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select IBM Db2 LUW.

  3. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  4. From the Connection type list, select the connection mode that you want to use: Type 2 or Type 4. In the user interface, if compared to Type 2, Type 4 has Host and Port fields.

  5. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set empty.

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

Integration with IBM Db2 LUW

MariaDB

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select MariaDB.

  3. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  4. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set empty.

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

Integration with MariaDB

Microsoft SQL Server

For more information about configuring Microsoft SQL Server, Windows domain authentication, and user permissions, see How to connect to MS SQL server in the IntelliJ IDEA documentation.

For more information about connecting to LocalDB, see How to connect to SQL Server Express LocalDB in the DataGrip documentation.

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select Microsoft SQL Server.

  3. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  4. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set empty.

  5. The Instance field is optional.

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

Integration with Microsoft SQL Server

MongoDB

In MongoDB, for authentication, you must provide a username, password, and the authentication database that is associated with this username. If the authentication database differs from the database to which you want to connect, specify the authentication database with the authSource parameter in the URL. If no authentication database is specified, MongoDB uses the admin database by default.

For example, you want to connect to the local database but your authentication database is admin. In this case, the connection URL will look like: mongodb://localhost:27017/local?authSource=admin.

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select MongoDB.

  3. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  4. From the Connection type list, select your connection type:

  5. Specify database connection details: a login, a password, and the database that you want to connect to. To set an empty password, right-click the Password field and select Set empty.

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

Integration with MongoDB

MySQL

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select MySQL.

  3. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  4. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set empty.

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

Integration with MySQL

Oracle

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select Oracle.

  3. At the bottom of the data source settings area, click the Download missing driver files link.

  4. From the Connection type list, select a connection type:

    • SID: to use a unique name of an Oracle instance (a process that runs on the workstation).

    • Service name: to use an alias to an Oracle instance (or many instances).

    • TNS: to use tnsnames.ora configuration file. In the TNSADMIN field, specify a path to the folder with tnsnames.ora. In the TNS name field, specify what service name to use (see a value of net_service_name in tnsnames.ora) if you have more than one service.

    • URL only: to use the JDBC URL.

  5. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set empty.

  6. From the Driver list, specify the driver type. For more information about driver types, see Oracle JDBC FAQ.

  7. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

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

Integration with Oracle

PostgreSQL

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select PostgreSQL.

  3. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  4. From the Authentication list, select an authentication method.

    • pgpass: by using the PGPASS file. You can store this file in the user's home directory (for example, /Users/jetbrains/.pgpass ). You can read more about the password file in The Password File at postgresql.org.

    • User & Password: by using your login and password.

  5. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set empty.

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

Integration with PostgreSQL

Snowflake

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select Snowflake.

  3. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  4. From the Authentication list, select an authentication method.

  5. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set empty.

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

Integration with Snowflake

SQLite

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select SQLite.

  3. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  4. To connect to an existing SQLite database, specify a file path to the database file in the File field.

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

Integration with SQLite

Sybase ASE

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select Sybase ASE.

  3. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  4. From the Authentication list, select an authentication method.

    • Domain credentials: by using domain authentication.

    • User & Password: by using your login and password.

  5. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set empty.

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

Integration with Sybase ASE

Vertica

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select Vertica.

  3. At the bottom of the data source settings area, click the Download missing driver files link. As you click this link, IntelliJ IDEA downloads drivers that are required to interact with a database. To decrease the size of the installation package and keep driver versions up-to-date, drivers are not bundled with the IDE.

    You can specify your own drivers for the data source if you do not want to download the provided drivers. For more information about creating a database connection with your driver, see Add a user driver to an existing connection.

  4. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set empty.

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

Integration with Vertica

Other

Currently, IntelliJ IDEA supports vendors that are mentioned previously. The support includes such features as enhanced code completion and better retrieval of database objects (introspection). If your vendor is not in the list, you still can connect to the database with a JDBC driver.

Create a connection to a database with a JDBC driver

If you cannot find a name of a database vendor in the list of data sources, download a JDBC driver for the database management system (DBMS), and create a connection in IntelliJ IDEA. With the JDBC driver, you can connect to DBMS and start working.

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select Driver and Data Source.

  3. Click the User Driver link.

  4. In the Driver files pane, click the Add icon (The Add icon) and select Custom JARs.

  5. Navigate to the JAR file of the JDBC driver, select it, and click OK.

  6. In the Class field, specify the value that you want to use for the driver.

  7. Click Apply.

  8. Return to the created data source connection.

  9. Specify database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set empty.

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

    Connect to a database with a user driver

Specify a library path for a driver

To work properly, some JDBC drivers require a path to library files along with the driver.

For example, to determine if the application should operate in the Instant Client mode, Oracle Instant Client (OCI) applications look for library files in the runtime library search path (LD_LIBRARY_PATH on Linux or PATH on Windows). You can set these paths in the Data Sources and Drivers dialog.

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the driver entry to which you want to add a path to library files.

  3. (Optional) Add a driver for which you want to add library files. If the existing driver does not meet the requirements, replace the existing driver. To delete the existing driver entry, select the driver and click Remove. For more information about adding a driver, see Create a connection to a database with a JDBC driver.

  4. In the Driver files pane, click the Add icon (The Add icon) and select Native Library Path.

  5. Navigate to the folder with library files. Ensure that the driver version corresponds to the version of these library files. For example, if you use the driver version 19.6, the attached library files must also have the 19.6 version.

    Working with the Native Library Path

DDL data source

SQL files that contain data definition language statements (DDL statements) can be used as data sources. As a result, you can reference all tables, columns and other objects defined in such files in the editor.

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select DDL Data Source.

  3. In the DDL Files pane, click the Add button the Add button.

  4. In the file browser, navigate to the SQL file or files with DDL statements and click Open.

  5. Click Apply.

  6. In the SQL Dialects dialog, select a dialect that you want to use for the added SQL file.

  7. Apply settings and click OK.

    Create a DDL data source

Productivity tips

Create a data source from the JDBC URL

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon The Data Source Properties icon.

  2. In the Data Sources and Drivers dialog, click the Add icon (The Add icon) and select Data Source from URL.

  3. In the URL field, paste the JDBC URL.

  4. From the Driver list, select the necessary driver for the data source.

  5. In the Data Sources and Drivers dialog, enter credentials.

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

Create a data source from the JDBC URL
Last modified: 08 March 2021