> For the complete documentation index, see [llms.txt](https://help.protecto.ai/getting-started/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.protecto.ai/getting-started/protecto-overview/introduction/add-new-data-source/azure-sql/connect-using-database-user-credentials.md).

# Connect using database user credentials

This method needs a database user with db\_datareader role (for sampling data) and view definition privilege (for access policy).

**Steps:**

1. Create SQL login in master database.\
   **Query**

   CREATE LOGIN \[testLogin] WITH PASSWORD = '\<strong\_password\_goes\_here>';<br>
2. Switch to the database and Add Database user for above login.\
   **Query**\
   CREATE USER \[testUser] FROM LOGIN \[testLogin];<br>
3. Add user to default database role (db\_datareader) and grant view definition privilege.\
   **Query**

   ALTER ROLE db\_datareader ADD MEMBER \[testUser];

   GRANT VIEW DEFINITION TO \[testUser];

**Required Parameters:**

* Server name (example: testdb.database.windows.net)
* Database name
* Login name
* Password
