Home Microsoft SQL Server DigiMailing iRN Contact


  No additional text.


/* Remove an article command of a specific tyep from dbo.sysmergeschemachange- Used by snapshot */
create procedure sys.sp_MSremove_mergereplcommand (
    @publication        sysname,
    @article            sysname,
    @schematype         int
    ) AS
    set nocount on
    declare @pubid              uniqueidentifier
    declare @artid              uniqueidentifier
    declare @retcode            int

    -- added for client requested snapshot to work.
    -- when a non-dbo user comes in only do all checking and subsequent removing if the command exists in the first place.
    exec @retcode=sys.sp_MSrepl_PAL_rolecheck @publication = @publication
    if @retcode<>0 or @@ERROR<>0 return (1)

    select @pubid = pubid FROM dbo.sysmergepublications WHERE name = @publication and UPPER(publisher)=UPPER(publishingservername()) and publisher_db=db_name()
    select @artid = artid FROM dbo.sysmergeextendedarticlesview WHERE name = @article and pubid=@pubid
    if not exists(select * from dbo.sysmergeschemachange where pubid = @pubid and artid = @artid and schematype = @schematype)
        return 0

    exec @retcode=sys.sp_MSreplcheck_publish
    if @retcode<>0 or @@ERROR<>0 return (1)

    if @publication IS NULL
        raiserror (14003, 16, -1)
        return (1)

    if @article IS NULL
        raiserror (20045, 16, -1)
        return (1)

    delete dbo.sysmergeschemachange where pubid = @pubid
                                  and artid = @artid
                             and schematype = @schematype

Last revision 2008RTM
See also

  sp_MSdrop_rlrecon (Procedure)


  Query a named instance
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
Zoekmachine optimalisatie
SQL Servers hidden objects
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
sIFR; de combinatie tussen HTML en Flash