Some times when we open SharePoint sites it display this error:
Unable to connect to the database STS_Config on server01\SharePoint.
Check the database connection information and make sure that the database
server is running.
There are different-different cause of this problem:
First cause- when the SharePoint Timer Service tries to contact the configuration database when the computer starts or shuts down. As we all knows By default, the configuration database in Windows SharePoint Services is named STS_config.
The second cause-of this problem is Connectivity issues between WFE and DB Server.
If the connection is fine then it could be due to disabled accounts. if the account you using to access your DB is disabled you will get this error.
How to resolve this error:
To resolve First cause: connect to the Windows SharePoint Services Web site successfully than you can safely ignore this error message.
To resolve second cause you need to run a indefinite ping command on the WFE to DB server (ping -t yourdbserverip). Let it run for few hours and then press ctrl+c it will give you summary about packet loss etc. this will help you find how good your connection is.
To resolve third cause Check your account setting.
After taking all steps also check the DB service itself on the DB Server & check the event log for any service issues.
After taking all steps even you could not resolve this issue than you can try SharePoint Database Recovery Software. This software are very easy to use. Everyone can use this software just need to download its demo version. You can try Stellar Phoenix SharePoint Server Recovery Software to resolve this issue.