# Access SQL-Database via ODBC driver in Leapwork

**Introduction**  
This article includes steps to configure ODBC Driver for SQL SERVER Database.

**Prerequisites**  
1. ODBC driver with 64-bit version must be installed on your system (install AccessDatabaseEngine_X64.exe from [here](https://www.microsoft.com/en-us/download/details.aspx?id=13255)).  
2. You must be able to access SQL database either by windows authentication or by SQL username and password.

**Configure ODBC**  
1. Open 64-bit ODBC App in your system.

2. Click **Add**.

3. Select SQL Server (as shown below) and click Finish.

4. Enter a logical name for ODBC data source, Name is used in database block as "Connection" while accessing the database from Leapwork.

5. Enter meaningful description. Select the database server you want to connect with, afterward click Finish.

6. Now next screen is meant for authentication, there can be two scenarios here:

- **Scenario 1:** With Windows NT authentication using network login ID, if you can access your SQL server with your windows credentials (without entering other username and password) then you need to use this option.

**Note**: If you choose this option then "Connection" in Leapwork database block should be defined as “ **SQL-DB**” (as defined in step no 4 above. Please remember there should be **No** spaces in the before and after connection string).

- **Scenario 2:** With SQL Server authentication using a login ID and password entered by the user, if you require a username and password to access SQL then you need to use this option.

**Note**: If you choose this option then the database connection in Leapwork should be defined as “ **DSN=TestEnvironment;Uid=UserName; PWD=for_defined_user**;”

7. After selecting Authentication choose the database you want to interact with this ODBC connection as shown below (attach database filename in case it is required) and press next.

8. Click Finish to complete the process.

9. After pressing Finish user will see below screen. Press "Test Data Source" to test the connection.

10. "TEST COMPLETED SUCCESSFULLY!!" message shown below shows that you are ready with connectivity.

11. Click **OK**. You are ready to access the database using Leapwork.

If you have any questions, please reach out to our [Priority Support](mailto:prioritysupport@leapwork.com) team.
