Cannot open database “…” requested by the login. The login failed. Login failed for the user ‘NT AUTHORITYNetwork Service’.

To solve this you must give necessary permissions to 'NT AUTHORITY Network Service'.

1. Open SSMS (SQL Server Management Studio, if you don't have it already, install it.)
2. Expand the “Databases” node
3. Expand [your DB name] node
4. Expand “Security” node
5. Right-click “Users” then click “New User”

6. Type 'NT AUTHORITYNetwork Service' as the user name, select “Window User” for user type.

7. Click “Membership” on the left to open “Database role membership” page
8. Add the user to “db_owner” role

Now your connection should work.

Hope this helps someone.
Good luck,
Serdar.

Leave a Reply

Your email address will not be published. Required fields are marked *