After creating a snapshot job using sp_addpublication_snapshot how do I get
the job_id?
I want to be able to rename the job as well as change the owner through
script after it is created but sp_update_job requires the old name or job id
and sp_addpublication_snapshot doesn't return either.
Thanks
Select msdb.dbo.sysjobs.name from msdb.dbo.sysjobs INNER JOIN
pubisherserver.publisherdb.dbo.syspublications
ON (msdb.dbo.sysjobs.job_id =
pubisherserver.publisherdb.dbo.syspublications.sna pshot_jobid)
WHERE pubisherserver.publisherdb.dbo.syspublications.nam e = 'Your
publication Name'
-Nitin Rana
"Darren" wrote:
> After creating a snapshot job using sp_addpublication_snapshot how do I get
> the job_id?
> I want to be able to rename the job as well as change the owner through
> script after it is created but sp_update_job requires the old name or job id
> and sp_addpublication_snapshot doesn't return either.
> Thanks
>
>
|||I don't have a syspublications table. I've looked in the database being
published, the master and msdb databases.
"Nitin" <Nitin@.discussions.microsoft.com> wrote in message
news:E0FB2C01-6166-4122-8A93-B10DC968527D@.microsoft.com...[vbcol=seagreen]
> Select msdb.dbo.sysjobs.name from msdb.dbo.sysjobs INNER JOIN
> pubisherserver.publisherdb.dbo.syspublications
> ON (msdb.dbo.sysjobs.job_id =
> pubisherserver.publisherdb.dbo.syspublications.sna pshot_jobid)
> WHERE pubisherserver.publisherdb.dbo.syspublications.nam e = 'Your
> publication Name'
> -Nitin Rana
>
> "Darren" wrote:
get[vbcol=seagreen]
job id[vbcol=seagreen]
|||sysmergepublications
"Darren" <deo.is@.unknown.com> wrote in message
news:edlm8OhNFHA.3420@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
> I don't have a syspublications table. I've looked in the database being
> published, the master and msdb databases.
>
> "Nitin" <Nitin@.discussions.microsoft.com> wrote in message
> news:E0FB2C01-6166-4122-8A93-B10DC968527D@.microsoft.com...
I[vbcol=seagreen]
> get
through
> job id
>
No comments:
Post a Comment