Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_repldeletequeuedtran

  No additional text.


Syntax
create procedure sys.sp_repldeletequeuedtran
(
    @publisher sysname
    ,@publisher_db sysname
    ,@publication sysname
    ,@tranid sysname
    ,@orderkeylow bigint
    ,@orderkeyhigh bigint
)
as
begin
    declare @retcode int
    set nocount on
    
    -- Security check
    
    exec @retcode = sp_MSreplcheck_subscribe
    if @@error != 0 or @retcode != 0
        return 1
    
    -- validate inputs
    
    if (@tranid is null
            or @orderkeylow is null or @orderkeylow = 0
            or @orderkeyhigh is null or @orderkeyhigh = 0
            or @orderkeyhigh < @orderkeylow)
        return 1
    
    -- begin local transaction
    
    begin transaction sp_repldeletequeuedtran
    save transaction sp_repldeletequeuedtran
    
    -- delete rows from MSreplication_queue
    
    delete dbo.MSreplication_queue with (rowlock)
    where publisher = UPPER(@publisher)
        and publisher_db = @publisher_db
        and publication = @publication
        and tranid = @tranid
        and orderkey between @orderkeylow and @orderkeyhigh
    if (@@error != 0)
        goto Error
    
    -- delete row from MSrepl_queuedtraninfo
    
    delete dbo.MSrepl_queuedtraninfo with (rowlock)
    where publisher = UPPER(@publisher)
        and publisher_db = @publisher_db
        and publication = @publication
        and tranid = @tranid
    if (@@error != 0)
        goto Error
    
    -- commit local transaction
    
    commit transaction sp_repldeletequeuedtran
    
    -- all done
    
    return 0

Error:
    rollback transaction sp_repldeletequeuedtran
    commit transaction
    return 1
end

 
Last revision 2008RTM
See also

  sp_MSdrop_repltran (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