Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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. 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:

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:

share|improve this answer

Your Answer


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.