Showing posts with label schema. Show all posts
Showing posts with label schema. 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
>

Generating XMLdata based on the schema

How to generate XMLdata based on the schema in SQL SERVER 2005?

Are there any features in SQLServer2005 to achieve this using Xml datatype ,SQLXML 4.0?

Please suggest me in this regard.

Thanks

vaishu

SQL Server has the FOR XML xml construction modes which you can use to generate XML from your relational schema. Examples of this support are here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/forxml2k5.asp

In addition SQLXML 4.0 has mappings from XSD schema to relational schema, in case you need to map between these two types for schemas. An introduction to these can be found here:

http://msdn2.microsoft.com/en-us/library/ms171870(SQL.90).aspx

|||

Thanks for the reply

you can close treat this request as closed.

vaishu

Generating XMLdata based on the schema

How to generate XMLdata based on the schema in SQL SERVER 2005?

Are there any features in SQLServer2005 to achieve this using Xml datatype ,SQLXML 4.0?

Please suggest me in this regard.

Thanks

vaishu

SQL Server has the FOR XML xml construction modes which you can use to generate XML from your relational schema. Examples of this support are here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/forxml2k5.asp

In addition SQLXML 4.0 has mappings from XSD schema to relational schema, in case you need to map between these two types for schemas. An introduction to these can be found here:

http://msdn2.microsoft.com/en-us/library/ms171870(SQL.90).aspx

|||

Thanks for the reply

you can close treat this request as closed.

vaishu

generating XML to validated against the schema

hi,
I have a sample xml data and sample xsd as follows: the xsd is really big
and runs into 4 pages. I need to stored data into the data base
and generate xml that validates against this schema.
the sqlxml bulk load and view mapper fails to recognize the xsd fine.
Can some one point me to the right direction .
Infact storing is working but generating the xml
using EXPLICIT option is really a pain.
Regards,
Balajee
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="StrategicPerformanceContract"
targetNamespace="http://tempuri.org/StrategicPerformanceContract.xsd"
elementFormDefault="qualified"
xmlns="http://tempuri.org/StrategicPerformanceContract.xsd"
xmlns:mstns="http://tempuri.org/StrategicPerformanceContract.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:documentation>Strategic Performance Contract</xs:documentation>
</xs:annotation>
<xs:element name="root" type="contractType" />
<xs:complexType name="contractType">
<xs:sequence>
<xs:element name="transactionHeader" type="transactionHeaderType" />
<xs:element name="documentHeader" type="documentHeaderType" />
<xs:element name="strategicDirection" type="strategicDirectionType" />
<xs:element name="strategicChoices" type="strategicChoicesType" />
<xs:element name="riskManagement" type="riskManagementType" />
<xs:element name="performanceContract" type="performanceContractType" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="transactionHeaderType">
<xs:sequence>
<xs:element name="userName" type="xs:string" />
</xs:sequence>
<xs:attribute name="gid" type="xs:unsignedLong"/>
</xs:complexType>
<xs:complexType name="documentHeaderType">
<xs:sequence>
<xs:element name="contractType" type="xs:ID" />
<xs:element name="abbr" type="xs:string" />
<xs:element name="leftTitle1" type="xs:string" />
<xs:element name="leftTitle2" type="xs:string" />
<xs:element name="rightTitle1" type="xs:string" />
<xs:element name="asofDate" type="xs:string" />
</xs:sequence>
<xs:attribute name="gid" type="xs:unsignedLong"/>
</xs:complexType>
<xs:complexType name="strategicDirectionType">
<xs:sequence>
<xs:element name="header" type="headerType" />
<xs:element name="strategicObjective" type="strategicObjectiveType"
minOccurs="0" maxOccurs="unbounded" />
<xs:element name="footnotes" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="headerType">
<xs:sequence>
<xs:element name="vpuMission" type="xs:string" />
<xs:element name="strategicContext" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="strategicObjectiveType">
<xs:sequence>
<xs:element name="objective" type="objectiveType" />
<xs:element name="subObjective" type="objectiveType" minOccurs="0"
maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
What are the problems you get when using the Schema and adding mapping
annotations?
Thanks
Michael
"balajee" <balajee@.discussions.microsoft.com> wrote in message
news:65C72C0A-D8C6-4CA3-ADD4-CBACEB16F58F@.microsoft.com...
> hi,
> I have a sample xml data and sample xsd as follows: the xsd is really big
> and runs into 4 pages. I need to stored data into the data base
> and generate xml that validates against this schema.
> the sqlxml bulk load and view mapper fails to recognize the xsd fine.
> Can some one point me to the right direction .
> Infact storing is working but generating the xml
> using EXPLICIT option is really a pain.
> Regards,
> Balajee
>
> <?xml version="1.0" encoding="utf-8" ?>
> <xs:schema id="StrategicPerformanceContract"
> targetNamespace="http://tempuri.org/StrategicPerformanceContract.xsd"
> elementFormDefault="qualified"
> xmlns="http://tempuri.org/StrategicPerformanceContract.xsd"
> xmlns:mstns="http://tempuri.org/StrategicPerformanceContract.xsd"
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:annotation>
> <xs:documentation>Strategic Performance Contract</xs:documentation>
> </xs:annotation>
> <xs:element name="root" type="contractType" />
> <xs:complexType name="contractType">
> <xs:sequence>
> <xs:element name="transactionHeader" type="transactionHeaderType" />
> <xs:element name="documentHeader" type="documentHeaderType" />
> <xs:element name="strategicDirection" type="strategicDirectionType" />
> <xs:element name="strategicChoices" type="strategicChoicesType" />
> <xs:element name="riskManagement" type="riskManagementType" />
> <xs:element name="performanceContract" type="performanceContractType" />
> </xs:sequence>
> </xs:complexType>
> <xs:complexType name="transactionHeaderType">
> <xs:sequence>
> <xs:element name="userName" type="xs:string" />
> </xs:sequence>
> <xs:attribute name="gid" type="xs:unsignedLong"/>
> </xs:complexType>
> <xs:complexType name="documentHeaderType">
> <xs:sequence>
> <xs:element name="contractType" type="xs:ID" />
> <xs:element name="abbr" type="xs:string" />
> <xs:element name="leftTitle1" type="xs:string" />
> <xs:element name="leftTitle2" type="xs:string" />
> <xs:element name="rightTitle1" type="xs:string" />
> <xs:element name="asofDate" type="xs:string" />
> </xs:sequence>
> <xs:attribute name="gid" type="xs:unsignedLong"/>
> </xs:complexType>
> <xs:complexType name="strategicDirectionType">
> <xs:sequence>
> <xs:element name="header" type="headerType" />
> <xs:element name="strategicObjective" type="strategicObjectiveType"
> minOccurs="0" maxOccurs="unbounded" />
> <xs:element name="footnotes" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> <xs:complexType name="headerType">
> <xs:sequence>
> <xs:element name="vpuMission" type="xs:string" />
> <xs:element name="strategicContext" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> <xs:complexType name="strategicObjectiveType">
> <xs:sequence>
> <xs:element name="objective" type="objectiveType" />
> <xs:element name="subObjective" type="objectiveType" minOccurs="0"
> maxOccurs="unbounded" />
> </xs:sequence>
> </xs:complexType>
|||Michael,
I am trying to map the schema using sql viewmapper and
it gives me an error :
Error while parsing
:Incorrect definition for the root element in schema.
Line 7 Position 63
xmlns:xs="http://www.w3.org/2001/XMLSchema">
regards,
Balajee
"Michael Rys [MSFT]" wrote:

