Modifying database generation script's default

  • Thread starter Federico Parrini
  • Start date
F

Federico Parrini

Hi everyone,
using VISIO for EA (shipped with Visual Studio .NET EA) I generated a
database creation script from a Database Model Diagram and Visio
created a .DDL script (i.e. "myDB.DDL").
The script is good, but I need to add some rows to it and I would like
to modify the script's default source code.
That is, I'd like the following code to be added automatically to any
script, just before the "CREATE DATABASE" instruction:
IF Exists (Select name from sysdatabases where name = '[myDbName])
DROP DATABASE [myDbName] GO".
Is it possible, or shall I add my own code every time I generate a
script ?
Thank you in advance for answering.
Federico
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top