The first version of a database usually works well. You've carefully planned and created all the structures so they do just what you want. Things tend to go wrong as a database grows up. Inevitably you need to make changes to the original design, and on larger databases several people may need to make changes. This introduces problems such as ensuring everyone is using the same schema. You may have a production copy and a development copy of a database, or a live version and a report version. How can you be sure that all the versions are structurally identical? Many companies also now require an audit trail showing how structures were changed, when and by whom.
One answer is to use a utility that compares databases and reports the differences. A smarter solution is offered by DB Ghost. This proves a set of components you can use to manage your database
ADVERTISEMENT
structures, and make changes to structures in a way that can be audited. You connect DB Ghost to your source code control system, and it extracts the definitions of your database objects and look-up data from there. This information is stored as verified code. You can then use this code to compare and synchronise the source database with a target database. If there are any differences between the two, DB Ghost generates a change script. You can use the scripts generated by DB Ghost to create a new database with the same structure.
Whenever a version of your database schema is scripted in DB Ghost, it can be stored in the repository. This makes it easy to go back to an earlier schema. You can also use the archive as an audit trail.
While not everyone will have multiple versions of databases on different servers, another element of DB Ghost will prove more universally useful. Once you've set up a schema, you can use it to verify any stored procedure you're working on. You pass the stored procedure to DB Ghost, and your code is verified to ensure that the references within it match your database. You can also have DB Ghost check for dependency errors.
The new version of DB Ghost has been broken into components, so you can buy just the facility to use a script to create a new database or just the schema comparison element. The Professional version provides all four components. You can also download a free trial version