CA WA Agent for Database - Login fails for user when accessing MS-SQL database
search cancel

CA WA Agent for Database - Login fails for user when accessing MS-SQL database

book

Article ID: 138615

calendar_today

Updated On:

Products

CA Workload Automation DE - Business Agents (dSeries) CA Workload Automation AE - Business Agents (AutoSys) Workload Automation Agent

Issue/Introduction

When a user tries to run a DB job the following errors may be seen.

java.sql.SQLException: Login failed for user 'someuser'

The login is from an untrusted domain and cannot be used with Windows authentication

 

Environment

Release : 11.3/11.4/11.5/12.x

Component : CA Workload Automation Database Agent

Database: MS-SQL

Cause

The Agent may not have correct JDBC driver or connection string.

Resolution

1. Update the db.default.url in agentparm.txt with ‘jdbc:jtds:sqlserver=’ and the database, instance name (if any)  as below:

db.default.url=jdbc:jtds:sqlserver://sqlhost.example.com:1433/SOME_INSTANCE;DatabaseName=SOME_DB;DOMAIN=<domain>;useNTLMv2=true

or, with no DB instance name;

db.default.url=jdbc:jtds:sqlserver://sqlhost.example.com:1433;DatabaseName=SOME_DB;DOMAIN=<domain>;useNTLMv2=true

Note: Use  DOMAIN=<domain> and useNTLMv2=true for windows authentication

2. Make sure that the db.default.password (encrypted) is correct in agentparm.txt. Verify or encrypt the password using the password utility provided with the Agent.  

Go to <agent_install_directroy> and run password utility. For example;

password <your_password>

Encrypted password: <encrypted password>

3. Download and install the latest  jTDS driver.  Use 1.3 or above.

After downloading the zip file, unzip it.  Copy jtds-1.3.x.jar the to the <agent_install_directroy>/jars/ext directory.

Note: Do not put multiple jTDS drivers in the agent.  Remove older jar file if an older jTDS driver (jar file)  exists in  <agent_install_directroy>/jars/ext.  

Do not rename it, as it can still be read by the Agent.  

4. Restart the agent after the above changes have been made.