views:

312

answers:

1

What is the easiest method to generate an XSD schema from a 2005 SQL Server Database?

Would it be possible to generate one XSD schema for the entire Database (~100 tables)?

I searched online and found a SQL example that generates one XSD for the one table:

DECLARE @schema xml
SET @schema = (SELECT * FROM MyTableName FOR XML AUTO, ELEMENTS, XMLSCHEMA('MyTableNameSchema'))
SELECT @schema

Outside of SQL Server, is there a third party tool that could generate the XSD file from the 2005 Database?