Home Microsoft SQL Server DigiMailing iRN Contact


  No additional text.

create procedure sys.sp_MScreate_replication_status_table
    declare @retcode int

    if (select object_id('tempdb.dbo.MSreplication_agent_status')) is NULL
        -- begin tran
        create table tempdb.dbo.MSreplication_agent_status (
            publisher sysname NOT NULL,
            publisher_db sysname NOT NULL,
            publication sysname NOT NULL,
            publication_type int NOT NULL,          -- 0 transactional/snapshot  1 Merge
            agent_type int NOT NULL,
            status int NOT NULL,
            agent_name nvarchar(100) NOT NULL,
            timestamp NOT NULL
        if @@error <> 0
            return 1

        create clustered index cMSreplication_agent_status ON tempdb.dbo.MSreplication_agent_status (agent_name)
        if @@error <> 0
            return 1
        create nonclustered index unc1MSreplication_agent_status ON
            tempdb.dbo.MSreplication_agent_status (publication, publisher_db, publisher)
        if @@error <> 0
            return 1
        create nonclustered index unc2MSreplication_agent_status ON
            tempdb.dbo.MSreplication_agent_status (agent_type)
        if @@error <> 0
            return 1
        create nonclustered index unc3MSreplication_agent_status ON
            tempdb.dbo.MSreplication_agent_status (timestamp)
        if @@error <> 0
            return 1

        exec @retcode = tempdb.dbo.sp_MS_marksystemobject 'dbo.MSreplication_agent_status'
        if @@error <> 0 or @retcode <> 0
            return 1
    return 0  -- If here, all is well and we're done.

Last revision 2008RTM
See also

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