This blog has been useful for those,
Whose machine name has been rename and accordingly database server name is also renamed. in that case when user will try to open any SharePoint site, display an message, “Can not connect to configuration database”, very common message.
Change the registry key value,
Key:- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\WSS\ServerType
and re lunch the products configuration wizard again.
1. Delete all database from database server and site from IIS
2. Execute the below stsadm command :
psconfig.exe -cmd configdb -disconnect
psconfig.exe -cmd configdb -create -server <DatabaseServer> -database <Sharepoint_Config>
3. Re lunch the products configuration wizard.