I have SQL Server 2016 set up on an AlwaysOn Availability Group, with a listener.
I am trying to establish a connection to the SQL database using the following with Windows Authentication:
SQLCA.DBMS = "SNC SQL Native Client(OLE DB)"
SQLCA.ServerName = "AvailabilityGroupListener,12345"
SQLCA.AutoCommit = False
SQLCA.DBParm = "TrustedConnection=1,Database='DB_Test',Provider='SQLNCLI11'"
Now, when I try to execute the connection/application using my own account, it works perfectly. When I try to execute the connection using a test account, it gives the following error (executed from Windows Server 2008R2):
SQLSTATE=28000
Microsoft SQL Server Native Client 11.0
Login failed for user 'Domain\Test_User"
I have given the test account and my account all have the appropriate SQL permissions (datareader). I have even tried granting sysadmin to the test account.
The SQL Instance is configured for mixed mode authentication, remote connections are enabled, and TCP/IP is enabled as well.
Can anyone tell me why I am getting that security error?