April 16, 2012

sp_assembly_dependencies_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_assembly_dependencies_rowset2(nvarchar @assembly_schema
, int @assembly_referenced)

MetaData:

   
create procedure sys.sp_assembly_dependencies_rowset2
(
@assembly_schema sysname = null,
@assembly_referenced int = null
)
as
select
ASSEMBLY_CATALOG = db_name(),
ASSEMBLY_SCHEMA = user_name(a.principal_id),
ASSEMBLY_ID = ar.assembly_id,
REFERENCED_ASSEMBLY_ID = ar.referenced_assembly_id
from
sys.assembly_references ar inner join
sys.assemblies a on
(
a.assembly_id = ar.assembly_id
)
where
(@assembly_schema is null or a.principal_id = user_id(@assembly_schema)) and
(@assembly_referenced is null or @assembly_referenced = 0 or @assembly_referenced = ar.referenced_assembly_id)
order by 1, 2

No comments:

Post a Comment

Total Pageviews