> What are the problems you get when using the Schema and adding mapping
> annotations?
> Thanks
> Michael
> "balajee" <balajee@.discussions.microsoft.com> wrote in message
> news:65C72C0A-D8C6-4CA3-ADD4-CBACEB16F58F@.microsoft.com...
>
>
|||Unfortunately, the SQL Viewmapper only works for the older Microsoft schema
language known as XDR and not with the W3C XML Schema language (that you
seem to be using). This unfortunately means that you either need a
third-party tool vendor or notepad.
Best regards
Michael
"balajee" <balajee@.discussions.microsoft.com> wrote in message
news:0EA7E4AD-F94D-4021-8A22-FE327F1B786B@.microsoft.com...[vbcol=seagreen]
> Michael,
> I am trying to map the schema using sql viewmapper and
> it gives me an error :
> Error while parsing
> :Incorrect definition for the root element in schema.
> Line 7 Position 63
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
>
> regards,
> Balajee
>
> "Michael Rys [MSFT]" wrote:
sql

Generating XML Schema from db tables - including field lengths

I'm working on a C# project that essentially features a dump of the
database (on SQL Server 2005) into an XML file, with schema.
Basically we want the users to be able to take this data anywhere, as
easily as is possible. I initially selected the information "For XML
Auto" etc. etc. but found that when I tested simple imports of that
XML with the likes of Access and Excel, those programs didn't take
well to the schema at all.
Switching gears, I queried the databases normally and did the XML
conversion in C# using the dataset.writeXML function with schema,
which generated schema that made Access and Excel much happier. The
only thing is that Access, upon creating tables based on the schema,
took the string fields to be text, rather than memo. (i.e.
varchar(255) instead of text) ... likewise, SQL Server, when
wrestling to create tables based on the schema, behaves similarly.
Mind you, when the tables are created beforehand, and just populated
with the XML data, that's fine, it works great.
I do realize that's how it's supposed to work, but I'm being asked to
generate a schema that includes maxLength for varchar fields -- even
though I doubt any program that would be importing this data would
even be able to read that from the schema and use it appropriately.
I'm hoping someone here can tell me there's a nicer way of doing that
than SELECTing FOR XML RAW and drawing up an XSLT.
Takers?Did you use the xmlschema directive on FOR XML AUTO or RAW?
Best regards
Michael
"Matthew Dunphy" <leviathant@.gmail.com> wrote in message
news:1172246553.987853.109810@.j27g2000cwj.googlegroups.com...
> I'm working on a C# project that essentially features a dump of the
> database (on SQL Server 2005) into an XML file, with schema.
> Basically we want the users to be able to take this data anywhere, as
> easily as is possible. I initially selected the information "For XML
> Auto" etc. etc. but found that when I tested simple imports of that
> XML with the likes of Access and Excel, those programs didn't take
> well to the schema at all.
> Switching gears, I queried the databases normally and did the XML
> conversion in C# using the dataset.writeXML function with schema,
> which generated schema that made Access and Excel much happier. The
> only thing is that Access, upon creating tables based on the schema,
> took the string fields to be text, rather than memo. (i.e.
> varchar(255) instead of text) ... likewise, SQL Server, when
> wrestling to create tables based on the schema, behaves similarly.
> Mind you, when the tables are created beforehand, and just populated
> with the XML data, that's fine, it works great.
> I do realize that's how it's supposed to work, but I'm being asked to
> generate a schema that includes maxLength for varchar fields -- even
> though I doubt any program that would be importing this data would
> even be able to read that from the schema and use it appropriately.
> I'm hoping someone here can tell me there's a nicer way of doing that
> than SELECTing FOR XML RAW and drawing up an XSLT.
> Takers?
>|||Both -- when I used AUTO, it worked great except that it doesn't
output the maxlength for the varchar fields. Everything else it does
is kind of magical.
When I use RAW, it outputs each column, but again, nothing about the
(3000) for a row that is varchar(3000).
To be specific, the select statement that comes closest to what I want
looks basically like this:
SELECT *
FROM table
WHERE id=@.id
FOR XML AUTO, ELEMENTS, XMLDATA
(I do this for about a dozen tables)
In the resulting schema, the ElementType nodes have attributes for
name, content, model, and dt:type... is there some way to also specify
maxLength, based off the table schema in SQL server, so that I can do
a simple query like this -- or do I just have to bite the bullet and
write the schemas manually?
Thanks!
--Matt Dunphy
On Feb 24, 1:42 am, "Michael Rys [MSFT]" <m...@.online.microsoft.com>
wrote:
> Did you use the xmlschema directive on FOR XML AUTO or RAW?
> Best regards
> Michael
> "Matthew Dunphy" <leviath...@.gmail.com> wrote in message
> news:1172246553.987853.109810@.j27g2000cwj.googlegroups.com...
>
>
>
>|||Actually... never mind that last post, I think you've pointed me in
the right direction. (That's what I get for posting first thing in
the morning!) Thanks for your help.
On Feb 26, 9:14 am, "Matthew Dunphy" <leviath...@.gmail.com> wrote:
> Both -- when I used AUTO, it worked great except that it doesn't
> output the maxlength for the varchar fields. Everything else it does
> is kind of magical.
> When I use RAW, it outputs each column, but again, nothing about the
> (3000) for a row that is varchar(3000).
> To be specific, the select statement that comes closest to what I want
> looks basically like this:
> SELECT *
> FROM table
> WHERE id=@.id
> FOR XML AUTO, ELEMENTS, XMLDATA
> (I do this for about a dozen tables)
> In the resulting schema, the ElementType nodes have attributes for
> name, content, model, and dt:type... is there some way to also specify
> maxLength, based off the table schema in SQL server, so that I can do
> a simple query like this -- or do I just have to bite the bullet and
> write the schemas manually?
> Thanks!
> --Matt Dunphy
>

