Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSdrop_6x_replication_agent

  No additional text.


Syntax
create procedure sys.sp_MSdrop_6x_replication_agent
@job_id UNIQUEIDENTIFIER,
@category_id int
as
    declare @distbit int
    declare @db_name sysname
    declare @cmd nvarchar(4000)

    select @distbit = 16

    -- Only perform cleanup of 6x replication agent if caller
    -- is sysadmin member. This is compromise between the need to
    -- maintain very old (and deprecated) functionality and the
    -- need to keep things secured
    if is_srvrolemember('sysadmin') <> 1
        return 0

    declare hCdatabase CURSOR LOCAL FAST_FORWARD FOR
        select name from master.dbo.sysdatabases
            where
            category & @distbit <> 0
        for read only

    open hCdatabase
    fetch next from hCdatabase into @db_name
    while (@@fetch_status <> -1)
    begin

        if @category_id = 13
        begin
            select @cmd = N'delete from ' + QUOTENAME(@db_name) + N'.dbo.MSlogreader_agents where job_id = convert (uniqueidentifier, ''' +
                convert (nvarchar(100), @job_id) + N''')'
            exec (@cmd)
        end
        else if @category_id = 15
        begin
            select @cmd = QUOTENAME(@db_name) + N'.dbo.sp_MSdrop_6x_publication'
            exec @cmd @job_id = @job_id
        end
        else
            return 0

        if @@ERROR <> 0
            return 1

        fetch next from hCdatabase into @db_name
    end
    close hCdatabase
    deallocate hCdatabase

 
Last revision 2008RTM
See also

  sp_droptask (Procedure)
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