I am new to ADF, I am trying to connect with SQL Server through SSMS setup from my local system. For this, I have created a keyvault in Azure and stored username and passsword into that. Also I have setup Azure self hosted integration run time. However, when I try to create a connection in ADF for Azure Key vault it is through below error:
2
Answers
Issue: As already mentioned above the error, I have created a user/login in SSMS(SQL Server) and trying to connect it with ADF to read from SQL Server database. All permissions are already granted to that user also I have created the access policy so it can read from key vault using my ADF instance. Still I was facing error.
Solution:
I was connecting with SQL server authentication in my ADF, however my SSMS instance was default set to windows authentication. I clicked on the server->properties->security then switch from Windows Authentication Mode to SQL Server and Windows Authentication mode
Then I expand security folder, here right click on my login->properties->status, here login should be enabled
Then closed the SSMS instance, and open SQL Server Configuration Manager to restart SQL Server Service. Once restarted, then use SQL Server Authentication mode to connect and it was successful. Verfied it from connecting it with my ADF instance as well.
The error indicates that Login failed for user. There is an issue with the user credential. Ensure that you have entered the correct credential, and verify that the user has the necessary permissions to access the mentioned database. If the user lacks permissions, you may encounter login issues like the one above.
By connecting to the same database you are attempting to connect to in ADF through SSMS or Azure Data Studio with the same credentials, you can check the user’s permissions. Alternatively, execute the command below to find the user’s access to the database:
HAS_DBACCESS returns 1 if the user has access to the database, 0 if the user has no access, and NULL if the database name is not valid.
Using the correct credentials and granting the required user permissions to access the database will allow you to connect to the database in ADF successfully, as shown below: