Welcome to SSQA.net Sign in | Join | Help

SQL Server Replication (SSQA.net)

Another methodology to distribute data to different locations and to remote or mobile users over local and wide area networks, dial-up connections, wireless connections, and the Internet.
SQL Server Replication - resolving too many snapshots issues?

In case you have many snapshots generated within your Replication setup and having troubles in finding what kind of scheduled job is running during the time of snapshot publication.

By default you coudl take help of system catalog MSsnapshot_agents and further query against sys.sysjobs or sys.sysjobsteps, not an easy to find out what is running and taking the below TSQL you can achieve what you want:

--list of all snapshot agents 

select * from distribution..MSsnapshot_agents

--To get a one-to-one match to number of jobs

select * from msdb..sysjobs
 
--To match agent to job, run the following
select j.*, s.* from distribution..
MSsnapshot_agents s join msdb..sysjobs j
on s.job_id = j.job_id
 
--To see if the job has corresponding job steps
select j.*, s.* from msdb..sysjobsteps s join
 msdb..sysjobs j
on s.job_id = j.job_id
where s.subsystem = ‘Snapshot’
Posted: Tuesday, April 15, 2008 4:15 AM by SQL Master

Comments

Other SQL Server Blogs around the Web said:

In case you have many snapshots generated within your Replication setup and having troubles in finding

# April 15, 2008 6:22 AM
Anonymous comments are disabled