Generating XML Schema from db tables - including field lengths

I'm working on a C# project that essentially features a dump of the
database (on SQL Server 2005) into an XML file, with schema.
Basically we want the users to be able to take this data anywhere, as
easily as is possible. I initially selected the information "For XML
Auto" etc. etc. but found that when I tested simple imports of that
XML with the likes of Access and Excel, those programs didn't take
well to the schema at all.
Switching gears, I queried the databases normally and did the XML
conversion in C# using the dataset.writeXML function with schema,
which generated schema that made Access and Excel much happier. The
only thing is that Access, upon creating tables based on the schema,
took the string fields to be text, rather than memo. (i.e.
varchar(255) instead of text) ... likewise, SQL Server, when
wrestling to create tables based on the schema, behaves similarly.
Mind you, when the tables are created beforehand, and just populated
with the XML data, that's fine, it works great.
I do realize that's how it's supposed to work, but I'm being asked to
generate a schema that includes maxLength for varchar fields -- even
though I doubt any program that would be importing this data would
even be able to read that from the schema and use it appropriately.
I'm hoping someone here can tell me there's a nicer way of doing that
than SELECTing FOR XML RAW and drawing up an XSLT.
Takers?
Did you use the xmlschema directive on FOR XML AUTO or RAW?
Best regards
Michael
"Matthew Dunphy" <leviathant@.gmail.com> wrote in message
news:1172246553.987853.109810@.j27g2000cwj.googlegr oups.com...
> I'm working on a C# project that essentially features a dump of the
> database (on SQL Server 2005) into an XML file, with schema.
> Basically we want the users to be able to take this data anywhere, as
> easily as is possible. I initially selected the information "For XML
> Auto" etc. etc. but found that when I tested simple imports of that
> XML with the likes of Access and Excel, those programs didn't take
> well to the schema at all.
> Switching gears, I queried the databases normally and did the XML
> conversion in C# using the dataset.writeXML function with schema,
> which generated schema that made Access and Excel much happier. The
> only thing is that Access, upon creating tables based on the schema,
> took the string fields to be text, rather than memo. (i.e.
> varchar(255) instead of text) ... likewise, SQL Server, when
> wrestling to create tables based on the schema, behaves similarly.
> Mind you, when the tables are created beforehand, and just populated
> with the XML data, that's fine, it works great.
> I do realize that's how it's supposed to work, but I'm being asked to
> generate a schema that includes maxLength for varchar fields -- even
> though I doubt any program that would be importing this data would
> even be able to read that from the schema and use it appropriately.
> I'm hoping someone here can tell me there's a nicer way of doing that
> than SELECTing FOR XML RAW and drawing up an XSLT.
> Takers?
>
|||Both -- when I used AUTO, it worked great except that it doesn't
output the maxlength for the varchar fields. Everything else it does
is kind of magical.
When I use RAW, it outputs each column, but again, nothing about the
(3000) for a row that is varchar(3000).
To be specific, the select statement that comes closest to what I want
looks basically like this:
SELECT *
FROM table
WHERE id=@.id
FOR XML AUTO, ELEMENTS, XMLDATA
(I do this for about a dozen tables)
In the resulting schema, the ElementType nodes have attributes for
name, content, model, and dt:type... is there some way to also specify
maxLength, based off the table schema in SQL server, so that I can do
a simple query like this -- or do I just have to bite the bullet and
write the schemas manually?
Thanks!
--Matt Dunphy
On Feb 24, 1:42 am, "Michael Rys [MSFT]" <m...@.online.microsoft.com>
wrote:[vbcol=seagreen]
> Did you use the xmlschema directive on FOR XML AUTO or RAW?
> Best regards
> Michael
> "Matthew Dunphy" <leviath...@.gmail.com> wrote in message
> news:1172246553.987853.109810@.j27g2000cwj.googlegr oups.com...
>
>
|||Actually... never mind that last post, I think you've pointed me in
the right direction. (That's what I get for posting first thing in
the morning!) Thanks for your help.
On Feb 26, 9:14 am, "Matthew Dunphy" <leviath...@.gmail.com> wrote:
> Both -- when I used AUTO, it worked great except that it doesn't
> output the maxlength for the varchar fields. Everything else it does
> is kind of magical.
> When I use RAW, it outputs each column, but again, nothing about the
> (3000) for a row that is varchar(3000).
> To be specific, the select statement that comes closest to what I want
> looks basically like this:
> SELECT *
> FROM table
> WHERE id=@.id
> FOR XML AUTO, ELEMENTS, XMLDATA
> (I do this for about a dozen tables)
> In the resulting schema, the ElementType nodes have attributes for
> name, content, model, and dt:type... is there some way to also specify
> maxLength, based off the table schema in SQL server, so that I can do
> a simple query like this -- or do I just have to bite the bullet and
> write the schemas manually?
> Thanks!
> --Matt Dunphy
>

