Database Change Management
Database Change Management
Home | Profile | Register | Active Topics | Active Polls | Members | Private Messages | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?




 All Forums
 Support
 DB Ghost Support Forum
 Automating from build script
 New Topic  New Poll New Poll
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Thorin


5 Posts

Posted - 03/19/2009 :  17:28:35  Show Profile Send Thorin a Private Message  Reply with Quote
I'm in the process of showing my employer how DB Ghost would work with our continuous integration builds. I read that the DB Ghost Professional Plus Edition includes a commandline interface (You must be logged in to see this link.). Does the evaluation version contain the commandline interface? If so, where can I find a list of available switches for the commandline?

Google AdSense

USA
Mountain View


Mark Baekdal



88 Posts

Posted - 03/19/2009 :  23:56:50  Show Profile  Visit Mark Baekdal's Homepage Send Mark Baekdal a Private Message  Reply with Quote
hello Thorin,

yes the command line interface is within the evaluation version. Everything is in the evaluation version. You can find all the documentation within the help file. You can get to the help file by opening the change manager and selecting help. The file is installed in the same directory as you installed Db Ghost.

regards,
Mark Baekdal
You must be logged in to see this link.
You must be logged in to see this link.
Take control of your SQL Server code.
Go to Top of Page

Thorin



5 Posts

Posted - 03/29/2009 :  15:31:28  Show Profile Send Thorin a Private Message  Reply with Quote
For anyone looking to do the same thing, I found this process quite easy.

I have CruiseControl.NET running, monitoring a Subversion repository for changes. When a change is detected, CruiseControl.NET kicks off a NAnt build. The NAnt build gets all latest source code (including database scripts), updates the version number, compiles the code, creates the test database, runs nunit tests using the test database, drops the test database, commits the changed version number file, and emails success/failure.

The two new processes I added were the Create Test Database and Drop Test Database steps. To accomplish this, I used DB Ghost's Change Manager to create an xml file for each step that could be passed to the commandline app. Creating this xml file is as simple as stepping through Change Manager setting all the actions you want for that step, then on the last screen clicking the Save Settings button and entering a filename with the .xml extension.

Creating the test database was easy enough - choose Build From Scripts on the first screen, enter a server connection and database name to create (make sure the database name indicates it's for testing - mine was DB_Proto_NUnit), and pick all the scripts you want to run to create this database. Make sure to check the "Keep Database" checkbox if you need it to stick around for nunit tests.

In my case, because the nunit tests were running outside of the context of Change Manager, I had to have the test database stick around after the first call to Change Manager. I handled this by making a separate step to drop the database, again using Change Manager.

To drop the database, I simply created another Build From Scripts step, entered the same database name, but this time unchecked the Keep Database checkbox. To make sure the script ran real quick, I only included the bare minimum script - just the CreateDatabase.sql file.

By the way, the executable for the commandline is ChangeManagerCMD.exe. If you're using NAnt, I found it very useful to set the workingdirectory attribute of the <exec> task to the folder that the sql scripts could be found in.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  New Poll New Poll
 Reply to Topic
 Printer Friendly
Jump To:
Database Change Management © Copyright 2005 Innovartis Ltd. Go To Top Of Page
Snitz Forums 2000
RSS Feed 1 RSS Feed 2
Powered by ForumCo 2000-2008
TOS - AUP - URA - Privacy Policy
ForumCo Free Blogs and Galleries
Signup for a free forum or Go Banner Free