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
 Build task is not honoring command line database
 New Topic  New Poll New Poll
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Don Benson


7 Posts

Posted - 05/20/2015 :  16:36:48  Show Profile  Visit Don Benson's Homepage Send Don Benson a Private Message  Reply with Quote
We have builds that synchronize multiple databases because different test teams use different databases.

This was being managed by maintaining separate config files for each database. I am trying to consolidate on a single XML file that can be reused and reduce maintenance time when our environment changes.

One of our test databases is on a different server from the rest. I am using this comand:

"C:\Program Files (x86)\DB Ghost\ChangeManagerCmd.exe" "%WORKSPACE%\Database\DBGhostBuild.xml" /buildserver "TRUDEV" /builddatabase "TRXSVR4BuiltFromScripts" /targetserver "TRUDEV" /targetdatabase "model"

When this runs, I get an error that it could not find a completely different database. Reviewing the XML and Profiler statements, I found the following observations:

1) The XML file has matching <template> and <target> database settings.
2) The XML file server reference is different from the command line server.
3) The XML file database reference is not model.
4) The XML file database exists on the XML file server.
5) The XML file database does not exist on the command line server.
6) SQL profiler shows that DBGDBBuilder is trying execute commands on the command line server, but using the XML file database.

Is this the expected behavior? Is it possible I am doing something wrong with the command line?

Google AdSense

USA
Mountain View


dbghost



66 Posts

Posted - 05/21/2015 :  05:41:37  Show Profile  Visit dbghost's Homepage Send dbghost a Private Message  Reply with Quote
Hi,
Firstly what you are attempting is very sensible and completely possible. The settings file and command-line override args are intended for just this sort of thing.

If you email us your settings file we an have a better look. For now as a guess, if this process is a build and an upgrade together as I gather from your phrase "builds that synchronise", then it is a bit interesting that your cmd targetdb is "model" because that will be the target for the upgrade. The templatedb for the build will be taken from the settings file.


Go to Top of Page

Don Benson



7 Posts

Posted - 05/21/2015 :  08:48:44  Show Profile  Visit Don Benson's Homepage Send Don Benson a Private Message  Reply with Quote
This is strictly a build from source file. It was generated by opening a build/compare/sync file, unchecking the compare and sync options, then saving under a new name. I will email the settings to tech support, and the response can then be publicized here.

Go to Top of Page

dbghost



66 Posts

Posted - 05/22/2015 :  05:03:47  Show Profile  Visit dbghost's Homepage Send dbghost a Private Message  Reply with Quote
If the process is just a build then the /targetserver and /targetdatabase args have no real meaning, they are the target for compare or sync process.
The /buildserver and /builddatabase args specify the new database to build. When creating the new database DBG looks for a template database to use as an example of datafile structure to create in the new db.
The template database name comes from the settings file (there is no arg for it). If you want to use model from the buildserver then these settings will work. Note the DBServer here does not matter because it will look on the buildserver from your arg.

<TemplateDB>
<DBName>model</DBName>
<DBServer>todsworthy\sql2014</DBServer>
<DBUserName></DBUserName>
<DBPassword></DBPassword>
<AuthenticationMode>Windows</AuthenticationMode>
</TemplateDB>

Of course the other way to do this is set up a build that uses a create db script instead of a templatedb.
Go to Top of Page

Don Benson



7 Posts

Posted - 05/26/2015 :  10:15:43  Show Profile  Visit Don Benson's Homepage Send Don Benson a Private Message  Reply with Quote
Result of email discussion, which was one-way due to problems with my mail server in the US being allowed to deliver to the mail server in the UK.

The build process uses a section in the config XML for the <TemplateDB>. These settings cannot be overridden on the command line.

In my case, the <TemplateDB> referenced a database on a different server than the build server. That database did not exist on the build server, and caused a crash.

The XML originally came from a build/compare/synchronization job, and the author had specified the target database as the template database.

We changed the database setting to reference the model database, which is probably the best choice since we don't really have any special requirements in the database settings.
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