Q: SQL server login error remote server database I am connecting to two remote databases (sql server and the databases are on the same remote machine). Both databases are in separate directories.
I checked the security settings in the SQL management console for both databases and they are the same. However, I can connect to one database remotely (using a remote connection string in my C# application) but the other database gives me "Login failed - Login failed for user XXX/ZZZ".
Any ideas why this is happening? (Could it be related to the permissions on the physical directories where the files of the database are located)?

A: In SQL management console, check both Logins on the server and Users on each database.

A: It is a login issue as stated by the error.  Make sure you can get to both databases uses SSMS using the logins that the C# application is using.  If this works, then it is something else.
One common problem is not changing the default database from [master] or adding the user with rights to the database you want to query.
