Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_lookupcustomresolver

  No additional text.


Syntax

-- Name: sp_lookupcustomresolver

-- Descriptions:

-- Parameters: as defined in create statement

-- Returns: 0 - success
--          1 - Otherwise

-- Security:
-- Requires Certificate signature for catalog access


create procedure sys.sp_lookupcustomresolver
    @article_resolver  nvarchar(255),
    @resolver_clsid    nvarchar(50)   OUTPUT,
    @is_dotnet_assembly bit = 0 OUTPUT,                 -- This flag is set to TRUE while registering a .NET Framework Assembly
    @dotnet_assembly_name  nvarchar(255) = NULL OUTPUT, -- For .NET Framework Assemblies, this parameter must be set to the name of the .NET assembly that implements the BusinessLogicModule class
    @dotnet_class_name  nvarchar(255) = NULL OUTPUT,     -- For .NET Framework Assemblies, this parameter must be set to the name of the .NET class that implements the BusinessLogicModule class
    @publisher sysname = NULL
AS

    declare @distributor sysname
    declare @distributiondb sysname
    declare @distproc nvarchar(1000)
    declare @retcode  int
    declare @stmt  nvarchar(1000)

    set @retcode = 0

	-- Security check
	if 1 <> is_member('db_owner')
	begin
		RAISERROR (15247, 11, -1)
		return (1)
	end

    if @article_resolver IS NULL or @article_resolver = ''
    begin
        RAISERROR (21717, 16, -1)
        return 1
    end

    select @is_dotnet_assembly = 0

    if @publisher is null
     	select @publisher = publishingservername()

    /*
    ** Get the distributor
    */
    if ((@distributor is null) or (@distributiondb is null))
    begin
        EXEC @retcode = sys.sp_helpdistributor @rpcsrvname=@distributor OUTPUT,
        									    @distribdb = @distributiondb OUTPUT,
        									    @publisher  = @publisher
    	IF @@error <> 0 or @retcode <> 0 or @distributiondb is NULL
        BEGIN
            RAISERROR (20036, 16, -1)
            RETURN (1)
        END
    end

    /*
    ** For a local distributor, query the MSmerge_articleresolver directly
    */
    if @distributor = @@servername and db_name() = @distributiondb
    begin
        select @resolver_clsid                  = resolver_clsid,
                 @is_dotnet_assembly          = is_dotnet_assembly,
                 @dotnet_assembly_name    = dotnet_assembly_name,
                 @dotnet_class_name          = dotnet_class_name
        from dbo.MSmerge_articleresolver
        where article_resolver = @article_resolver

    end
    /*
    ** Since a downlevel publisher can connect to a remote distributor with a higher
    ** version, it is better to return the resolver list using the RPC as opposed
    ** to reading regkeys directly since they might change from version to version.
    */
    else
    begin
        select @distproc = quotename(RTRIM(@distributor)) + '.' + quotename(@distributiondb) +'.sys.sp_lookupcustomresolver'
        exec @distproc
            @article_resolver  = @article_resolver,
            @resolver_clsid    = @resolver_clsid OUTPUT,
            @is_dotnet_assembly = @is_dotnet_assembly OUTPUT,
            @dotnet_assembly_name = @dotnet_assembly_name OUTPUT,
            @dotnet_class_name = @dotnet_class_name OUTPUT,
            @publisher = @publisher
        if @@ERROR<> 0
            return (1)
    end

    return @retcode

 
Last revision 2008RTM
See also

  sp_addmergearticle (Procedure)
sp_changemergearticle (Procedure)
sp_enumcustomresolvers (Procedure)
sp_MSdrop_rladmin (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