Home Microsoft SQL Server DigiMailing iRN Contact


  No additional text.

create procedure sys.sp_MSrepl_startup_internal
    ** Security Check: require sysadmin
    IF (ISNULL(IS_SRVROLEMEMBER('sysadmin'),0) = 0)
        RETURN (1)

    -- Drop and create publisher side cache table
    if exists (select * from tempdb.sys.objects where name = 'MSpublisher_access' and
    type = 'U')
        drop table tempdb.dbo.MSpublisher_access

    create table tempdb.dbo.MSpublisher_access
    spid int NOT NULL,
    db_id int not null,
    publication sysname not null,
    login_time datetime not null,
    pubid uniqueidentifier null -- Used for merge only.

    CREATE CLUSTERED INDEX ucMSpublisher_access ON tempdb.dbo.MSpublisher_access
        (spid, publication, db_id)
    exec tempdb.dbo.sp_MS_marksystemobject 'dbo.MSpublisher_access'

    -- Drop and create distributor side cache table
    -- We need to avoid publisher and distributor using the same table to prevent
    -- contention in local distributor case.
    if exists (select * from master.dbo.sysservers
                  WHERE  srvstatus & 8 <> 0 and UPPER(datasource collate database_default) = UPPER(@@servername) collate database_default)
        if exists (select * from tempdb.sys.objects where name = 'MSdistributor_access' and
        type = 'U')
            drop table tempdb.dbo.MSdistributor_access

        create table tempdb.dbo.MSdistributor_access
        spid int NOT NULL,
        db_id int not null,
        agent_id int not null,
        agent_type int not null,
        publication_id int not null,
        login_time datetime not null

		create clustered index ucMSdistributor_access on tempdb.dbo.MSdistributor_access
			(spid, login_time)

        exec tempdb.dbo.sp_MS_marksystemobject 'dbo.MSdistributor_access'

		-- init perfmon counters
		exec sys.sp_MSinit_replication_perfmon

Last revision 2008RTM
See also

  sp_adddistributor (Procedure)
sp_MSdrop_replcom (Procedure)
sp_MSrepl_startup (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