While using Liquibase for connecting MSSQL for specific database using integratedsecurity, I am getting error as shown below.
“Unexpected error running Liquibase: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database “Test” requested by the login. The login failed. ClientConnectionId:499723ca-6d22-4f54-b91d-cbf323caab81”
When we verify in MSSQL logs, we could see user id thats used for login as “NT AUTHORITY/SYSTEM” Logs:
2020-12-08 12:58:33.25 Logon Error: 18456, Severity: 14, State: 38.
2020-12-08 12:58:33.25 Logon Login failed for user ‘NT AUTHORITY\SYSTEM’. Reason: Failed to open the explicitly specified database ‘Test’. [CLIENT: XXXXX]
Could you please let me know how to resolve this issue.
I am not an expert at configuring Integrated Security on MSSQL but, I do have some experience with issues configuring liquibase. I noticed that in the logs you provided it says:
Why is it looking for:
Could you post the exact command line you are running?
Have you tried using: domain/testuser instead of domain\testuser (I wonder if it is seen as an escape char)?
Hi @ronak ,
I tried with escape characters and gave direct names as well, all options didnt work. It always tries to connect with ‘NT AUTHORITY\SYSTEM’. Not sure whats the problem here.