SQL data compare - outputting fatal errors from logs into the console
dhawkes
Posts: 3 New member
I've created a Java program to run a project from the command line using the following command:
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.
\\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
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:
Many Thanks
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com
Unfortunately, that didn't add any additional logging to the console
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?
Thank you, I'll play around with the java logging.