I have a situation where I need to be able to run a SP and have a new DB created with the exact SAME definition.
The best way I can figure is to write a set of SPs that script out the DB to .sql files, then actually run those files autmatically.
I already have a SP that uses the sp_OAMethod and its homies to output the definition of all the tables. This works very well.
However I cannot figure out how to spit out the definitions of SProcs, functions, or views. ANyone have ideas?>
The best way I can figure is to write a set of SPs that script out the DB to .sql files, then actually run those files autmatically.
I already have a SP that uses the sp_OAMethod and its homies to output the definition of all the tables. This works very well.
However I cannot figure out how to spit out the definitions of SProcs, functions, or views. ANyone have ideas?>