Verbose logging via command line

jhoerrjhoerr Posts: 9
edited December 7, 2011 12:52PM in SQL Compare Previous Versions
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

Comments

  • 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.
  • 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?
  • 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
  • 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
    Product Manager
    Redgate Software
  • 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.
  • Thanks, chrisk5 -- I enabled Verbose logging as per the KB article but it doesn't appear that the PRINT statements get logged.
Sign In or Register to comment.