Configure Synchronization Connections An error has occurred while accessing the SQL Server database
I was continiously getting this error in User profile service application under configure sync connection.
Googled some of the blog and saw some suggestion to do a IIS reset across the farm. I did the same but couldnt find the solution to my problem.
Further digging into Services.msc (windows services), I noticed my Forefront Identity Manager Service is stopped and Forefront Identity Manager Sync Service was started.
Just started the Forefront Identity Manager Service and my problem was resolved.