Showing posts with label includes. Show all posts
Showing posts with label includes. Show all posts

Friday, March 9, 2012

Generate SQL script which includes table structure & data?

What are the steps that I should follow in order to generate sql script which includes both the table structure and data?

Thanks

Dear perpetualdream,

Use SQL Server Database Publishing Wizard Smile

HTH,

Suprotim Agarwal

|||

thanks... great tool

Generate SQL Script including actual Data

Hi NG
Is there a way to generate an SQL Script that not only includes database
structure but also the content / data of tables ?
helps appreciated
ChristianChristian
BACKUP\RESTORE commnads
"Christian" <chmug@.swissonline.ch> wrote in message
news:e6efCvUUFHA.548@.tk2msftngp13.phx.gbl...
> Hi NG
> Is there a way to generate an SQL Script that not only includes database
> structure but also the content / data of tables ?
> helps appreciated
> Christian
>|||i can't figure out what you're talking about . could you give me some infos
?
Chris
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:O1wkL1UUFHA.3944@.tk2msftngp13.phx.gbl...
> Christian
> BACKUP\RESTORE commnads
>
> "Christian" <chmug@.swissonline.ch> wrote in message
> news:e6efCvUUFHA.548@.tk2msftngp13.phx.gbl...
>> Hi NG
>> Is there a way to generate an SQL Script that not only includes database
>> structure but also the content / data of tables ?
>> helps appreciated
>> Christian
>>
>|||Try QALite (Downloadable from the internet), i will provide you with a set
of functions to get additional Insert Statements for the data.
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"Christian" <chmug@.swissonline.ch> schrieb im Newsbeitrag
news:e6efCvUUFHA.548@.tk2msftngp13.phx.gbl...
> Hi NG
> Is there a way to generate an SQL Script that not only includes database
> structure but also the content / data of tables ?
> helps appreciated
> Christian
>|||Sure
--We perfom a backup of the database
BACKUP DATABASE test TO DISK='C:\mydatabase.bak'
--Now we restore the database with a new name
RESTORE DATABASE test_newname
FROM 'C:\mydatabase.bak'
WITH RECOVERY,
MOVE 'test_data' TO 'D:\Test_data.mdf',
MOVE 'test_log' TO 'D:\Test_log.ldf'
For more details please refer to the BOL
"Christian" <chmug@.swissonline.ch> wrote in message
news:OdSr26UUFHA.3952@.TK2MSFTNGP15.phx.gbl...
> i can't figure out what you're talking about . could you give me some
infos
> ?
> Chris
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:O1wkL1UUFHA.3944@.tk2msftngp13.phx.gbl...
> > Christian
> > BACKUP\RESTORE commnads
> >
> >
> > "Christian" <chmug@.swissonline.ch> wrote in message
> > news:e6efCvUUFHA.548@.tk2msftngp13.phx.gbl...
> >> Hi NG
> >>
> >> Is there a way to generate an SQL Script that not only includes
database
> >> structure but also the content / data of tables ?
> >>
> >> helps appreciated
> >>
> >> Christian
> >>
> >>
> >
> >
>|||Ok, downloaded and installed ... but where can i generate an SQL Script ?
My intension / target
i've a database with content. i wan't the whole database structure INCL. the
data i a SQL Script .. i don't wanna backup / restore the database! my
target is to have a SQL-Script!
Christian
"Jens Süßmeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in
message news:ee67X9UUFHA.2892@.TK2MSFTNGP14.phx.gbl...
> Try QALite (Downloadable from the internet), i will provide you with a set
> of functions to get additional Insert Statements for the data.
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
>
> "Christian" <chmug@.swissonline.ch> schrieb im Newsbeitrag
> news:e6efCvUUFHA.548@.tk2msftngp13.phx.gbl...
>> Hi NG
>> Is there a way to generate an SQL Script that not only includes database
>> structure but also the content / data of tables ?
>> helps appreciated
>> Christian
>|||My intension / target
i've a database with content. i wan't the whole database structure INCL. the
data i a SQL Script .. i don't wanna backup / restore the database! my
target is to have a SQL-Script!
Christian
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:uojSeDVUFHA.928@.TK2MSFTNGP15.phx.gbl...
> Sure
> --We perfom a backup of the database
> BACKUP DATABASE test TO DISK='C:\mydatabase.bak'
> --Now we restore the database with a new name
> RESTORE DATABASE test_newname
> FROM 'C:\mydatabase.bak'
> WITH RECOVERY,
> MOVE 'test_data' TO 'D:\Test_data.mdf',
> MOVE 'test_log' TO 'D:\Test_log.ldf'
> For more details please refer to the BOL
>
> "Christian" <chmug@.swissonline.ch> wrote in message
> news:OdSr26UUFHA.3952@.TK2MSFTNGP15.phx.gbl...
>> i can't figure out what you're talking about . could you give me some
> infos
>> ?
>> Chris
>> "Uri Dimant" <urid@.iscar.co.il> wrote in message
>> news:O1wkL1UUFHA.3944@.tk2msftngp13.phx.gbl...
>> > Christian
>> > BACKUP\RESTORE commnads
>> >
>> >
>> > "Christian" <chmug@.swissonline.ch> wrote in message
>> > news:e6efCvUUFHA.548@.tk2msftngp13.phx.gbl...
>> >> Hi NG
>> >>
>> >> Is there a way to generate an SQL Script that not only includes
> database
>> >> structure but also the content / data of tables ?
>> >>
>> >> helps appreciated
>> >>
>> >> Christian
>> >>
>> >>
>> >
>> >
>>
>|||DOn´t know how many tables you´ve got... but there is a qay to script a
single table in QA, right click on the Table --> DDL and inserts.
Jens SUessmeyer.
"Christian" <chmug@.swissonline.ch> schrieb im Newsbeitrag
news:eApftPVUFHA.548@.tk2msftngp13.phx.gbl...
> Ok, downloaded and installed ... but where can i generate an SQL Script ?
> My intension / target
> i've a database with content. i wan't the whole database structure INCL.
> the data i a SQL Script .. i don't wanna backup / restore the database! my
> target is to have a SQL-Script!
> Christian
> "Jens Süßmeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote
> in message news:ee67X9UUFHA.2892@.TK2MSFTNGP14.phx.gbl...
>> Try QALite (Downloadable from the internet), i will provide you with a
>> set of functions to get additional Insert Statements for the data.
>> HTH, Jens Suessmeyer.
>> --
>> http://www.sqlserver2005.de
>> --
>>
>> "Christian" <chmug@.swissonline.ch> schrieb im Newsbeitrag
>> news:e6efCvUUFHA.548@.tk2msftngp13.phx.gbl...
>> Hi NG
>> Is there a way to generate an SQL Script that not only includes database
>> structure but also the content / data of tables ?
>> helps appreciated
>> Christian
>>
>|||try the free data and schema scripter from Innovartis. It comes free with the
evaluation of DB Ghost -
http://www.innovartis.co.uk/database_change_management_evaluation.aspx
regards,
Mark Baekdal
http://www.dbghost.com
http://www.innovartis.co.uk
+44 (0)208 241 1762
Build, Comparison and Synchronization from Source Control = Database change
management for SQL Server
"Christian" wrote:
> Hi NG
> Is there a way to generate an SQL Script that not only includes database
> structure but also the content / data of tables ?
> helps appreciated
> Christian
>
>

