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
Release : 11.3/11.4/11.5/12.x
Component : CA Workload Automation Database Agent
Database: MS-SQL
The Agent may not have correct JDBC driver or connection string.
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.