Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Generating XML Schema of SQL Server 2005 Database

Generating XML Schema of SQL Server 2005 Database

Scheduled Pinned Locked Moved Database
databasexmlsql-serversysadminhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rocky
    wrote on last edited by
    #1

    hi everyone, I've been trying to make the XML Schema of my SQL Server Database and currently I've found this to generate an XSD schema,

    create table Person
    (
    Age int not NULL check( Age > 0) ,
    Height numeric(10,2) not NULL check( Height > 5),
    Gender varchar(5) not null check( Gender in (’M', ‘F’, ‘O’)),
    BirthDate datetime null,
    )
    DECLARE @schema xml
    SET @schema = (SELECT * FROM Person FOR XML AUTO, ELEMENTS, XMLSCHEMA(’PersonSchema’))
    select @schema
    OUTPUT:

    But the problem is that this is generating the schema of only one table where as I want to generate the schema of the whole Database, Can u suggest some quick solution for that? Thanks in advance

    Rocky Success is a ladder which you can't climb with your hands in your pockets.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups