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'.