Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MScreate_replication_status_table

  No additional text.


Syntax
create procedure sys.sp_MScreate_replication_status_table
as
    declare @retcode int

    if (select object_id('tempdb.dbo.MSreplication_agent_status')) is NULL
    begin
        -- 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
    end
    return 0  -- If here, all is well and we're done.

 
Last revision 2008RTM
See also

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