Verbose logging via command line

Forum for users of SQL Compare schema synchronization utility

Moderators: JonathanWatts, Chris Auckland, David Atkinson

Verbose logging via command line

Postby jhoerr » Wed Sep 21, 2011 4:17 pm

Hi,

I see that the sync script produced by the /ScriptFile switch includes a PRINT statement for each synchronization step. I'd like to know if its possible to have these statements included in the SQLCompare logging output. My goal is to be able to look at the SQLCompare.exe log and pinpoint where the synchronization failed.

It may be helpful to know that I'm executing SQLCompare from a TeamCity 'Command Line' build step.

My command line is as follows:

SQLCompare.exe
/scr1:<repository>
/server2:<db server>
/db2:<db>
/Sync
/Include:identical
/Report:Report/SchemaDiffReport.html
/ReportType:Interactive
/ScriptFile:Report/SchemaSyncScript.sql
/Force
/Verbose
jhoerr
 
Posts: 8
Joined: Wed Sep 21, 2011 4:08 pm

Postby chriskelly » Fri Sep 23, 2011 5:06 pm

You cannot turn Logging on through the Command Line. But, if you open the UI and turn on Logging through the menu and then run your Command Line command, then logging should hopefully happen.
Chris Kelly
Technical Support Engineer
chriskelly
 
Posts: 330
Joined: Mon Apr 19, 2010 1:44 pm
Location: Cambridge, UK

Postby jhoerr » Fri Sep 23, 2011 6:31 pm

I've started the SQL Compare UI, but I don't see anything pertaining to logging via Tools -> Application Options or File -> New Project. Should I be looking elsewhere?
jhoerr
 
Posts: 8
Joined: Wed Sep 21, 2011 4:08 pm

Postby chriskelly » Sun Sep 25, 2011 11:28 am

Please take a look at this Knowledge Base article which explains how to turn logging on in the UI.

http://www.red-gate.com/supportcenter/C ... _files.htm
Chris Kelly
Technical Support Engineer
chriskelly
 
Posts: 330
Joined: Mon Apr 19, 2010 1:44 pm
Location: Cambridge, UK

Postby David Atkinson » Sun Sep 25, 2011 12:00 pm

You're right that it would be nice to know which command line parameters have been selected when running from the command line. We'll try our best to add this feature for the next release, which will be due out later this year. If you'd like to be on the EA program, we can inform you when the next EA has the feature.

We'll most likely print the additional command line parameters only when /verbose has been selected. Does this sound fair to you?

Kind regards,

David Atkinson
Product Manager
Red Gate Software
David Atkinson
 
Posts: 1124
Joined: Mon Dec 05, 2005 4:54 pm
Location: Twitter: @dtabase

Postby jhoerr » Wed Dec 07, 2011 5:52 pm

Hi David -- thanks for responding, and sorry for the late reply. I didn't have my profile configured to notify me of responses to my question. :\\

You're right that it would be nice to know which command line parameters have been selected...


I think there's been a misunderstanding -- I'm not interested in logging which command line parameters have been selected. I'd like the logs to include the step-wise 'PRINT' statement output of the sync script so that when the script throws an error, I can quickly determine at what point in the execution the error occurred. If, as chrisk5 suggests, this can be enabled through the UI, then it seems that it should be configurable via the command line.
jhoerr
 
Posts: 8
Joined: Wed Sep 21, 2011 4:08 pm

Postby jhoerr » Wed Dec 07, 2011 6:52 pm

Thanks, chrisk5 -- I enabled Verbose logging as per the KB article but it doesn't appear that the PRINT statements get logged.
jhoerr
 
Posts: 8
Joined: Wed Sep 21, 2011 4:08 pm


Return to SQL Compare Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests

cron