System.Data.SqlClientException: Cannot open database "DBName" requested by the login. The login failed.

This article discusses possible causes for the System.Data.SqlClientException: Cannot open database "DBName" requested by the login. The login failed. message.

When attempting to launch the SureSync Desktop, you receive the following error:

Error opening the SureSync database.

System.Data.SqlClient.SqlException: Cannot open database "DBName" requested by the login. The login failed.

Login failed for user 'UserAccountHere"

This message is an error message from the SQL Server indicating that a login attempt failed. When you launch the SureSync Desktop, it runs as the user you're logged into the machine as. This account must have db_owner permissions on the SureSync database in question.

This message often occurs when SureSync is installed as one user account, and you attempt to access the database through the Desktop while logged in as a different user who does not have permission to access the database.