Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSdropsystableviews

  No additional text.


Syntax
-- called when doing publication cleanup
create procedure sys.sp_MSdropsystableviews (@pubid uniqueidentifier)
AS
    declare @guidstr        nvarchar(40)
    declare @contentsview_80    sysname
    declare @tombstoneview  sysname
    declare @genhistoryview_80  sysname
    declare @filtersview_80    sysname
    declare @filtersview_90    sysname
    declare @contentsview_90    sysname
    declare @contentsview_90_forall    sysname
    declare @contentsview_90_forglobal    sysname
    declare @rowtrackview    sysname
    declare @genhistoryview_90  sysname
    declare @retcode smallint

    /*
    ** Only dbo or sysadmin
    */
    exec @retcode=sys.sp_MSreplcheck_publish
    if @retcode<>0 or @@ERROR<>0 return (1)

    -- use pubid to generate the view names.
    exec @retcode = sys.sp_MSguidtostr @pubid, @guidstr out
    if @@ERROR<>0 OR @retcode<>0 return (1)

    select @contentsview_80 = 'MSmerge_cont' + @guidstr
    select @contentsview_90 = 'MSmerge_cont' + @guidstr + '_90'
    select @contentsview_90_forall = 'MSmerge_cont' + @guidstr + '_90_forall'
    select @contentsview_90_forglobal = 'MSmerge_cont' + @guidstr + '_90_forglobal'
    select @rowtrackview = 'MSmerge_cont' + @guidstr + '_rowtrack'
    select @tombstoneview = 'MSmerge_ts' + @guidstr
    select @genhistoryview_80 = 'MSmerge_gh' + @guidstr
    select @genhistoryview_90 = 'MSmerge_gh' + @guidstr + '_90'
    select @filtersview_80 = 'MSmerge_filt' + @guidstr
    select @filtersview_90 = 'MSmerge_filt' + @guidstr + '_90'

    exec @retcode = sp_MSdropview_internal @contentsview_80
    if @@ERROR<>0 OR @retcode<>0 return (1)

    exec @retcode = sp_MSdropview_internal @contentsview_90
    if @@ERROR<>0 OR @retcode<>0 return (1)

    exec @retcode = sp_MSdropview_internal @contentsview_90_forall
    if @@ERROR<>0 OR @retcode<>0 return (1)

    exec @retcode = sp_MSdropview_internal @contentsview_90_forglobal
    if @@ERROR<>0 OR @retcode<>0 return (1)

    exec @retcode = sp_MSdropview_internal @rowtrackview
    if @@ERROR<>0 OR @retcode<>0 return (1)

    exec @retcode = sp_MSdropview_internal @tombstoneview
    if @@ERROR<>0 OR @retcode<>0 return (1)

    exec @retcode = sp_MSdropview_internal @genhistoryview_80
    if @@ERROR<>0 OR @retcode<>0 return (1)

    exec @retcode = sp_MSdropview_internal @genhistoryview_90
    if @@ERROR<>0 OR @retcode<>0 return (1)

    exec @retcode = sp_MSdropview_internal @filtersview_80
    if @@ERROR<>0 OR @retcode<>0 return (1)

    exec @retcode = sp_MSdropview_internal @filtersview_90
    if @@ERROR<>0 OR @retcode<>0 return (1)

    return (0)

 
Last revision 2008RTM
See also

  sp_MSdrop_rlrecon (Procedure)
sp_MSmakesystableviews (Procedure)
sp_MSpublicationcleanup (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