Showing posts with label schemas. Show all posts
Showing posts with label schemas. Show all posts

Monday, March 26, 2012

Generating XSD schema from an sql server table

I am using XSD schemas in .net but have to generate them manually.
Is it possible to automatically get the validation information from a table in SQL server?
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
<chris4england> wrote in message
news:%23Xb8L4NlEHA.3520@.tk2msftngp13.phx.gbl...
>I am using XSD schemas in .net but have to generate them manually.
> Is it possible to automatically get the validation information from a
> table in SQL server?
You could probably write a stored procedure that generated XSD from the
sysobjects table, but it would be pretty complex and might not contain all
the validation you need.
This would be the only way that I know of. Part of the problem is that XSD's
generally contain information that isn't in SQL Server.
Bryant
|||In SQL Server 2005, you will be able to infer an XSD for the RAW and AUTO
modes in FOR XML.
E.g.,
select top 0 * from table for xml auto, xmlschema
In SQL Server 2000, you can generate an XDR schema in the following way
select top 0 * from table for xml auto, xmldata
and then use one of the XDR->XSD tools to generate the XSD from it.
Note that you probably still want to then edit the schema to add your own
constraints.
Best regards
Michael
"Bryant Likes" <bryant@.suespammers.org> wrote in message
news:u9ykRxblEHA.3104@.TK2MSFTNGP14.phx.gbl...
> <chris4england> wrote in message
> news:%23Xb8L4NlEHA.3520@.tk2msftngp13.phx.gbl...
> You could probably write a stored procedure that generated XSD from the
> sysobjects table, but it would be pretty complex and might not contain all
> the validation you need.
> This would be the only way that I know of. Part of the problem is that
> XSD's generally contain information that isn't in SQL Server.
> --
> Bryant
>

Friday, March 9, 2012

generate SQL Script

Hello,
Is possible to generate SQL script which included all schemas and data as
well...
I use "Generate SQL Script" can only generate table schema, store proc,..
but no data inside..
but i believe that it should have a method bcoz some partner will send these
script to me to import db/table
any ideas... Thanks in advanced.http://www.karaszi.com/SQLServer/info_generate_script.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"beachboy" <stanley@.javacatz.com> wrote in message news:%23IW$5HthGHA.1864@.TK2MSFTNGP02.phx.gbl...
> Hello,
> Is possible to generate SQL script which included all schemas and data as
> well...
> I use "Generate SQL Script" can only generate table schema, store proc,..
> but no data inside..
> but i believe that it should have a method bcoz some partner will send these
> script to me to import db/table
> any ideas... Thanks in advanced.
>|||Thank you for your reply.
Is must to use third-party application? Thanks.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> ?
news:%23jRpxJthGHA.3756@.TK2MSFTNGP02.phx.gbl ?...
> http://www.karaszi.com/SQLServer/info_generate_script.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "beachboy" <stanley@.javacatz.com> wrote in message
news:%23IW$5HthGHA.1864@.TK2MSFTNGP02.phx.gbl...
> > Hello,
> >
> > Is possible to generate SQL script which included all schemas and data
as
> > well...
> >
> > I use "Generate SQL Script" can only generate table schema, store
proc,..
> > but no data inside..
> > but i believe that it should have a method bcoz some partner will send
these
> > script to me to import db/table
> >
> > any ideas... Thanks in advanced.
> >
> >|||> Is must to use third-party application?
Yes, there's no built-in support for generating ddl and data.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"beachboy" <stanley@.javacatz.com> wrote in message news:%233u%23LOthGHA.4504@.TK2MSFTNGP03.phx.gbl...
> Thank you for your reply.
> Is must to use third-party application? Thanks.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> ?
> news:%23jRpxJthGHA.3756@.TK2MSFTNGP02.phx.gbl ?...
>> http://www.karaszi.com/SQLServer/info_generate_script.asp
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "beachboy" <stanley@.javacatz.com> wrote in message
> news:%23IW$5HthGHA.1864@.TK2MSFTNGP02.phx.gbl...
>> > Hello,
>> >
>> > Is possible to generate SQL script which included all schemas and data
> as
>> > well...
>> >
>> > I use "Generate SQL Script" can only generate table schema, store
> proc,..
>> > but no data inside..
>> > but i believe that it should have a method bcoz some partner will send
> these
>> > script to me to import db/table
>> >
>> > any ideas... Thanks in advanced.
>> >
>> >
>

generate SQL Script

Hello,
Is possible to generate SQL script which included all schemas and data as
well...
I use "Generate SQL Script" can only generate table schema, store proc,..
but no data inside..
but i believe that it should have a method bcoz some partner will send these
script to me to import db/table
any ideas... Thanks in advanced.http://www.karaszi.com/SQLServer/in...rate_script.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"beachboy" <stanley@.javacatz.com> wrote in message news:%23IW$5HthGHA.1864@.TK2MSFTNGP02.phx.
gbl...
> Hello,
> Is possible to generate SQL script which included all schemas and data as
> well...
> I use "Generate SQL Script" can only generate table schema, store proc,..
> but no data inside..
> but i believe that it should have a method bcoz some partner will send the
se
> script to me to import db/table
> any ideas... Thanks in advanced.
>|||Thank you for your reply.
Is must to use third-party application? Thanks.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> ?
news:%23jRpxJthGHA.3756@.TK2MSFTNGP02.phx.gbl ?...
> http://www.karaszi.com/SQLServer/in...rate_script.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "beachboy" <stanley@.javacatz.com> wrote in message
news:%23IW$5HthGHA.1864@.TK2MSFTNGP02.phx.gbl...[vbcol=seagreen]
as[vbcol=seagreen]
proc,..[vbcol=seagreen]
these[vbcol=seagreen]|||> Is must to use third-party application?
Yes, there's no built-in support for generating ddl and data.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"beachboy" <stanley@.javacatz.com> wrote in message news:%233u%23LOthGHA.4504@.TK2MSFTNGP03.ph
x.gbl...
> Thank you for your reply.
> Is must to use third-party application? Thanks.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> ?
> news:%23jRpxJthGHA.3756@.TK2MSFTNGP02.phx.gbl ?...
> news:%23IW$5HthGHA.1864@.TK2MSFTNGP02.phx.gbl...
> as
> proc,..
> these
>