Allow Non-Administrators to Use Replication Monitor
This topic describes how to allow non-administrators to use Replication Monitor in SQL Server 2012 by using SQL Server Management Studio or Transact-SQL. Replication Monitor can be used by users who are members of the following roles:
The sysadmin fixed server role.
These users can monitor replication and have full control over changing replication properties such as agent schedules, agent profiles, and so on.
The replmonitor database role in the distribution database.
These users can monitor replication, but cannot change any replication properties.
In This Topic
Before you begin:
Security
To allow non-administrators to use Replication Monitor, using:
SQL Server Management Studio
Transact-SQL
Before You Begin
Security
Permissions
To allow non-administrators to use Replication Monitor, a member of the sysadmin fixed server role must add the user to the distribution database and assign that user to the replmonitor role.
[Top]
Using SQL Server Management Studio
To allow non-administrators to use Replication Monitor
In SQL Server Management Studio, connect to the Distributor, and then expand the server node.
Expand Databases, expand System Databases, and then expand the distribution database (named distribution by default).
Expand Security, right-click Users, and then click New User.
Enter a user name and login for the user.
Select a default schema of replmonitor.
Select the replmonitor check box in the Database role membership grid.
Click OK.
[Top]
Using Transact-SQL
To add a user to the replmonitor fixed database role
At the Distributor on the distribution database, execute How to: Programmatically Monitor Replication (Replication Transact-SQL Programming). If the user is not listed in UserName in the result set, the user must be granted access to the distribution database using the CREATE USER statement.
At the Distributor on the distribution database, execute sp_helprolemember, specifying a value of replmonitor for the @rolename parameter. If the user is listed in MemberName in the result set, the user already belongs to this role.
If the user does not belong to the replmonitor role, execute sp_addrolemember at the Distributor on the distribution database. Specify a value of replmonitor for @rolename and the name of the database user or the Microsoft Windows login being added for @membername.
To remove a user from the replmonitor fixed database role
To verify that the user belongs to the replmonitor role, execute sp_helprolemember at the Distributor on the distribution database, and specify a value of replmonitor for @rolename. If the user is not listed in MemberName in the result set, the user does not currently belong to this role.
If the user does belong to the replmonitor role, execute sp_droprolemember at the Distributor on the distribution database. Specify a value of replmonitor for @rolename and the name of the database user or the Windows login being removed for @membername.
[Top]