使用SQL Server Server Management Studio导入/导出数据库 [英] Import / Export database with SQL Server Server Management Studio
问题描述
我不想得到它的数据,但如果没有其他方法,我可以摆脱它。
所以...如何导出数据库使用MS SQL Server Management Studio?您如何导入?
我发现的唯一解决方案是右键单击表和脚本创建,但我有一些像100个表,所以我'
谢谢!
右键点击数据库本身,任务 - >生成脚本...
然后按照向导。
对于SSMS2008 +,if您还要导出数据,在设置脚本选项步骤中,选择高级按钮,并将数据类型到脚本从仅限模式更改为仅数据或模式和数据。 / p>
I thought this would be trivial, but it isn't... I'm sure there is a simple way to do it but I can't manage to find it. Shame on me.
I want to import/export the database itself, the tables, the constraints (foreign keys and so on). I'd rather not get the data with it, but I can get rid of it after if there's no other way.
So... how do you export a database using MS SQL Server Management Studio ? How do you import it?
The only solution I found was right click on the tables and "script to Create", but I have something like 100 tables, so I'd rather avoid this.
Thanks!
Right click the database itself, Tasks -> Generate Scripts...
Then follow the wizard.
For SSMS2008+, if you want to also export the data, on the "Set Scripting Options" step, select the "Advanced" button and change "Types of data to script" from "Schema Only" to "Data Only" or "Schema and Data".
这篇关于使用SQL Server Server Management Studio导入/导出数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!