SQL data compare - outputting fatal errors from logs into the console

I've created a Java program to run a project from the command line using the following command:
\\c\Program Files (x86)\Red Gate\SQL Data Compare 13\SQLDataCompare /Project:TEMPLATE.sdc /e:C:\Redgate /Server1:s1 /Server2:s2 /DataBase1:db1 /DataBase2:db2 /logLevel:Verbose

However, if there is an issue with the project, like an error in the where clause, my program will never know and appears to hang. The error below is outputted in the log file, but nothing is outputted to console. I have the console logging set to All.

Is there a way of writing fatal errors to the console, as well as the log file? It appears that in v13, only trace messages are outputted to the console.

<div>|Fatal |Command Line |1 |Comparison of 'DB1' and 'DB2' failed: SQL query.
<span style="background-color: transparent; color: inherit; font-size: inherit; font-family: roboto, "helvetica neue", Arial, sans-serif;">RedGate.Legacy.CommandLine.FatalExecutionException: Comparison of 'DB1' and 'DB2' failed: SQL query ---> RedGate.SQLDataCompare.Engine.ComparisonSessionSQLException: SQL query ---> System.Data.SqlClient.SqlException: Invalid column name 'XYZ_id'.</span>
</div>


Tagged:

Answers

  • Eddie DEddie D Posts: 1,807 Rose Gold 5
    Hi, thank you for your forum post.

    If you add the the /verbose switch to your command line syntax, do you see additional console logging?  For example your syntax based on the information provided will be as follows:

    \\c\Program Files (x86)\Red Gate\SQL Data Compare 13\SQLDataCompare /Project:TEMPLATE.sdc /e:C:\Redgate /verbose /Server1:s1 /Server2:s2 /DataBase1:db1 /DataBase2:db2 /logLevel:<span>Verbose</span>


    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • dhawkesdhawkes Posts: 3 New member
    Thanks for your reply, Eddie. 
    Unfortunately, that didn't add any additional logging to the console

  • Jessica RJessica R Posts: 1,319 Rose Gold 4

    It should write fatal errors to the console as far as I'm aware (for example, if you don't include any objects in the comparison, it gets logged as FATAL in the log and appears in the console output as well).

    I wonder if it's the type of error and how it manifests that prevents it from appearing.

    To first confirm that it's not related to Java running it, if you run the same command directly from a command prompt, does it have the same issue?

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


  • dhawkesdhawkes Posts: 3 New member
    When I run the command via the command prompt, I do see the fatal error. So it must be something to do with my Java program. 
    Thank you, I'll play around with the java logging.
Sign In or Register to comment.