如何获得SQL Server 2008数据库的SQL转储? [英] How can I get a SQL dump of a SQL Server 2008 database?

查看:179
本文介绍了如何获得SQL Server 2008数据库的SQL转储?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获取SQL Server 2008数据库的SQL转储?也就是说,一个带有插入的.sql文件可以重新生成另一个数据库中的数据,就像mysqldump一样。

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.

推荐答案

来自SQL Server Management在Studio中,您可以在目标数据库的右键菜单的任务项中使用生成脚本命令。在这里,您可以为结构,数据和SP等生成脚本:确保在脚本选项中将脚本数据设置为True,以获取插入内容。

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.

这篇关于如何获得SQL Server 2008数据库的SQL转储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