May 10, 2012

sp_MSdeleteretry (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_MSdeleteretry(nvarchar @temptable
, int @tablenick
, uniqueidentifier @rowguid)

MetaData:

   
create procedure sys.sp_MSdeleteretry
(@temptable nvarchar(386),
@tablenick int,
@rowguid uniqueidentifier)
as
declare @guidstr nvarchar(38)
declare @nickstr nvarchar(12)
declare @retcode int

declare @quotedtemptable nvarchar(388)

--
-- do permission checking
--
exec @retcode = sys.sp_MSrepl_PAL_rolecheck @tablenick = @tablenick
if @retcode<>0 or @@ERROR<>0 return (1)

--
-- Modify temp table, granted to public.
--

set @nickstr = convert(nchar, @tablenick)
set @guidstr = '''' + convert(nchar(36), @rowguid) + ''''

select @quotedtemptable = quotename(@temptable)

execute ('delete from ' + @quotedtemptable + ' where tablenick = ' +
@nickstr + ' and rowguidcol = ' + @guidstr)
IF @@ERROR <>0 RETURN (1)
return (0)

No comments:

Post a Comment

Total Pageviews