Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Posted

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/[^]
 
Share this answer
 
Comments
Espen Harlinn 19-Feb-13 16:38pm    
5'ed :-D
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[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900