相当于SQL Server的mysqldump [英] mysqldump equivalent for SQL Server

查看:130
本文介绍了相当于SQL Server的mysqldump的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在等效的架构& SQL Server的数据导出/转储工具,与带有mysqldump的MySQL一样。尝试重定位旧的ASP站点,在Windows服务器上工作使我感到不愉快。

Is there an equivalent schema & data export/dumping tool for SQL Server as there is for MySQL with mysqldump. Trying to relocate a legacy ASP site and I am way out of happy place with working on a windows server.

注意:DTS导出实用程序似乎可以导出数据,而无需表定义
使用企业管理器并导出数据库,与导出架构&数据...但是仍然错过了存储过程。

Note: The DTS export utility own seems to export data, without table defs. Using the Enterprise Manager and exporting the db gets closer with exporting the schema & data... but still misses stored procedures.

基本上寻找一种解决方案可以立即捕获我需要的所有内容。

Basically looking for a one does it all solution that grabs everything I need at once.

推荐答案

要使用SQL Server 2008 Management Studio真正轻松地做到这一点:



1。)右键单击数据库(不是表),然后选择任务->生成脚本

To do this really easily with SQL Server 2008 Management Studio:

1.) Right click on the database (not the table) and select Tasks -> Generate Scripts

2。)在第一页上单击下一步

2.) Click Next on the first page

3。)如果要复制整个数据库,只需单击下一步。如果要复制特定的表,请单击选择特定的数据库对象,选择所需的表,然后单击下一步。

3.) If you want to copy the whole database, just click next. If you want to copy specific tables, click on "Select Specific Database Objects", select the tables you want, and then click next.

4。)保存到文件。 重要:单击保存到文件旁边的高级按钮,找到脚本的数据类型,然后将仅模式更改为模式和数据(如果要创建表, )或仅数据(如果要将数据复制到现有表中)。

4.) "Save to File" should be selected. IMPORTANT: Click the Advanced button next to "Save to File", find "Types of data to script", and change "Schema only" to "Schema and data" (if you want to create the table) or "Data only" (if you're copying data to an existing table).

5。)单击其余部分,操作完成!它将另存为.sql文件。

5.) Click through the rest and you're done! It will save as a .sql file.

这篇关于相当于SQL Server的mysqldump的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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