从.mdf生成.sql文件 [英] generate .sql file from .mdf

查看:680
本文介绍了从.mdf生成.sql文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

之前我从visual studio 2010发布向导生成它。但是现在我在Window 8中使用它

,它正在给m errro安装.net 3.5 sp1,当我安装它时它会给erro og .net 2.0。



那么,是否有蚂蚁方式将我的.mdf文件转换为script.sql。



1.任何软件(不是任何重的喜欢managemnt工作室)

2.any onlin econverter

3.OR通过一些sql命令

Earlier i generate it from visual studio 2010 "Publish Wizard". But now i m using it in Window 8
, it''s giving m errro to install .net 3.5 sp1, when i installing that it give erro og .net 2.0.

So, is there ant way to conver my .mdf files to script.sql.

1.any software (not any heavy like managemnt studio)
2.any onlin econverter
3.OR by some sql command

推荐答案

如果你有Windows 8(不是RT),你可以安装SQL Management Studio 2010和2012.那些也有脚本数据库功能。

但你可以编写自己的应用程序来编写脚本。请参阅以下文章 - 所有使用SMO:

http:// www.sqlteam.com/article/scripting-database-objects-using-smo-updated [ ^ ]

http://www.mssqltips.com/sqlservertip/1833/generate-scripts-for-database-objects-with-smo-for- sql-server / [ ^ ]

http://philergia.wordpress.com/2011/02/28/using-powershell-and-smo-to-script-sql- server-database-objects-3 / [ ^ ]
If you have Windows 8 (not RT), you can install SQL Management Studio 2010 and 2012. Those also have "Script Database" function.
But you can write your own application to do scripting. See following articles - all using SMO:
http://www.sqlteam.com/article/scripting-database-objects-using-smo-updated[^]
http://www.mssqltips.com/sqlservertip/1833/generate-scripts-for-database-objects-with-smo-for-sql-server/[^]
http://philergia.wordpress.com/2011/02/28/using-powershell-and-smo-to-script-sql-server-database-objects-3/[^]


在窗口8上安装SQL Server可能会遇到问题。在Windows 8上安装SQL Server时,.NET Framework 3.5不会自动安装。因此,在此之前您需要手动安装它。但是您无法使用脱机安装程序安装.NET framework 3.5(通过双击setup.exe)。按照以下链接安装离线模式:



http://msdn.microsoft.com/en-us/library/hh506443.aspx [ ^ ]
You may facing issue on installing SQL Server on window 8. While installing SQL Server on Windows 8 .NET framework 3.5 is not installing automatically. So before that you need to install it manually.But you can not install .NET framework 3.5 with an offline installer (by double clicking the setup.exe). Follow the link below to install offline mode:

http://msdn.microsoft.com/en-us/library/hh506443.aspx[^]


这篇关于从.mdf生成.sql文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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