Event ID 3760 is logged on the server as the timer job is trying to locate a non-existent database

Symptoms

While we access the SharePoint application server, we receive these event ID
error messages in the event viewer

Log Name : Application
Source :        
Microsoft-SharePoint Products-SharePoint Foundation
Date : <Date and Time>
Event ID : 3760
Task Category : Database
Level : Critical
Keywords :     
User : domain\farmaccount
Computer : <Servername>
Description :
SQL Database 'database_name' on SQL
Server instance 'sql_instance' not found. Additional error information from SQL
Server is included below.
Cannot open database "database_name" requested by the login. The login failed.
Login failed for user 'domain\farmaccount'.

 

Cause

The service application was not removed in the proper format, leaving behind orphan entries for databases.

 

Resolution

Deleted the Orphan Entries using PowerShell
Commands:

Get-SPDatabase | where {$_.name -match "<Name of the Service Database>"} | fl
$db = get-spdatabase | where {$_.id -match "<ID enumerated of the Database from above command>"}
$db.Delete()