CA WAAE Scheduler and Application server services fail to start with error: CAUAJM_E_18601 SQLSTATE: 42000, Native error: 4,060, Message: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database "AEDB" requested by the login. The login failed.

Document ID : KB000004863
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

CA WA AutoSys Edition (AE) Scheduler and Application server services fail to start.The Scheduler log (event_demon.%AUTOSERV%) and the Application Server log (as_server.%AUTOSERV%) under %AUTOUSER%\out directory shows the following errors repeatedly.

CAUAJM_E_18600 Database function call <SQLDriverConnect> failed in <connect SQLDriverConnect Failed> with return code: -1
CAUAJM_E_18601 SQLSTATE: 42000, Native error: 4,060, Message: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database "AEDB" requested by the login. The login failed.
CAUAJM_E_10649 Server <MSSQLServerHost>,1433:AEDB was not available during connection operation.

 

Environment:
CA Workload Automation AutoSys Edition (AE) 11.3 or higherOperation System: Microsoft Windows 2008 or higherDatabase: Microsoft SQL Server 2005 or higher
Cause:

The Microsoft SQL Server Native error / message 4060 means that the login "autosys" was unable to connect to the database AEDB. The most common causes for this error include:

  • The Microsoft SQL Server Engine is not configured for mixed-mode authentication (SQL Server and Windows Authentication Mode)

 

  • The SQL Server login "autosys" is not mapped to the AEDB database (autosys user) and/or the "ujoadmin" role membership for AEDB is not granted. This could happen after a AEDB database delete-and-restore activity or relocation AEDB database from one SQL Server to another.

We can confirm the error using the MS SQL Server command-line interface sqlcmd, like so:

C:\>sqlcmd -U autosys -P <password> -d AEDB
Msg 4060, Level 11, State 1, Server <MSSQLServerHost>, Line 1
Cannot open database "AEDB" requested by the login. The login failed.
Msg 18456, Level 14, State 1, Server <MSSQLServerHost>, Line 1
Login failed for user 'autosys'.

 

Resolution:

1. Confirm that the Microsoft SQL Server is configured with mixed-mode authentication.

  • Connect to the SQL Server instance using SQL Server Management Studio using Windows Authentication (Administrator user).
  • Right-click on the Server name and click Properties.
  • On the Server Properties window, click on the Security page.
  • Select SQL Server and Windows Authentication mode under Server Authentication.
  • Click OK button

2. Map the "autosys" SQL Server login to the AEDB database and grant ujoadmin role membership.

  • Connect to the SQL Server instance using SQL Server Management Studio with Windows Authentication or as "sa" user (SQL Server Authentication)
  • Expand the Security tree under the SQL Server
  • Expand the Login sub-tree under Security
  • Right-click on the "autosys" login and select Properties
  • On the Login Properties - autosys window, click on the User Mapping page.
  • Select (Tick) the Map check-box next to AEDB database (User column should be autosys and Schema column should be dbo)
  • Select (Tick) the ujoadmin role under Database role membership for AEDB section.
  • Click OK.

 SQL_UMAP.PNG