May 10, 2012

sp_MSdrop_tempgenhistorytable (Transact-SQL MetaData) Definition

Please note: that the following source code is provided and copyrighted by Microsoft and is for educational purpose only.
The meta data is from an SQL 2012 Server.

I have posted alot more, find the whole list here.

Goto Definition or MetaData

Definition:

sys.sp_MSdrop_tempgenhistorytable(uniqueidentifier @pubid)

MetaData:

 create procedure sys.sp_MSdrop_tempgenhistorytable  
@pubid uniqueidentifier
as

declare @retcode int
declare @qual_temp_genhistory_table sysname
declare @guidstr varchar(100)
declare @cmd nvarchar(4000)
declare @objid sysname

-- Security check
exec @retcode = sys.sp_MSrepl_PAL_rolecheck
if (@retcode <> 0) or (@@error <> 0)
return 1

select @guidstr = sys.fn_MSguidtostr(@pubid)

select @qual_temp_genhistory_table = 'dbo.MSmerge_genhistory_' + LOWER(@guidstr)

-- check for system object is done while creating the table, not necessary here.
-- passive drop, don't worry about the failure
exec ('if object_id(''' + @qual_temp_genhistory_table + ''') is not null drop table ' + @qual_temp_genhistory_table)
return (0)

No comments:

Post a Comment

Total Pageviews