SQL Management Studio – How to create read only users

The following steps detail how to create a read-only user for an SQL database using Microsoft SQL Server Management Studio.

This may be helpful if you need to give access to your database but do not want the user to make any changes (such as new tables or records).

Note: The user will be able to run any stored procedures which are a part of the database. Depending on your configuration, these stored procedures may be able to create or delete records. As with any database management, understanding your database configuration and contents is critical to ensure the security.

How to create a read-only SQL Server 2008 account

  1. Using Microsoft SQL Server Management Studio, log into your database using a full access account
  2. Expand ‘Security’ then right-click on ‘Logins’.
  3. Select ‘New Login’. The new login window will open in a new window.
  4. Under ‘Login name’ enter an appropriate name for the account, for example ‘db1_readonly’
  5. Select ‘SQL Server Authentication’
  6. Under ‘Password’ and ‘Confirm password’ enter and appropriate password
  7. Select ‘User Mapping’ from the left hand list
  8. Under ‘Users mapped to this login’ select the database the user will have access to
  9. Under ‘Database role’ elect db_datareader’
  10. Click ‘OK’ to save the changes.