# Database Discussions > Microsoft SQL Server 2005 >  Identifying when the re-initialise process on subscription is finished

## 5HAUN7

Morning,
Im controlling me transactional replication with scripts

Distributor and publisher are on the same box (SQL Server 2005 Enterprise)

I run the following code on publisher box

declare 	@JobName			varchar(1000),
		@PublicationName		varchar(1000),
		@SubscriberName		varchar(1000)
select		@PublicationName='Publication_Other_Objects',
		@SubscriberName='SRV-SUB-DB01

select @JobName=name from distribution..MSsnapshot_agents where publication=@PublicationName
exec 	mydb..sp_reinitsubscription 
									 @publication = @PublicationName ,
									 @subscriber =  @SubscriberName,
									 @invalidate_snapshot =1

exec msdb..sp_start_job @job_name=@JobName


and as the result the a new snapshot will be taken and the subscribtion will be re-initialised
I need to find out when the bulk inserts(re-initialise) on subscription is finished, so I can kick off another process. 
At the moment the only why for me to find out is to use replication monitor
Is there any dmv that I can use to extract this information.
Thanks

----------


## rmiao

Tried checking snapshot job status?

----------


## 5HAUN7

thanks for you're feedback,
the sanpshot job terminates as soon as the sanpshot agent takes the snapshot.
but I'm interested in the bulk insert on the subscription ( that takes place after th snapshot has been taken)
need to know when that finishes

----------


## rmiao

May query distribution..MSsnapshot_history.

----------

