Page 1 of 1

FIX: Could not connect to MSSQL database

Posted: Fri Feb 12, 2010 8:35 pm
by Mattias
Note: for an updated version of this and other articles, we recommend you to check our knowledge base here

SYMPTOM
During installation when accessing SiteAdmin, you get the following error:
"Cannot open database "GpsGateServer" requested by the login. The login failed. Login failed for user 'SERVER\USERNAME'."

CAUSE
You are using Windows Authentication for connecting to SQL Server and your IIS/ASP.NET user account does not have the needed permissions.

SOLUTION
Add permissions for the account specified in the error message to your database.

1. Start "SQL Server Management Studio".
2. Right-click the "Security" folder for your database server, select "New" -> "Login..." in the menu.
3. On the General page, enter the name of a Windows user in the Login name box, which you found in the error message e.g. "SERVER\USERNAME".
4. Select Windows Authentication.
5. Go to "User Mapping", select the database you want to add the new user to, e.g. "GpsGateServer".
6. Select db_owner in the Database role membership list and select dbo as default schema. (see: http://img845.imageshack.us/img845/664/usermapping.png)
7. Click OK.

Now refresh the web page and you will be able to continue your installation!

Here you can download SQL Management Studio
https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017

Regards,
Mattias

GpsGate Support