Creating a read-only database user account for Microsoft SQL Server 2005
search cancel

Creating a read-only database user account for Microsoft SQL Server 2005

book

Article ID: 179532

calendar_today

Updated On:

Products

Security Information Manager

Issue/Introduction

 

Resolution

Creating a read-only database user account for Microsoft SQL Server 2005

Collectors that use a database sensor require that you create a read-only database user account so that the collector can query for events.

See Installing collectors that use a database sensor.

To create a read-only database user account for Microsoft SQL Server 2005

  1. Start Microsoft SQL Management Studio.

  2. In the Connect to Server window, in the Server name box, select the SQL Server 2005 computer on which the database is installed.

  3. In the Authentication box, click SQL Server Authentication.

  4. In the Login box, type a user name that has permissions to create new accounts.

  5. In the Password box, type the password for the user name.

  6. Click Connect.

  7. On the SQL Server Management Studio window, in the Object Explorer pane, right-click Security, and then click New > Login.

  8. In the Login-New dialog box, perform the following tasks in the order in which they appear:

    • In the Select a page pane, click General.

    • In the right pane, in the Login name box, type a logon name for the new user.

    • Check SQL Server authentication, type a password for the user, and then confirm the password.

    • Uncheck User must change password at next login.

    • In the Default database box, select the database to be read by this user.

  9. In the Login-New dialog box, in the Select a page pane, click Server Roles.

  10. In the right pane, click public.

  11. In the Login-New dialog box, in the Select a page pane, click User Mapping.

  12. In the right pane, under Users mapped to this login, make sure that you have selected the database to read.

  13. Under Database role membership for the database, click db_datareader.

    This role gives the user read-only data access to the database. The role of public is always selected and cannot be cleared.

  14. Click OK.