I am unable to connect to the Database using my Active Directory credentials. The database I am trying to connect to does not have any direct SQL logins and we can only access it using Active Directory.
Every time I try to connect, it says “Cannot open server requested by logon”.
And in Katalon we had a custom keyword that would handle the connection and the queries. We did not use the Katalon’s test data feature.
This example is for MySQL and not T-SQL. Please update the required fields to form a T-SQL connection. https://docs.katalon.com/katalon-studio/docs/connect_db_gui_testing.html
thanks grandson. i think starting from this we can extrapolate a working solution by using various tweaks (execute powershell or dig into powershell objects)
I was hoping there would be a more simple way of connecting. I would like to use Katalon’s test data feature and was hoping to get some guidance on what is wrong with the Connection URL and if I should or should not be checking the “Secure user and password” checkbox.
Hey,
So I investigated this further and if you do not have a Integrated Security=true or Trusted_Connection=true it will not work.
If you do not have the above mentioned, the only thing is using a dedicated sql user. Just ask your dba team and why you need it (you can even go to managers to escalate this and make sure you get a result). They will gladly help you. I just did sth similar in my current project. It involved some discussions but eventually the dba team gave up (they were blocking the progress of the entire automation project), bended some rules and I walked with the needed user. @Ibus what we did on the previous project is a little different. We already had the user.
@Mihai_Augustin_Sarat that’s why i summoned you on this matter, you are younger and more patient than I
i am getting older and starting to mix memories …
This is custom keyword which I am using to connect to sqlserver but its getting failed.
at TempTestCase1580391392461.run(TempTestCase1580391392461.groovy:23)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId:00fe6130-0b9a-4c90-8dc3-a8833cfbdc17
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1745)
at com.microsoft.sqlserver.jdbc.AuthenticationJNI.(AuthenticationJNI.java:58)
and here how to use it
public static void main(String[] args) {
ActiveDirectoryAuthentication authentication = new ActiveDirectoryAuthentication(“YOUR.DOMAIN.COM”);
try {
boolean authResult = authentication.authenticate(“Username”, “password”);
System.out.print("Auth: "; + authResult);
} catch (LoginException e) {
e.printStackTrace();
}
}