Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSrepl_scriptpublicationcustomprocs

  No additional text.


Syntax

create procedure sys.sp_MSrepl_scriptpublicationcustomprocs
(
    @publication    sysname,
    @publisher      sysname = NULL,
    @publisher_type sysname = N'MSSQLSERVER',
    @usesqlclr      bit
)
AS
BEGIN
    declare @retcode          int,
            @table_created    bit


    select @retcode = 0,
           @table_created = 0

    SET NOCOUNT ON

    -- Security check: Sysadmins and db_owners only
    exec @retcode = sp_MSreplcheck_publish

    IF (@retcode != 0) OR (@@ERROR != 0)
    BEGIN
        RETURN 1
    END


    if @usesqlclr = 0
    begin
        create table #scripttext
        (
            line_no int identity(1,1) primary key,
            line nvarchar(4000)
        )

        IF (@retcode != 0) OR (@@ERROR != 0)
        BEGIN
            RETURN 1
        END

        select @table_created = 1

        exec @retcode = sys.sp_MSscriptpublicationcustomprocs
            @publication = @publication,
            @publisher = @publisher,
            @publisher_type = @publisher_type

        IF (@retcode != 0) OR (@@ERROR != 0)
        BEGIN
            RETURN 1
        END

        select '--' = line from #scripttext order by line_no asc

    Failure:
        if @table_created <> 0
        begin
            drop table #scripttext
        end
    end
    else
    begin
        exec @retcode = sys.sp_MSscriptpublicationcustomprocs_sqlclr
            @publication = @publication,
            @publisher = @publisher,
            @publisher_type = @publisher_type
        IF (@retcode != 0) OR (@@ERROR != 0)
        BEGIN
            RETURN 1
        END
    end

    return @retcode
end

 
Last revision 2008RTM
See also

  sp_MSdrop_repltran (Procedure)
sp_scriptpublicationcustomprocs (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