The event log on my WFE is filled with errors every hour complaining that a database on my SharePoint SQL instance is not found.
This was caused by me creating and deleting a service application, and then going into SQL Management Studio and manually deleting the associated service application database. SharePoint still had a record of the database in its config database.
Delete the record of the orphaned database using PowerShell
- Open SharePoint Management Shell
- Type: Get-SPDatabase | fl name, id
- Find the database you wish to remove and select its ID.
- Type: $pp = get-spdatabase <id>
- Type: $pp.delete()
SharePoint’s record of the database is now deleted and it should no longer complain that the database is not found.