November 8, 2005 at 7:32 am
I am learning about XML. I want to know how I can see all the XML Schema's in a database when I don't know the schema names? Does anyone know how I can do this?
Robert W. Marda
Billing and OSS Specialist - SQL Programmer
MCL Systems
November 8, 2005 at 9:58 am
Did you take a look at the xml_schema_namespace function to query SQL Server?
Not sure if this will get you what you want but maybe it will be a place to start.
November 8, 2005 at 10:03 am
I will look at that again. The last time I looked at it and tried to use it, it seemed to require a schema name to work properly.
Robert W. Marda
Billing and OSS Specialist - SQL Programmer
MCL Systems
November 8, 2005 at 10:30 am
did you go with a default schema such as n'dbo since SQL uses schema now for db storage?
November 10, 2005 at 3:44 pm
I found this code at the end of a sample for creating XML Schema's. I kept getting the same result when I executed and the one item listed in each result wasn't helpful. I finally figured out how to add my own schema's and then ran these again and there was the collecion name and the namespace names I used.
Thanks for your help Stacy as your comments kept me looking at xml_schema_namespaces.
-- Verify - list of collections in the database.
select
*
from
sys.xml_schema_collections
-- Verify - list of namespaces in the database.
select
*
from
sys.xml_schema_namespaces
Robert W. Marda
Billing and OSS Specialist - SQL Programmer
MCL Systems
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply