DMO\DTS to Script Entire DB's on a Server

  • Under Enterprise Manager (Sql 7) our developers generate scripts for each database on the server, including table defs, stored procs, views, primary keys, etc.

    Can it be done from DTS (in which case I'd schedule it to run weekly)?

    TIA,

    Bill

  • To my knowledge no. There is another thread similar to this and I am looking at code I wrote months ago that was and attempt at this. However for views, triggers and stored procedures you can use sp_helptext to output the data and use DTS but tables are more of an issue.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • I dont see why you couldnt do it pretty easily using DMO. It's a COM object, so you could do it all in an ActiveX script, either inside DTS or just as an ActiveX step in a job.

    Andy

  • Hi,

    You can script the database using SQL DMO, but it is quite tedious configuring the correct options. We recently did this with our build environment, and ended up writing a COM object to do it to our "taste".

    Developing a script (VBS, or ASP) is not a good idea, because the enum's are not available and you use these when configuring DMO for the script options you need.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply