Replicating DB schema only

  • I have several databases with same schema, but different data. I make schema changes only in my primary database and I need to replicate the schema changes only to the others (tables,SP's, functions,etc.), no data replication. I wouldn't like to buy a specific tool for this matter. Can somebody recommend me what to do?

  • If you're applying the changes using script, just run the script against the other db's. I have 250 or so with same schema, technique I use is to actually copy the script over and over, so that I have one huge change script to run against all db's (use a tool to generate). Reason for that is sometimes I need to include various parameters, tool lets me do that easily.

    I also use a diff tool (SQL Compare), but its better for figuring out what changes you need to make. It generates the change script. Worth the money if you do it very often.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • if you are want it done every time put it in the model database. I have used that for many defaults

  • Model only fixes it so that when you create a new Database the changes will be reflected there. However, it does not do anything to existing databases. I suggest if you make changes you script them and execute on the script to make the same changes on the other DBs. There are all kinds of tricks to make this work faster such as using sp_MSForEachDB with code to apply the script to all the DBs you want i applied to.

    However, if you need to find out the actual differences then a compare utility will be needed. There are at least 4 out there I know of.

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

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