Changing replication job names

After configuring replication,bunch of jobs are created under SQL server agent. The job names can some times be vague and you may have to check the Tsql step code or job category to determine what type of job it is.

It is, however, possible to rename the job name to something that makes more sense. This can help greatly when you need to check on the job(especially for someone who is not very familiar with the replication terms). Renaming the job name should not cause any issues with the replication. You can also update the internal agents name in the distribution database. This is not required but I think it is worth doing, if there are any scripts that access these tables to pull the corresponding job information.

In the below example, I configured a simple transactional replication and it created three jobs:
1. Snapshot Agent
2. Distribution Agent
3. Log Reader Agent

Step 1:
Verify the job name for each one here:
Use distribution
select * from MSdistribution_agents where subscriber_id=0
select * from MSsnapshot_agents
Select * from MSlogreader_agents

Step 2:
Rename the job under SQL agent directly or use sp_update_job to something that’s more easy to understand.
Step 3:
Update the job names in the corresponding Agents table.
Use [Distribution]
Update MSdistribution_agents set Name='SourceDB_TargetDB_Replication_DistributionAgent'
where Name='ANULU\SQL2016-SourceDB-SourceDB_Publication-ANULU\SQL2016-3'

Update MSsnapshot_agents set Name='SourceDB_TargetDB_Replication_SnapshotAgent'
where Name='ANULU\SQL2016-SourceDB-SourceDB_Publication-2'

Update MSLogReader_agents set Name='SourceDB_Replication_LogReader'
where Name='ANULU\SQL2016-SourceDB-2'