
Agent Security Under SQL Server Agent
When you configure replication by using SQL Server Management Studio, Transact-SQL procedures, or RMO, a SQL Server Agent job is created by default for each agent. Agents then run under the context of a job step, regardless of whether they run continuously, on a schedule, or on demand. You can view these jobs under the Jobs folder in SQL Server Management Studio. The following table lists the job names.
|
Agent
|
Job name
|
|---|
|
Snapshot Agent
|
<Publisher>-<PublicationDatabase>-<Publication>-<integer>
|
|
Snapshot Agent for a merge publication partition
|
Dyn_<Publisher>-<PublicationDatabase>-<Publication>-<GUID>
|
|
Log Reader Agent
|
<Publisher>-<PublicationDatabase>-<integer>
|
|
Merge Agent for pull subscriptions
|
<Publisher>-<PublicationDatabase>-<Publication>-<Subscriber>-<SubscriptionDatabase>-<integer>
|
|
Merge Agent for push subscriptions
|
<Publisher>-<PublicationDatabase>-<Publication>-<Subscriber>-<integer>
|
|
Distribution Agent for push subscriptions
|
<Publisher>-<PublicationDatabase>-<Publication>-<Subscriber>-<integer>
1
|
|
Distribution Agent for pull subscriptions
|
<Publisher>-<PublicationDatabase>-<Publication>-<Subscriber>-<SubscriptionDatabase>-<GUID>
2
|
|
Distribution Agent for push subscriptions to non-SQL Server Subscribers
|
<Publisher>-<PublicationDatabase>-<Publication>-<Subscriber>-<integer>
|
|
Queue Reader Agent
|
[<Distributor>].<integer>
|
1 For push subscriptions to Oracle publications, the job name is <Publisher>-<Publisher> instead of <Publisher>-<PublicationDatabase>.
2 For pull subscriptions to Oracle publications, the job name is <Publisher>-<DistributionDatabase> instead of <Publisher>-<PublicationDatabase>.
When you configure replication, you specify accounts under which agents should run. However, all job steps run under the security context of a proxy; therefore, replication performs the following mappings internally for the agent accounts that you specify:
-
The account is first mapped to a credential by using the Transact-SQL CREATE CREDENTIAL statement. SQL Server Agent proxies use credentials to store information about Windows user accounts.
-
The sp_add_proxy stored procedure is called, and the credential is used to create a proxy. For more information about proxies, see Creating SQL Server Agent Proxies.
Note: |
|---|
|
This information is provided to help you understand what is involved in running agents with the appropriate security context. You should not have to interact directly with the credentials or proxies that have been created.
|