Generate SQL Script including actual Data

Hi NG
Is there a way to generate an SQL Script that not only includes database
structure but also the content / data of tables ?
helps appreciated
ChristianChristian
BACKUP\RESTORE commnads
"Christian" <chmug@.swissonline.ch> wrote in message
news:e6efCvUUFHA.548@.tk2msftngp13.phx.gbl...
> Hi NG
> Is there a way to generate an SQL Script that not only includes database
> structure but also the content / data of tables ?
> helps appreciated
> Christian
>|||i can't figure out what you're talking about . could you give me some infos
?
Chris
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:O1wkL1UUFHA.3944@.tk2msftngp13.phx.gbl...
> Christian
> BACKUP\RESTORE commnads
>
> "Christian" <chmug@.swissonline.ch> wrote in message
> news:e6efCvUUFHA.548@.tk2msftngp13.phx.gbl...
>|||Try QALite (Downloadable from the internet), i will provide you with a set
of functions to get additional Insert Statements for the data.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Christian" <chmug@.swissonline.ch> schrieb im Newsbeitrag
news:e6efCvUUFHA.548@.tk2msftngp13.phx.gbl...
> Hi NG
> Is there a way to generate an SQL Script that not only includes database
> structure but also the content / data of tables ?
> helps appreciated
> Christian
>|||Sure
--We perfom a backup of the database
BACKUP DATABASE test TO DISK='C:\mydatabase.bak'
--Now we restore the database with a new name
RESTORE DATABASE test_newname
FROM 'C:\mydatabase.bak'
WITH RECOVERY,
MOVE 'test_data' TO 'D:\Test_data.mdf',
MOVE 'test_log' TO 'D:\Test_log.ldf'
For more details please refer to the BOL
"Christian" <chmug@.swissonline.ch> wrote in message
news:OdSr26UUFHA.3952@.TK2MSFTNGP15.phx.gbl...
> i can't figure out what you're talking about . could you give me some
infos
> ?
> Chris
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:O1wkL1UUFHA.3944@.tk2msftngp13.phx.gbl...
database[vbcol=seagreen]
>|||Ok, downloaded and installed ... but where can i generate an SQL Script ?
My intension / target
i've a database with content. i wan't the whole database structure INCL. the
data i a SQL Script .. i don't wanna backup / restore the database! my
target is to have a SQL-Script!
Christian
"Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in
message news:ee67X9UUFHA.2892@.TK2MSFTNGP14.phx.gbl...
> Try QALite (Downloadable from the internet), i will provide you with a set
> of functions to get additional Insert Statements for the data.
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
>
> "Christian" <chmug@.swissonline.ch> schrieb im Newsbeitrag
> news:e6efCvUUFHA.548@.tk2msftngp13.phx.gbl...
>|||My intension / target
i've a database with content. i wan't the whole database structure INCL. the
data i a SQL Script .. i don't wanna backup / restore the database! my
target is to have a SQL-Script!
Christian
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:uojSeDVUFHA.928@.TK2MSFTNGP15.phx.gbl...
> Sure
> --We perfom a backup of the database
> BACKUP DATABASE test TO DISK='C:\mydatabase.bak'
> --Now we restore the database with a new name
> RESTORE DATABASE test_newname
> FROM 'C:\mydatabase.bak'
> WITH RECOVERY,
> MOVE 'test_data' TO 'D:\Test_data.mdf',
> MOVE 'test_log' TO 'D:\Test_log.ldf'
> For more details please refer to the BOL
>
> "Christian" <chmug@.swissonline.ch> wrote in message
> news:OdSr26UUFHA.3952@.TK2MSFTNGP15.phx.gbl...
> infos
> database
>|||DOnt know how many tables youve got... but there is a qay to script a
single table in QA, right click on the Table --> DDL and inserts.
Jens SUessmeyer.
"Christian" <chmug@.swissonline.ch> schrieb im Newsbeitrag
news:eApftPVUFHA.548@.tk2msftngp13.phx.gbl...
> Ok, downloaded and installed ... but where can i generate an SQL Script ?
> My intension / target
> i've a database with content. i wan't the whole database structure INCL.
> the data i a SQL Script .. i don't wanna backup / restore the database! my
> target is to have a SQL-Script!
> Christian
> "Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote
> in message news:ee67X9UUFHA.2892@.TK2MSFTNGP14.phx.gbl...
>|||try the free data and schema scripter from Innovartis. It comes free with th
e
evaluation of DB Ghost -
http://www.innovartis.co.uk/databas...evaluation.aspx
regards,
Mark Baekdal
http://www.dbghost.com
http://www.innovartis.co.uk
+44 (0)208 241 1762
Build, Comparison and Synchronization from Source Control = Database change
management for SQL Server
"Christian" wrote:

