Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generate SQL Script 2

Status
Not open for further replies.

Adhie

Programmer
Mar 17, 2003
28
SG
Hi,

I need to generate sql script including Data Definition Language (DDL) and the data it self on SQL Server.

Any advice, welcomed.
Thank you very much.
Martin
 
Generate script for data? not that I am aware of.

Definately you could generate script for those DDL.
Right click on Database name, select All Task, select Generate SQL Script , After that define the scripts which you want to create (Pretty descriptive, if you still have problem, let me know)

I may be wrong.Does anybody know how to generate script for data in a table?
 
ddl you can use dmo or enterprise manager (which uses dmo)
see

for the data you can use bcp to create text files or create insert staements
see

You will have problems about the ordering of operations if you have foreign keys.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Hi Friends,
I have a similar question as Adhie and nigelrivett seems to say that Generating table Data with SQL Scripts is possible. I am using SQL Enterprise Manager version 8.0 and donot see any option of including data in the generated script. Can someone help me with this.
Thanx in advance,
Phani
 
The link I have given above is an SP to create insert statements.
It is quicker to use bcp though.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top