How can I get a SQL dump of a SQL Server 2008 database?

后端 未结 3 977
太阳男子
太阳男子 2020-12-14 00:25

How can I get a SQL dump of a SQL Server 2008 database? That is, a .sql file with inserts to regenerate the data in another database, much like mysqldump.

3条回答
  •  一向
    一向 (楼主)
    2020-12-14 01:01

    From SQL Server Management Studio you can use the Generate Scripts command in the Tasks item of the right-click menu on the target database. From here you generate scripts for the structure and data and SPs etc: make sure 'Script Data' is set to True in the scripting options to get the inserts.

提交回复
热议问题