> Hi NG
> Is there a way to generate an SQL Script that not only includes database
> structure but also the content / data of tables ?
> helps appreciated
> Christian
>
>

Generate SQL Script including actual Data

Hi NG
Is there a way to generate an SQL Script that not only includes database
structure but also the content / data of tables ?
helps appreciated
Christian
Christian
BACKUP\RESTORE commnads
"Christian" <chmug@.swissonline.ch> wrote in message
news:e6efCvUUFHA.548@.tk2msftngp13.phx.gbl...
> Hi NG
> Is there a way to generate an SQL Script that not only includes database
> structure but also the content / data of tables ?
> helps appreciated
> Christian
>
|||i can't figure out what you're talking about . could you give me some infos
?
Chris
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:O1wkL1UUFHA.3944@.tk2msftngp13.phx.gbl...
> Christian
> BACKUP\RESTORE commnads
>
> "Christian" <chmug@.swissonline.ch> wrote in message
> news:e6efCvUUFHA.548@.tk2msftngp13.phx.gbl...
>
|||Try QALite (Downloadable from the internet), i will provide you with a set
of functions to get additional Insert Statements for the data.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Christian" <chmug@.swissonline.ch> schrieb im Newsbeitrag
news:e6efCvUUFHA.548@.tk2msftngp13.phx.gbl...
> Hi NG
> Is there a way to generate an SQL Script that not only includes database
> structure but also the content / data of tables ?
> helps appreciated
> Christian
>
|||Sure
--We perfom a backup of the database
BACKUP DATABASE test TO DISK='C:\mydatabase.bak'
--Now we restore the database with a new name
RESTORE DATABASE test_newname
FROM 'C:\mydatabase.bak'
WITH RECOVERY,
MOVE 'test_data' TO 'D:\Test_data.mdf',
MOVE 'test_log' TO 'D:\Test_log.ldf'
For more details please refer to the BOL
"Christian" <chmug@.swissonline.ch> wrote in message
news:OdSr26UUFHA.3952@.TK2MSFTNGP15.phx.gbl...
> i can't figure out what you're talking about . could you give me some
infos[vbcol=seagreen]
> ?
> Chris
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:O1wkL1UUFHA.3944@.tk2msftngp13.phx.gbl...
database
>
|||Ok, downloaded and installed ... but where can i generate an SQL Script ?
My intension / target
i've a database with content. i wan't the whole database structure INCL. the
data i a SQL Script .. i don't wanna backup / restore the database! my
target is to have a SQL-Script!
Christian
"Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in
message news:ee67X9UUFHA.2892@.TK2MSFTNGP14.phx.gbl...
> Try QALite (Downloadable from the internet), i will provide you with a set
> of functions to get additional Insert Statements for the data.
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
>
> "Christian" <chmug@.swissonline.ch> schrieb im Newsbeitrag
> news:e6efCvUUFHA.548@.tk2msftngp13.phx.gbl...
>
|||My intension / target
i've a database with content. i wan't the whole database structure INCL. the
data i a SQL Script .. i don't wanna backup / restore the database! my
target is to have a SQL-Script!
Christian
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:uojSeDVUFHA.928@.TK2MSFTNGP15.phx.gbl...
> Sure
> --We perfom a backup of the database
> BACKUP DATABASE test TO DISK='C:\mydatabase.bak'
> --Now we restore the database with a new name
> RESTORE DATABASE test_newname
> FROM 'C:\mydatabase.bak'
> WITH RECOVERY,
> MOVE 'test_data' TO 'D:\Test_data.mdf',
> MOVE 'test_log' TO 'D:\Test_log.ldf'
> For more details please refer to the BOL
>
> "Christian" <chmug@.swissonline.ch> wrote in message
> news:OdSr26UUFHA.3952@.TK2MSFTNGP15.phx.gbl...
> infos
> database
>
|||DOnt know how many tables youve got... but there is a qay to script a
single table in QA, right click on the Table --> DDL and inserts.
Jens SUessmeyer.
"Christian" <chmug@.swissonline.ch> schrieb im Newsbeitrag
news:eApftPVUFHA.548@.tk2msftngp13.phx.gbl...
> Ok, downloaded and installed ... but where can i generate an SQL Script ?
> My intension / target
> i've a database with content. i wan't the whole database structure INCL.
> the data i a SQL Script .. i don't wanna backup / restore the database! my
> target is to have a SQL-Script!
> Christian
> "Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote
> in message news:ee67X9UUFHA.2892@.TK2MSFTNGP14.phx.gbl...
>
|||try the free data and schema scripter from Innovartis. It comes free with the
evaluation of DB Ghost -
http://www.innovartis.co.uk/database...valuation.aspx
regards,
Mark Baekdal
http://www.dbghost.com
http://www.innovartis.co.uk
+44 (0)208 241 1762
Build, Comparison and Synchronization from Source Control = Database change
management for SQL Server
"Christian" wrote:

> Hi NG
> Is there a way to generate an SQL Script that not only includes database
> structure but also the content / data of tables ?
> helps appreciated
> Christian
>
>

Sunday, February 19, 2012

generalization/specialization

I have a db design which includes generalization/specialization. How can I implement this in sql server?

thanks so much!

I think that you are just referring to a Parent-Child relationship, or a hierachical data model.

You 'should' be ok with using SQL Server for data storage.

|||

OO Gen/Specs can often be modeled as SuperTypes/SubTypes in relational databases. The key in the SuperType is carried down to the subtype, the subtype has the "specialized" attributes, supertype has the common attributes. In some cases, especially with busy OLTP systems, you may want to consider a single table with nullable columns for the subtype attributes that may not apply to all rows in the table. But database design isn't address very well in forums, newsgroups. You'd probably want to read up on supertypes/subtypes in relational database artcles and books and figure the best approach for you particular business needs.

I think Louis Davidson handles the subject in a simple, straight forward manner in his book from Apress:

Pro SQL Server 2005 Database Design and Optimization.

-Sue