# Connect to an Azure database

Perform the following steps to connect to your database:

1. Start the PDI client and create a new transformation or job.

   See the **Pentaho Data Integration** document for instructions on creating a PDI transformation.

   **Note:** You can also use the Pentaho User Console to make this connection. See [Define data connections](/install/10.2-install/pentaho-configuration/tasks-to-be-performed-by-a-pentaho-administrator/define-data-connections.md)
2. In the **View** tab of the **Explorer** pane, double-click on the **Database connections** folder. The **Database Connection** dialog box appears, as shown below:

   ![Database connection dialog for Azure SQL](/files/zRXA0Btv2v4q6nHrO8WJ)
3. Enter your database connection information.

   | Field                         | Description                                                                                                                                                                                                                                                                                                                                      |
   | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
   | **Host Name**                 | The name of the Azure SQL server instance.                                                                                                                                                                                                                                                                                                       |
   | **Database Name**             | The name of the Azure SQL database to which you are connecting.                                                                                                                                                                                                                                                                                  |
   | **Port Number**               | The TCP/IP port number. The Azure SQL Database service is only available through TCP port 1433. You must set your firewall to allow outgoing TCP communication on port 1433.                                                                                                                                                                     |
   | **Authentication method**     | The authentication method used to connect to the Azure SQL DB instance. The default is SQL Authentication.                                                                                                                                                                                                                                       |
   | **Username**                  | The username used to connect to the database.                                                                                                                                                                                                                                                                                                    |
   | **Password**                  | The password used to connect to the database.                                                                                                                                                                                                                                                                                                    |
   | **Always Encryption Enabled** | Select to use encryption. See [Use the Always Encryption Enabled option](/install/10.2-install/pentaho-configuration/tasks-to-be-performed-by-a-pentaho-administrator/define-data-connections/enter-database-connection-information/connect-to-an-azure-sql-database/use-the-always-encryption-option.md) for instructions on using this option. |
   | **Client id**                 | The unique client identifier, used to identify and set up a durable connection path to the server.                                                                                                                                                                                                                                               |
   | **Client Secret Key**         | The unique name of the key value in the Azure Key Vault.                                                                                                                                                                                                                                                                                         |
4. Click **Test**to verify your connection.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pentaho.com/install/10.2-install/pentaho-configuration/tasks-to-be-performed-by-a-pentaho-administrator/define-data-connections/enter-database-connection-information/connect-to-an-azure-sql-database/connect-to-azure-azure-sql-database.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
