Have you wanted a tool to run that will script your SQL Server databases? I did, and rather than spend lots of money on buying one, I wrote this simple program that allows you to select your server and database and script it out and save to a file. I have always been nervous since we have little documentation on databases in our office. This at least gives me some stuff for disaster purposes.
As of right now, this application only creates the "CREATE only" scripts. In the future, it will do the "DROP only" and "CREATE/DROP" scripts. This will be as my time permits!
Requirements to use:
This application is written in VB.NET. You will need to have the .NET framework installed from Microsoft. I did not include it in the setup because it will make the size of the files huge. Once you have the .NET framework installed, then run the setup program. Once that is complete, then run the SQLScriptGenerator.exe file from the installation location. It is pretty simple after that.
Note: If you are using SQL Server 7 and have Enterprise Manager loaded on your PC, you will need to re-apply the latest SP in order to fix an incompatibility problem. This application was designed using the SQLDMO.dll file from SQL Server 2000.
If you happen to break it or get an error, send me an e-mail with as much detail as possible about what you were doing when it broke. Also send me a screenshot of the error and I will see what is going on. Send this info to email@example.com.
Here is the link to the application: http://www.myitforum.com/inc/arts/SQLScriptGeneratorFull.zip
ABOUT THE AUTHOR: Mike Linkey works in network administration for a government agency in Illinois. He has been in the IT industry for eight years and has his MCSE for Windows NT 4.0 and Windows 2000. Mike is also experienced in VB programming.
This article first appeared in myITforum, the premier online destination for IT professionals responsible for managing their corporations' Microsoft Windows systems. The centerpiece of myITforum.com is a collection of member forums where IT professionals actively exchange technical tips, share their expertise, and download utilities that help them better manage their Windows environments, specifically Microsoft Systems Management Server (SMS). It is part of the TechTarget network of Web sites. To register for the site and sign up for the myITforum daily newsletter, click here.