Skip to main content

Connect

Description

This activity connects to the specified database and gives the database context handle needed for other operations on the attached database. It lets you specify the Connection String to connect. You are also allowed to specify the provider for the connection.

Configuration

To configure the database connection, you must go to the Connection Builder dialog by clicking the Edit Connection button in this activity's user interface.

Connection String Builder

Connection Builder dialog helps build ODBC connection string behind the scenes by providing the user with a simple user interface.

It allows you to perform the following functions through UI:

note

You can manually select an alternative from the dropdown menu if you prefer to use a driver other than the one automatically chosen.

  • You can verify the connection by clicking on Test Connection, ensuring a successful link is established.

Microsoft SQL Server

Once you select this option, the following screen is where you can provide SQL Server connection configuration.

MS SQL Database Connection Config

  • Server name – Specify the Microsoft SQL Server name or IP address.
  • Authentication type – Choose the appropriate authentication type.
Authentication typeDescription
Server authenticationChoosing this type requires users to provide an SQL Server username and password to connect to the database.
Windows authenticationChoosing this authentication type leverages the user's Windows login credentials to grant access to the database. If you log into a Windows machine with a valid user account, you can use these credentials to access SQL Server without providing a separate username and password.
  • User name – Specify the user name for connecting to the database.
  • Password – Specify the password for the user name.
  • Database – Select the database from the dropdown or provide the name directly in the expression box.

SQLite

Once you select this option, the following screen is where you can provide SQLite connection configuration.

SQLite Connection Config

  • Database File – Specify the SQLite Database File.
  • Password - Specify the password for the Database File.

PostgreSQL

Once you select this option, you can provide PostgreSQL connection configuration on the following screen.

PostgreSQL Database Connection Config

  • Server name – Specify the PostgreSQL Server name or IP address
  • Port – Specify the port number to connect to the PostgreSQL server.
  • User name – Specify the user name for connecting to the database.
  • Password - Specify the password for the user name.
  • Database – Select the database from the dropdown or provide the name directly in the expression box.

MySQL

Once you select this option, the following screen is where you can provide MySQL connection configuration.

MySQL Database Connection Config

  • Server name – Specify the MySQL Server name or IP address

  • Port – Specify the port number to connect to the MySQL server.

  • User name – Specify the user name for connecting to the database.

  • Password - Specify the password for the user name.

  • Database – Select the database from the dropdown or provide the name directly in the expression box.

  • SSL Mode – Choose SSL Mode from dropdown. The SSL (Secure Sockets Layer) mode is a configuration option that determines how the MySQL client and server establish secure connections using SSL/TLS encryption. Secure connections are essential to protect the confidentiality and integrity of the MySQL client and server data. Here are the supported SSL modes.

    SSL ModeDescription
    PreferredIn the PREFERRED mode, the MySQL client attempts to connect using SSL encryption if the server supports it. If the server doesn't support SSL, the connection proceeds without encryption.
    NoneIn this mode, SSL encryption is completely disabled, and MySQL establishes connections without encryption.

Oracle

Once you select this option, the following screen is where you can provide Oracle connection configuration.

Oracle Database Connection Config

  • Server name – Specify the Oracle Server name or IP address
  • Port – Specify the port number to connect to the Oracle server.
  • User name – Specify the user name for connecting to the database.
  • Password - Specify the password for the user name.
  • Database – Specify the Service ID (SID) here.

Custom Connection String

If you want to connect to a database provider not listed here, you can select the Custom Connection String option to provide your ODBC connection string directly.

Custom Connection Config

ODBC Data Source Name (DSN)

  • When selecting a provider, the dialog automatically selects the best suitable ODBC driver installed on your machine for the chosen database provider.

    ODBC Data Source Name

  • Data source name – Choose the drivers in your system listed in the dropdown.

note

Before using this activity, you must install the ODBC driver for the corresponding database provider. If no drivers for the selected database provider are on your system, the driver dropdown selection will be left empty.

  • User name – Specify the user name for connecting.
  • Password - Specify the password for the user name.

Property

Misc

  • DisplayName – Add a display name to your activity.
  • Private – By default, activity will log the values of your properties inside your workflow. If private is selected, then it stops logging.

Optional

  • Continue On Error – Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (True, False). The default value is False.
    note

    If you include this activity in Try Catch and the value of this property is True, it will catch no error during the execution of the project.

Output

  • Database Context – The activity returns the context variable of the database. You can subsequently use it for other database operations.

Example

Download Example

Connect