How to grant access to a local SQL Server database

The following steps describe how to grant access to the "Network Service" account to a local SQL Server database.

  1. Start SQL Server Management Studio.
  2. In the left panel, select the Security folder for your local SQL Server.
  3. Right-click on the Logins subfolder to open the context menu and click New Login.
  4. In the opened dialog box, enter NT AUTHORITY\NETWORK SERVICE in the Login name text box. Accept the defaults for the other settings and click OK.
  5. In the Databases folder, select your database.
  6. Right-click Users in the Security folder, and then click New User.
  7. In the opened dialog box specify the "NT AUTHORITY\NETWORK SERVICE" account.
  8. In the Role Members list, select the db_datareader check box.
  9. Click OK, and then close the SQL Server Management Studio.