Cry
about...
SQL Server Troubleshooting
Distribution Agent: Only members of
the sysadmin or db_owner roles can perform this operation.
Symptom:
A distribution agent has failed, the full
error message text is:
Only members of the sysadmin or
db_owner roles can perform this operation.
the last command may be recorded as:
exec sp_MSreplcheck_subscribe
Cause:
The subscriber is causing the error, not
the publisher. The subscriber is rejecting the
distribution agent login. To the subscriber the
distribution agent must be a member of the sysadmin or
db_owner role, but it is a member of neither.
Remedy:
First identify the subscriber
where the problem lies. Look at the agent error
details, the subscriber name will be the first
part of the shown 'Subscription'.
Next identify which account is
being used for the agent. Do this by:
Run server enterprise manager
Select the distribution
server
Go to the 'Tools' menu,
select 'Replication' and from the drop down
menu select 'Configure Publishing,
Subscribers, and Distribution...'.
Select the 'Subscribers' tab.
Double-click the name of the
subscriber to display its properties.
On the 'General' tab it will
show which account is being used (or
attempted to be used) on the subscriber. This
will either be the 'SQL Server Agent' on the
distribution database (the default) or a
specified named account.
On the subscriber check that this
agent login account is a valid login. On the
'Logins' tab (within Server Enterprise Manager)
the account should be listed or a global group
that the account is a member of should be listed.
On the subscriber check that the
agent login account has either 'sysadmin' or
'db_owner' roles for the database being
replicated. If it is a member of neither then
either make it a 'db_owner' of the database or
grant it the server role 'System Administrators'.
The implications of each being:
db_owner: Can create, drop or
pull subscriptions.
System Administrators: Can
set up and configure replication and do
everything a db_owner can do.
I would recommend that 'db_owner' is
granted because it conveys less privileges to a
process that is initiated from another server.
To check that the problem has been
resolved, find the distribution agent using 'SQL Server
Enterprise Manager', right click it and select 'Start'.
You will need to refresh the view or double click the
agent to determine whether it has run successfully.
|