Generating Database Scripts

When we hear the phrase “database script generation”, or “scripting a database”, we use to think, oh that’s easy, simply right-click in Enterprise Manager or Management Studio, select “Generate Script”, and that’s it.

But there is more to scripting.

First of all, the built-in utilities occasionally fail because they do not analyze dependencies. If a view depends on another view, whose name is alphanumerically, you’re out of luck. Or you run across some kind of internal error.

So let’s have a look at what possible types of scripts we have to deal with:

  • Database Object Creation and Deletion (and re-generation)
  • Schema Migration (change scripts for database objects)
  • Table Data
  • Record Identifiers (“magic values” linking your code with the database)

All these kinds of scripts are necessary for development, versioning, and deployment.

One Response to Generating Database Scripts

  1. […] I mentioned in some of my previous posts, that I developed a database tool that I use for the development of other […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: