Event ID 3760 – SharePoint Foundation – SQL Database not found

Exception

[sourcecode]

SQL Database ‘YOUR DATABASE_FOLLOWED BY GUID’ on SQL Server instance ‘YOUR INSTANCE’ not found. 
Additional error information from SQL Server is included below.

Cannot open database "YOUR DATABASE_FOLLOWED BY GUID" requested by the login. The login failed.
Login failed for user ‘YOUR USER ACCOUNT’.
[/sourcecode]

After checking the SQL, i noticed that the database is not even exist in my database server. I suspect that the previous deleted service application jobs did not clean up properly. To get rid of this 3760 Critical error. Simply Execute the following powershell script.

Note: This script will delete all your non-existing databases. Please do a backup before executing it

[sourcecode language=”powershell”]
Add-PSSnapin Microsoft.SharePoint.Powershell
$dbs = Get-SPDatabase | Where {$_.Exists -eq $false}
$dbs | ForEach-Object { $_.Delete()}

[/sourcecode]

The error is now gone =)

Leave a Reply

Your email address will not be published. Required fields are marked *