- Microsoft SQL Server
- System tables
- Procedure
- Views
- Functions
|
sys.sp_MSdropsystableviews
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
News
|