June 15, 2012

sp_xml_schema_rowset (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_xml_schema_rowset(nvarchar @collection_name
, nvarchar @schema_name
, nvarchar @target_namespace)

MetaData:

   
create procedure sys.sp_xml_schema_rowset
(
@collection_name sysname,
@schema_name sysname = null,
@target_namespace sysname = null
)
as
select
SCHEMACOLLECTION_CATALOGNAME = xsv.SCHEMACOLLECTION_CATALOGNAME,
SCHEMACOLLECTION_SCHEMANAME = xsv.SCHEMACOLLECTION_SCHEMANAME,
SCHEMACOLLECTIONNAME = xsv.SCHEMACOLLECTIONNAME,
TARGETNAMESPACEURI = xsv.TARGETNAMESPACEURI,
SCHEMACONTENT = xsv.SCHEMACONTENT

from
sys.spt_xml_schema_view xsv

where
xsv.schemacollectionname = @collection_name and
(@schema_name is null or xsv.schema_id = schema_id(@schema_name)) and
(@target_namespace is null or @target_namespace = xsv.targetnamespaceuri)

order by 1,2,3,4

No comments:

Post a Comment

Total Pageviews