Description :
This project consist of a simple console app written in C# that uses SQL Management Objects (SMO) to script all the objects in a database. It will work against any SQL Server 2000/2005/2008 database.
The project is based from the 1.3 release of the codeplex project ScriptDb. The initial project ScriptDB was originally written by Jesse Hersch of http://www.elsasoft.org.
You will find below all the improvements that have been ported and you will find download link that will include all the source code of the visual studio 2010 solution and the ScriptDB binary (x64 compiled) as well.
Addition and Improvements :
CR6 : Scripting according to component dependency
This feature was missing in the original code, we are using the logical object order creation
that we are suppose to follow, example :
- tables with primary key and after foreign keys .
- primary xml index prior to secondary ones
- etc...
CR5 : Script Assembly + Related managed code
This functionnality was commented , not validated. I included in the scripting cycle
including assemblies code , udfs function and stored procedure associated
CR4 : Manage triggers on view
This feature was missing in the original code
CR3 : changing order of Schema generation , from "after" ScriptSprocs to before to the first operation
In order to allow to create table, view and schema based named objects we need to create the schema first
CR2.3 : avoid requirement of output folder when "filename" argument is specified
if we specified a filename then we do not need to provide an output folder. we will use the parent directory info
from the file therfore no directory will be created
CR2.2 : avoid automatic db folder creation if filename is specified
If we specified a filename then we do not need to create a specific folder as the sql script will be redirected to
the right place.
CR2 : changing the data directory creation behavior
In order to allow to create table, view and schema based named objects we need to create the schema first
CR1 : compiled for x64 bits subsystem
In order to allow application to run from both x86 and x64 bits removed problematic references and added back correct one specified in discussion thread in codeplex website
Comment :
Please review doc folder for additional information about changes applied and information about how to uses of the command line ScriptDB