April 30, 2012

sp_kill_filestream_non_transacted_handles (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_kill_filestream_non_transacted_handles(nvarchar @table_name
, int @handle_id)

MetaData:

   
create procedure sys.sp_kill_filestream_non_transacted_handles
(
@table_name nvarchar(776) = NULL,
@handle_id int = -1
)
as
begin
set nocount on
declare @returncode int
declare @dbid int = db_id()
declare @hasAccess bit

-- Check permissions, must have database control permissions to kill handles.
-- Members of the sysadmin server role and those with SERVER CONTROL have implicit
-- DATABASE CONTROL access.
set @hasAccess =
has_perms_by_name(quotename(db_name()), 'DATABASE', 'CONTROL')
if @hasAccess = 0 OR @hasAccess IS NULL
begin
raiserror(33428,-1,-1,@dbid)
return 1
end

EXEC @returncode = sys.sp_kill_filestream_non_transacted_handles_internal @table_name, @handle_id

return @returncode
end

No comments:

Post a Comment

Total Pageviews