views:

107

answers:

1

This is starting to frustrate me, mostly because it should be easy to do but I can't find anything.

I am trying to version control my database. The method I have decided upon is to generate scripts at each check-in that creates a sql script for every object in my database. Most of my edits are done via the visual designer in SSMS and I don't trust myself to remember to generate change scripts every time. I am only concerned with the schema for now, although soon I would like data from certain lookup tables.

I have tried the following with not much success:

  • I attempted to generate scripts via SSMS Tasks->Generate Scripts. I don't like this for two reasons.

    • It does not seem to save what settings you give it, so every time I want to generate scripts I have to change the settings to what I want, change the output path, etc.. I really just want to press a button or two and be a quick pre-commit process.

    • it seems to generate scripts using USC formatting, which means version control (git) sees it as being a binary file and thus can't do comparisons between versions (which is one of the big reasons I want to store the DB in version control).

  • I also attempted to use dbSourceTools. This tool fixed issue #1 from SMSS and made it real easy to update the schema definitions, yet the .sql files it generated used USC formatted text as well, which meant version control saw it as a binary file.

I am looking for a free method to do this as I am working on a hobby project right now.

A: 

If you are using Visual Studio Developer Edition or Visual Studio Team Suite, you can use Visual Studio Database Professional for free. This is a fantastic tool for managing your database schema.

Randy Minder
If I have 2008 Professional, can I get the Database edition for free? If so where do I get it?
KallDrexx
I don't think you can. I am pretty sure you need Developer Edition or Team Suite. But, I think you can get a 180 day trial of Database Edition. That might tide you over for a while, since this is just a hobby project.
Randy Minder