Generating XML Schema for SQL Server Table

how can persist schema for a sql server table into an xml file from .net application?

thanks

If you already loaded the structure in a dataset, you can just use the WriteXMLSchema Method on the dataset object.

http://msdn2.microsoft.com/en-us/library/system.data.dataset.writexmlschema.aspx

Jens K. Suessmeyer.

http://www.sqlserver2005.de

Generating XML data based on the Schema

Hi,

i have the following requirement

Can a stored procedure in SQL Server 2005 generate XML data based on the schema, We don't prefer to manually build an xml string inside the stored proc?

Is there any SQL Server 2005 feature to do it if possible?

i appreciate your help.

Thanks,

Vaishu

Can a stored procedure in SQL Server 2005 generate XML data based on the schema?

Yes...

Create Proc dbo.GenXMLWithSchemaValidation
As
Begin
Set Nocount On

DECLARE @.x XML (HumanResources.HRResumeSchemaCollection)
SET @.x = (
SELECT ContactID,
FirstName,
LastName,
AdditionalContactInfo.query('
declare namespace aci="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactInfo";
declare namespace act="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactTypes";
//act:telephoneNumber/act:number') as MorePhoneNumbers
FROM Person.Contact
FOR XML AUTO, TYPE)
SELECT @.x
Set Nocount Off
End

Hope this helps,

Derek

|||

Thanks Derek

i appreciate your help.

Vaishu

Friday, March 23, 2012

Generating XML data based on the Schema

Hi,

i have the following requirement

Can a stored procedure in SQL Server 2005 generate XML data based on the schema, We don't prefer to manually build an xml string inside the stored proc?

Is there any SQL Server 2005 feature to do it if possible?

i appreciate your help.

Thanks,

Vaishu

Can a stored procedure in SQL Server 2005 generate XML data based on the schema?

Yes...

Create Proc dbo.GenXMLWithSchemaValidation
As
Begin
Set Nocount On

DECLARE @.x XML (HumanResources.HRResumeSchemaCollection)
SET @.x = (
SELECT ContactID,
FirstName,
LastName,
AdditionalContactInfo.query('
declare namespace aci="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactInfo";
declare namespace act="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactTypes";
//act:telephoneNumber/act:number') as MorePhoneNumbers
FROM Person.Contact
FOR XML AUTO, TYPE)
SELECT @.x
Set Nocount Off
End

Hope this helps,

Derek

|||

Thanks Derek

i appreciate your help.

Vaishu

Generating XML based on XMLSchema in a SQLSERVER2005 Stored procedure

Can a stored procedure in SQLSERVER 2005 generate XMLdata based on the schema?

Are there any features in SQLServer2005 to achieve this ?

Please suggest me in this regard.

Thanks

vaishu

Yes this is possible. Michael Rys' article about FOR XML support and the Xml datatype shows examples of this:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/forxml2k5.asp

|||

thanks for the reply.

vaishu

|||

Can sqlserver 2005 generete XML schema for the whole database ?

Can anyone suggest us on this.

thanks

oak-net

Generating XML based on XMLSchema in a SQLSERVER2005 Stored procedure

Can a stored procedure in SQLSERVER 2005 generate XMLdata based on the schema?

Are there any features in SQLServer2005 to achieve this ?

Please suggest me in this regard.

Thanks

vaishu

Yes this is possible. Michael Rys' article about FOR XML support and the Xml datatype shows examples of this:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/forxml2k5.asp

|||

thanks for the reply.

vaishu

|||

Can sqlserver 2005 generete XML schema for the whole database ?

Can anyone suggest us on this.

thanks

oak-net

sql

Generating XML based on Schema

Hi,

i need Info regarding this

Can a stored procedure in SQL Server 2005 generate XML data based on the schema, We don't prefer to manually build an xml string inside the stored proc?

Is there any SQL Server 2005 feature to do it if possible?

Can i find any article on how to do this.

Thanks,

Vaishu

How about using "FOR XML AUTO" in your select!

select * from tbl1 FOR XML AUTO

Monday, March 19, 2012

generating database script

Is it possible to generate the t-sql script for a database schema and the
data from .Net(C#) at all?
Cheers
Ollie Richesfound this so far
http://www.sqlteam.com/item.asp?ItemID=17320
"Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
news:#nWrfWEEFHA.2876@.TK2MSFTNGP12.phx.gbl...
> Is it possible to generate the t-sql script for a database schema and the
> data from .Net(C#) at all?
> Cheers
> Ollie Riches
>|||Check out also free tool CodeSmith at www.ericjsmith.net/codesmith
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
SLODUG - Slovene Developer Users Group www.codezone-si.info
"Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
news:%23nWrfWEEFHA.2876@.TK2MSFTNGP12.phx.gbl...
> Is it possible to generate the t-sql script for a database schema and the
> data from .Net(C#) at all?
> Cheers
> Ollie Riches
>|||thanks but I don't want a code generator, I am looking for a programmatic
approach to scripting out the database schema and the dat contained in the
database, just like you can through sql server 2000 enterprise manager
Cheers
Ollie Riches
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:eW5zGnEEFHA.1496@.TK2MSFTNGP14.phx.gbl...
> Check out also free tool CodeSmith at www.ericjsmith.net/codesmith
> --
> Miha Markic [MVP C#] - RightHand .NET consulting & development
> www.rthand.com
> SLODUG - Slovene Developer Users Group www.codezone-si.info
> "Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
> news:%23nWrfWEEFHA.2876@.TK2MSFTNGP12.phx.gbl...
the[vbcol=seagreen]
>|||The only accessible code I know of for this is in DMO, which is a COM based
API. You can find a tiny
(classical VB) example here, among other things:
http://www.karaszi.com/SQLServer/in...rate_script.asp
With 2005, we can use SMO for this, which is managed code.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
news:OCYb7qEEFHA.2700@.TK2MSFTNGP14.phx.gbl...
> thanks but I don't want a code generator, I am looking for a programmatic
> approach to scripting out the database schema and the dat contained in the
> database, just like you can through sql server 2000 enterprise manager
> Cheers
> Ollie Riches
> "Miha Markic [MVP C#]" <miha at rthand com> wrote in message
> news:eW5zGnEEFHA.1496@.TK2MSFTNGP14.phx.gbl...
> the
>|||thanks
Ollie
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eqgDR6EEFHA.3592@.TK2MSFTNGP15.phx.gbl...
> The only accessible code I know of for this is in DMO, which is a COM
based API. You can find a tiny
> (classical VB) example here, among other things:
> http://www.karaszi.com/SQLServer/in...rate_script.asp
> With 2005, we can use SMO for this, which is managed code.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
> news:OCYb7qEEFHA.2700@.TK2MSFTNGP14.phx.gbl...
programmatic[vbcol=seagreen]
the[vbcol=seagreen]
>|||Ollie,
Not quite.
You can most certainly write a bunch of queries to read the master db and
peice the info together, and you can leverage on the FillSchema methods, but
ADO.NET is not a schema/script generator.
- Sahil Malik
http://codebetter.com/blogs/sahil.malik/
"Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
news:#nWrfWEEFHA.2876@.TK2MSFTNGP12.phx.gbl...
> Is it possible to generate the t-sql script for a database schema and the
> data from .Net(C#) at all?
> Cheers
> Ollie Riches
>

generating database script

Is it possible to generate the t-sql script for a database schema and the
data from .Net(C#) at all?
Cheers
Ollie Richesfound this so far
http://www.sqlteam.com/item.asp?ItemID=17320
"Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
news:#nWrfWEEFHA.2876@.TK2MSFTNGP12.phx.gbl...
> Is it possible to generate the t-sql script for a database schema and the
> data from .Net(C#) at all?
> Cheers
> Ollie Riches
>|||Check out also free tool CodeSmith at www.ericjsmith.net/codesmith
--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
SLODUG - Slovene Developer Users Group www.codezone-si.info
"Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
news:%23nWrfWEEFHA.2876@.TK2MSFTNGP12.phx.gbl...
> Is it possible to generate the t-sql script for a database schema and the
> data from .Net(C#) at all?
> Cheers
> Ollie Riches
>|||thanks but I don't want a code generator, I am looking for a programmatic
approach to scripting out the database schema and the dat contained in the
database, just like you can through sql server 2000 enterprise manager
Cheers
Ollie Riches
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:eW5zGnEEFHA.1496@.TK2MSFTNGP14.phx.gbl...
> Check out also free tool CodeSmith at www.ericjsmith.net/codesmith
> --
> Miha Markic [MVP C#] - RightHand .NET consulting & development
> www.rthand.com
> SLODUG - Slovene Developer Users Group www.codezone-si.info
> "Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
> news:%23nWrfWEEFHA.2876@.TK2MSFTNGP12.phx.gbl...
> > Is it possible to generate the t-sql script for a database schema and
the
> > data from .Net(C#) at all?
> >
> > Cheers
> >
> > Ollie Riches
> >
> >
>|||The only accessible code I know of for this is in DMO, which is a COM based API. You can find a tiny
(classical VB) example here, among other things:
http://www.karaszi.com/SQLServer/info_generate_script.asp
With 2005, we can use SMO for this, which is managed code.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
news:OCYb7qEEFHA.2700@.TK2MSFTNGP14.phx.gbl...
> thanks but I don't want a code generator, I am looking for a programmatic
> approach to scripting out the database schema and the dat contained in the
> database, just like you can through sql server 2000 enterprise manager
> Cheers
> Ollie Riches
> "Miha Markic [MVP C#]" <miha at rthand com> wrote in message
> news:eW5zGnEEFHA.1496@.TK2MSFTNGP14.phx.gbl...
>> Check out also free tool CodeSmith at www.ericjsmith.net/codesmith
>> --
>> Miha Markic [MVP C#] - RightHand .NET consulting & development
>> www.rthand.com
>> SLODUG - Slovene Developer Users Group www.codezone-si.info
>> "Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
>> news:%23nWrfWEEFHA.2876@.TK2MSFTNGP12.phx.gbl...
>> > Is it possible to generate the t-sql script for a database schema and
> the
>> > data from .Net(C#) at all?
>> >
>> > Cheers
>> >
>> > Ollie Riches
>> >
>> >
>>
>|||thanks
Ollie
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eqgDR6EEFHA.3592@.TK2MSFTNGP15.phx.gbl...
> The only accessible code I know of for this is in DMO, which is a COM
based API. You can find a tiny
> (classical VB) example here, among other things:
> http://www.karaszi.com/SQLServer/info_generate_script.asp
> With 2005, we can use SMO for this, which is managed code.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
> news:OCYb7qEEFHA.2700@.TK2MSFTNGP14.phx.gbl...
> > thanks but I don't want a code generator, I am looking for a
programmatic
> > approach to scripting out the database schema and the dat contained in
the
> > database, just like you can through sql server 2000 enterprise manager
> >
> > Cheers
> >
> > Ollie Riches
> >
> > "Miha Markic [MVP C#]" <miha at rthand com> wrote in message
> > news:eW5zGnEEFHA.1496@.TK2MSFTNGP14.phx.gbl...
> >> Check out also free tool CodeSmith at www.ericjsmith.net/codesmith
> >>
> >> --
> >> Miha Markic [MVP C#] - RightHand .NET consulting & development
> >> www.rthand.com
> >> SLODUG - Slovene Developer Users Group www.codezone-si.info
> >>
> >> "Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
> >> news:%23nWrfWEEFHA.2876@.TK2MSFTNGP12.phx.gbl...
> >> > Is it possible to generate the t-sql script for a database schema and
> > the
> >> > data from .Net(C#) at all?
> >> >
> >> > Cheers
> >> >
> >> > Ollie Riches
> >> >
> >> >
> >>
> >>
> >
> >
>|||Ollie,
Not quite.
You can most certainly write a bunch of queries to read the master db and
peice the info together, and you can leverage on the FillSchema methods, but
ADO.NET is not a schema/script generator.
- Sahil Malik
http://codebetter.com/blogs/sahil.malik/
"Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
news:#nWrfWEEFHA.2876@.TK2MSFTNGP12.phx.gbl...
> Is it possible to generate the t-sql script for a database schema and the
> data from .Net(C#) at all?
> Cheers
> Ollie Riches
>

generating database script

Is it possible to generate the t-sql script for a database schema and the
data from .Net(C#) at all?
Cheers
Ollie Riches
found this so far
http://www.sqlteam.com/item.asp?ItemID=17320
"Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
news:#nWrfWEEFHA.2876@.TK2MSFTNGP12.phx.gbl...
> Is it possible to generate the t-sql script for a database schema and the
> data from .Net(C#) at all?
> Cheers
> Ollie Riches
>
|||Check out also free tool CodeSmith at www.ericjsmith.net/codesmith
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
SLODUG - Slovene Developer Users Group www.codezone-si.info
"Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
news:%23nWrfWEEFHA.2876@.TK2MSFTNGP12.phx.gbl...
> Is it possible to generate the t-sql script for a database schema and the
> data from .Net(C#) at all?
> Cheers
> Ollie Riches
>
|||thanks but I don't want a code generator, I am looking for a programmatic
approach to scripting out the database schema and the dat contained in the
database, just like you can through sql server 2000 enterprise manager
Cheers
Ollie Riches
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:eW5zGnEEFHA.1496@.TK2MSFTNGP14.phx.gbl...[vbcol=seagreen]
> Check out also free tool CodeSmith at www.ericjsmith.net/codesmith
> --
> Miha Markic [MVP C#] - RightHand .NET consulting & development
> www.rthand.com
> SLODUG - Slovene Developer Users Group www.codezone-si.info
> "Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
> news:%23nWrfWEEFHA.2876@.TK2MSFTNGP12.phx.gbl...
the
>
|||The only accessible code I know of for this is in DMO, which is a COM based API. You can find a tiny
(classical VB) example here, among other things:
http://www.karaszi.com/SQLServer/inf...ate_script.asp
With 2005, we can use SMO for this, which is managed code.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
news:OCYb7qEEFHA.2700@.TK2MSFTNGP14.phx.gbl...
> thanks but I don't want a code generator, I am looking for a programmatic
> approach to scripting out the database schema and the dat contained in the
> database, just like you can through sql server 2000 enterprise manager
> Cheers
> Ollie Riches
> "Miha Markic [MVP C#]" <miha at rthand com> wrote in message
> news:eW5zGnEEFHA.1496@.TK2MSFTNGP14.phx.gbl...
> the
>
|||thanks
Ollie
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eqgDR6EEFHA.3592@.TK2MSFTNGP15.phx.gbl...
> The only accessible code I know of for this is in DMO, which is a COM
based API. You can find a tiny[vbcol=seagreen]
> (classical VB) example here, among other things:
> http://www.karaszi.com/SQLServer/inf...ate_script.asp
> With 2005, we can use SMO for this, which is managed code.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
> news:OCYb7qEEFHA.2700@.TK2MSFTNGP14.phx.gbl...
programmatic[vbcol=seagreen]
the
>
|||Ollie,
Not quite.
You can most certainly write a bunch of queries to read the master db and
peice the info together, and you can leverage on the FillSchema methods, but
ADO.NET is not a schema/script generator.
- Sahil Malik
http://codebetter.com/blogs/sahil.malik/
"Ollie Riches" <ollie_riches@.hotmail.com> wrote in message
news:#nWrfWEEFHA.2876@.TK2MSFTNGP12.phx.gbl...
> Is it possible to generate the t-sql script for a database schema and the
> data from .Net(C#) at all?
> Cheers
> Ollie Riches
>

generating database schema thru command line

In informix there is a tool called dbschema which can generate a sql file
to create a database fully. I am aware that in the Enterprise Manager one
can do it easily. However i need the same functionality via command line
so that we can plug the command in the build tool.
TIAEM does it using sql-dmo, take a look a this api.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sqldmo/dmoref_m_g_11rm.asp
AMB
"rkusenet" wrote:
> In informix there is a tool called dbschema which can generate a sql file
> to create a database fully. I am aware that in the Enterprise Manager one
> can do it easily. However i need the same functionality via command line
> so that we can plug the command in the build tool.
> TIA
>|||You can also invoke the functionality of the EM wizards using SQL-NS API.
Look for SQL-NS constant SQLNS_CmdID_GENERATE_SCRIPTS and SQL-NS method
ExecuteCommandByID.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sqlns/ns_ref_78z5.asp
AMB
"Alejandro Mesa" wrote:
> EM does it using sql-dmo, take a look a this api.
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sqldmo/dmoref_m_g_11rm.asp
>
> AMB
> "rkusenet" wrote:
> > In informix there is a tool called dbschema which can generate a sql file
> > to create a database fully. I am aware that in the Enterprise Manager one
> > can do it easily. However i need the same functionality via command line
> > so that we can plug the command in the build tool.
> >
> > TIA
> >|||I've listed some options here:
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/
"rkusenet" <usenet.rk@.gmail.com> wrote in message news:3d9nmvF6rhk35U1@.individual.net...
> In informix there is a tool called dbschema which can generate a sql file to create a database
> fully. I am aware that in the Enterprise Manager one can do it easily. However i need the same
> functionality via command line
> so that we can plug the command in the build tool.
> TIA|||Tibor,
Does SCPTXFR.EXE come with SQL Server 2000 also?
AMB
"rkusenet" wrote:
> In informix there is a tool called dbschema which can generate a sql file
> to create a database fully. I am aware that in the Enterprise Manager one
> can do it easily. However i need the same functionality via command line
> so that we can plug the command in the build tool.
> TIA
>|||you talked about doing a build, I'm wondering if this is part of your daily
or at least scheduled build process?
You may want to save yourself all the time and effort of re-inventing the
wheel...
http://www.dbghost.com
Build, compare, deploy.
"rkusenet" wrote:
> In informix there is a tool called dbschema which can generate a sql file
> to create a database fully. I am aware that in the Enterprise Manager one
> can do it easily. However i need the same functionality via command line
> so that we can plug the command in the build tool.
> TIA
>|||> Does SCPTXFR.EXE come with SQL Server 2000 also?
Seems so. In the upgrade directory :-).
C:\Program Files\Microsoft SQL Server\MSSQL\Upgrade
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:649EF740-EF67-4618-A363-B765823989DC@.microsoft.com...
> Tibor,
> Does SCPTXFR.EXE come with SQL Server 2000 also?
>
> AMB
> "rkusenet" wrote:
>> In informix there is a tool called dbschema which can generate a sql file
>> to create a database fully. I am aware that in the Enterprise Manager one
>> can do it easily. However i need the same functionality via command line
>> so that we can plug the command in the build tool.
>> TIA|||Thanks!!!
"Tibor Karaszi" wrote:
> > Does SCPTXFR.EXE come with SQL Server 2000 also?
> Seems so. In the upgrade directory :-).
> C:\Program Files\Microsoft SQL Server\MSSQL\Upgrade
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
> news:649EF740-EF67-4618-A363-B765823989DC@.microsoft.com...
> > Tibor,
> >
> > Does SCPTXFR.EXE come with SQL Server 2000 also?
> >
> >
> > AMB
> >
> > "rkusenet" wrote:
> >
> >> In informix there is a tool called dbschema which can generate a sql file
> >> to create a database fully. I am aware that in the Enterprise Manager one
> >> can do it easily. However i need the same functionality via command line
> >> so that we can plug the command in the build tool.
> >>
> >> TIA
> >>
>
>

Generating database schema

Is it possible to take an exisiting database and write to a text file the sql schema for the database.

I think you can use SQL server 2005 and export the database schema as a ddl, but I need to do this on SQL server 2000 and preferably c#/vb or a 3rd party control (something I can send to a client to get a copy of there database schema)

Any help or ideas, much appreciated

Thanks

Scott Taylor

You might want to refer to this article: http://www.karaszi.com/SQLServer/info_generate_script.asp -- Adam MachanicSQL Server MVPhttp://www.datamanipulation.net-- <Scott Taylor2@.discussions.microsoft.com> wrote in message news:01811438-cdd4-4d6f-b2c7-234f99dd5f38@.discussions.microsoft.com... Is it possible to take an exisiting database and write to a text file the sql schema for the database. I think you can use SQL server 2005 and export the database schema as a ddl, but I need to do this on SQL server 2000 and preferably c#/vb or a 3rd party control (something I can send to a client to get a copy of there database schema) Any help or ideas, much appreciated Thanks Scott Taylor

Friday, March 9, 2012

generate table or database schema

what is the sql servre equivalent to 'describe' keyword. how do we generate the schema of the database and tables of a database. schema here refers to column names and its types.

Hi,

have a look at the INFORMATION_SCHEMA views, in your case the

INFORMATION_SCHEMA.Columns

Select * from INFORMATION_SCHEMA.Columns

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||is there a way to just list the column name and column types of the tables in a database created by the user and not the system tables.|||

If you are using SQL Server 2005 the following query should work for you.

select name as ColumnName, TYPE_NAME(user_type_id) as TypeName, OBJECT_NAME(object_id) as ObjectName from sys.columns WHERE
OBJECTPROPERTY(object_id,'IsUserTable')=1

Let us know if this query is what you were looking for

|||Hi,

I am no freind of the sys tables, because they are supposed to (could) change between the versions of SQL Server, for the easiest way to get the information (also which helps you across sql server boundaries, because these are defined in the Ansi Spec), use the Information_Schema views and in additions the internal functions to get the *user*created tables:

SELECT * FROM
INFORMATION_SCHEMA.COLUMNS
WHERE OBJECTPROPERTY(OBJECT_ID(Table_Name),'IsUserTable')=1
HTH; Jens Suessmeyer.

http://www.sqlserver2005.de
|||can the schema be reverse engineered from visio for sql server 2005?|||I'm just getting started with SQL Server, but does this mean that there is no simple equivalent to Oracle's "DESCRIBE" command? All I need to see is a table's basic schema (column datatypes and length, null allowed).|||Hi,

the describe of Oracle is just a implementation of Oracle in the PL/SQL language dialect. Its a special function or procedure (don′t know exactly how it is implemented in Oracle) which does simply a presentation of the metadata. For sql server there is a equivalent which displays a bit more than just the column definition, its sp_help <Objectname>. I just built a mimic procedure for you to display the metadata you wanted:

CREATE PROCEDURE DESCRIBE

(

@.TableName VARCHAR(100)

)

AS

BEGIN

IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = @.TableName And TABLE_TYPE = 'BASE TABLE')

PRINT 'No such table present in current database.'

ELSE

SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = @.TableName

END

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||Thanks, that was very helpful.

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
>