Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I use sql server 2005 as my database for my web application.... I generated scripts of the database by,

Database->Right Click->Tasks->Generate Scripts

I can script all my Tables,Stored Procedures,User Defined functions,Views,Users......

I have no data in it... I want the data to be scripted.. Any suggestion...

share|improve this question

2 Answers 2

up vote 0 down vote accepted

Another option is to look into SQL Toolbelt. Their SQL Data Compare can script data. This of course hinges on the fact that you're ok spending money to get this done. http://www.red-gate.com/index.htm We use the entire SQL toolbelt where I work - some very useful tools in there.

If you do not wish to go this route - and your data in the pre-scripted database would not change then instead of scripting all the schema you could script the database creation and the restore of a backed up DB.

share|improve this answer

I haven't tried it - but this appears to do what you want:

http://vyaskn.tripod.com/code.htm#inserts

The other alternative, though I'm not sure how viable it would be for you if you're wanting it completely scripted, would be to restore a backup of your old database, then transfer rows across to your new database. There's more info on this approach (partial restore) here: http://support.microsoft.com/kb/321836

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.