Creating Deployment Change Script from the Source Database Only

  • I was wondering if there is such a tool to generate deployment change script by looking at the source database only (Supporting SQL Engines from 2000 and higher)?

    I have tried database compare tools and they are great but, in my specific circumstance I am developing change scripts for a CD Setup for our product. Therefore, the change script will need to be intelligent where it will look at the source database and generate a deployment change script. Sometimes the customer database will not have all changes from a previous version when upgrading to a new version. Therefore, the current change scripts will error or not update the structure required depending on the customer's site.

    What I was thinking if the tool can review the existing database structure and generate scripts such as, if table does not exist then execute create table statement else check for each column does not exist then execute alter table add column or if it does exist then alter column (perhaps). Correspondingly, this should be done for other object types such as primary keys, indexes, foreign keys, constraints, views, functions, triggers, stored procedures, etc.?

    I am not sure if this is a realistic or feasible approach. But, to answer anyone's question ahead of time ... yes I know source control and other methods may or can help but, 🙂 due to time crunches our working environment does not always accommodate DBA involvement (there might be some short circuiting at that end during deadlines). I also tried logging changes but, I am pretty sure not all change notifications are not sent to myself from the developers. So, please assume worst case scenario :crying: in software development life cycle processes (we are endeavoring to improve but, we have some gaps in this area for now -- "a work in progress").

  • Okay, I know there had no responses yet but, I am looking for tools and I came across xSQL Builder 4.0 tool. I tried to use this tool but, had no luck. Did anyone had tried this tool before and what was the experience?

  • I assume you want a create or alter script of some sort. the problem is that you are always working with two versions to generate changes. Otherwise, how can you tell what's changed from just the source?

    Essentially you are asking for a tool that scripts your source, and when run at the destination, compares the destination to this set of scripts and generates the chances. That's what our SQL Compare[/url] product will do. It can be run command line, and can run off scripts instead of a database. That's essentially how we integrate with our source controlled database code.

    Disclosure, I work for Red Gate.

  • Thank you for your suggested tool. I am downloading the trial now and will try to evaluate the product to see how it can be utilized.

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

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