Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSdrop_distribution_agentid

  No additional text.


Syntax
CREATE PROCEDURE sys.sp_MSdrop_distribution_agentid
(
    @agent_id int
)
AS
begin
    SET NOCOUNT ON

    /*
    ** Declarations.
    */
    DECLARE @name           nvarchar(100)
    DECLARE @publisher      sysname
    DECLARE @publisher_db   sysname
    DECLARE @publication    sysname

    SELECT @name = name, @publisher = srvname, @publisher_db = publisher_db, @publication = publication FROM
        MSdistribution_agents, master.dbo.sysservers WHERE
        id = @agent_id and
        srvid = publisher_id

    -- Delete Perfmon instance
    dbcc deleteinstance ("SQL Replication Distribution", @name)
	
    -- In case this was a PeerToPeer agent, delete all the cached PeerToPeer info
    DELETE FROM MScached_peer_lsns WHERE agent_id=@agent_id
   	IF @@ERROR <> 0
        return 1

    -- Remove agent entry
    DELETE MSdistribution_agents WHERE id = @agent_id
    IF @@ERROR <> 0
        return 1

    return 0
end

 
Last revision 2008RTM
See also

  sp_dropanonymoussubscription (Procedure)
sp_instdist (Procedure)
sp_MScleanup_agent_entry (Procedure)
sp_MSdrop_anonymous_entry (Procedure)
sp_MSdrop_distribution_agentid_dbowner_proxy (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