Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSget_mergepullsubsagent_owner

  No additional text.


Syntax
create procedure sys.sp_MSget_mergepullsubsagent_owner(
    @publication         sysname = NULL,                  /* Publication name */
    @publisher            sysname = NULL,              /* Publisher server */
    @publisher_db        sysname = NULL,              /* Publication database */
    @owner_sid          varbinary(85) OUTPUT
    )AS

    declare @pubid  uniqueidentifier
    declare @subid  uniqueidentifier
    declare @job_id uniqueidentifier

    set nocount on

    select @owner_sid = NULL

    if object_id('dbo.sysmergepublications', 'U') is not null
    begin
        if exists (select top 1 * from dbo.sysmergepublications
                   where upper(publisher) collate database_default = upper(@publisher) collate database_default and
                         publisher_db = @publisher_db and
                         name = @publication)
        begin
            select @pubid = pubid
            from dbo.sysmergepublications
            where @publication = name

            select @subid = subid
            from dbo.sysmergesubscriptions
            where @pubid = pubid and
                  upper(@@servername) collate database_default = upper(subscriber_server) collate database_default and
                  pubid <> subid

            select @job_id = merge_jobid
            from dbo.MSmerge_replinfo
            where @subid = repid

            select @owner_sid = owner_sid
            from msdb.dbo.sysjobs
            where @job_id = job_id
        end
    end

 
Last revision 2008RTM
See also

  sp_dropmergepullsubscription (Procedure)
       



News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash