How do I generate scripts that will rebuild my MS SQL Server 2005 database with data?

后端 未结 3 738
眼角桃花
眼角桃花 2021-01-14 06:57

I have a SQL Server 2005 database, that I would like to be able to recreate at a moment\'s notice. I want to be able to point to my database and generate a complete set of s

3条回答
  •  耶瑟儿~
    2021-01-14 07:24

    Check the following for a procedure that will create a script that will generate a table and all its data. You could wrap this up in another stored proc that iterated all tables and generate a single large script that will regenerate everything from scratch.

    http://anastasiosyal.com/archive/2007/04/25/5.aspx

    Edit: Seems Will has found an even better solution +1 to Will

提交回复
热议问题