January 19, 2010 at 2:18 pm
Vinay Thakur-585143 (1/19/2010)
Sorry for confution,follow this
declare @JobID uniqueidentifier
select @JobID=job_id from distribution.dbo.MSdistribution_agents
where publisher_db=publisherDBName
-this will give jobid for the replication we have created, just use that jobid and rename the job.
exec msdb.dbo.sp_update_job @job_id = @JobID, @new_name = N'NewJobName'
I also blog about this. please read once.
http://rdbmsexperts.com/Blogs/?p=40
HTH
Vinay
Thanks Vinay ... I will look into this .. and will update you ...
Thanks for helping,
\\K
______________________________________________________________________________________________________________________________________________________________________________________
HTH !
Kin
MCTS : 2005, 2008
Active SQL Server Community Contributor 🙂
January 21, 2010 at 12:43 pm
Vinay Thakur-585143 (1/19/2010)
Sorry for confusion,follow this
declare @JobID uniqueidentifier
select @JobID=job_id from distribution.dbo.MSdistribution_agents a,master.sys.servers s
where a.publisher_db=['PublisherDB'] and
a.subscriber_db=['Destination_DB'] and
a.subscriber_id=s.srvid and
s.srvname=['SubsriberServer']
--this will give jobid for the replication we have created, just use that jobid and rename the job.
exec msdb.dbo.sp_update_job @job_id = @JobID, @new_name = N'NewJobName'
I also blog about this. please read once.
http://rdbmsexperts.com/Blogs/?p=40
HTH
Vinay
Thanks a lot Vinay ... that helped a lot ... also your blog is very helpful ... i will also blog this in my blog. The credit goes to you !
edit ***
a.subscriber_id=s.srvid and
s.srvname=['SubsriberServer']
should be .. (for sql server 2005)
a.subscriber_id = s.server_id and
s.name=['SubsriberServer']
Rest it works with charm ... I learned it now 🙂
Thanks ,
\\K
______________________________________________________________________________________________________________________________________________________________________________________
HTH !
Kin
MCTS : 2005, 2008
Active SQL Server Community Contributor 🙂
January 21, 2010 at 2:01 pm
I am glad it helped...
Thanx.
Vinay
http://rdbmsexperts.com/Blogs/
http://vinay-thakur.spaces.live.com/
http://twitter.com/ThakurVinay
Viewing 3 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply