April 16, 2012

sp_assemblies_rowset2 (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_assemblies_rowset2(nvarchar @assembly_schema
, int @assembly_id)

MetaData:

   
create procedure sys.sp_assemblies_rowset2
(
@assembly_schema sysname = null,
@assembly_id int = null
)
as
select
ASSEMBLY_CATALOG = db_name(),
ASSEMBLY_SCHEMA = user_name(a.principal_id),
ASSEMBLY_NAME = a.name,
ASSEMBLY_ID = convert(int,a.assembly_id),
PERMISSION_SET = convert(NVARCHAR(30),
case a.permission_set
when 1 then 'SAFE'
when 2 then 'EXTERNAL_ACCESS'
when 3 then 'UNSAFE'
end),
ASSEMBLY_BINARY = af.content
from
sys.assemblies a inner join
sys.assembly_files af on
(
af.assembly_id = a.assembly_id
)
where
(@assembly_schema is null or @assembly_schema = user_name(a.principal_id)) and
(@assembly_id is null or @assembly_id = a.assembly_id)
order by 1, 2, 3

No comments:

Post a Comment

Total Pageviews