SQL DC Project works, but batch file fails
EACC_NZ
Posts: 17
Hi
I've got a number of projects setup that run as batch files without fail. However I have four batch files that consistently fail with the entry below in the log file. All four of these projects run fine from the GUI. Any suggestions on what could be the cause of the problem would be appreciated!
Red Gate SQL Data Compare Command Line Utility V5.3.0.81
==============================================================================
Copyright ¸ Red Gate Software Ltd 2004-2006
Serial Number:001-001-xxxxxx-xxxx
Unexpected error: Failed to convert Parameter LastCompared to Date 05/22/2008
12:54:27.
Failed to convert Parameter LastCompared to Date 05/22/2008 12:54:27.
RedGate.SQL.Shared.SerialializationParameterConversionException
at RedGate.SQL.Shared.XMLSerializeFormatter.ReadDateTime(String name, Boolean isOptional)
at RedGate.SQL.Shared.XMLSerializeFormatter.ReadDateTime(String name)
at RedGate.SQLDataCompare.Engine.Project.Deserialize(Int32 nVersionId, ISerializeFormatter formatter)
at RedGate.SQL.Shared.XMLSerializeFormatter.DeserializeRootObject(String fileName, String name, String typeName)
at RedGate.SQLDataCompare.Engine.Project.LoadFromDisk(String fileName)
at _23._1(String )
at RedGate.SQLDataCompare.CommandLine.Runner._1(String )
at RedGate.SQLDataCompare.CommandLine.Runner._1()
at RedGate.SQLDataCompare.CommandLine.Runner.Run()
at RedGate.SQLDataCompare.CommandLine.Startup._1(String[] )
Caused by:
String was not recognized as a valid DateTime.
System.FormatException
at System.DateTimeParse.GetDayOfNNY(DateTimeResult result, DateTimeRawInfo raw, DateTimeFormatInfo dtfi)
at System.DateTimeParse.ProcessTerminaltState(Int32 dps, DateTimeResult result, DateTimeRawInfo raw, DateTimeFormatInfo dtfi)
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at System.DateTime.Parse(String s, IFormatProvider provider, DateTimeStyles styles)
at System.DateTime.Parse(String s, IFormatProvider provider)
at System.DateTime.Parse(String s)
at RedGate.SQL.Shared.XMLSerializeFormatter.ReadDateTime(String name, Boolean isOptional)
**********************Database Comparison Completed on Thu-22-05 at 01:37 ********************
I've got a number of projects setup that run as batch files without fail. However I have four batch files that consistently fail with the entry below in the log file. All four of these projects run fine from the GUI. Any suggestions on what could be the cause of the problem would be appreciated!
Red Gate SQL Data Compare Command Line Utility V5.3.0.81
==============================================================================
Copyright ¸ Red Gate Software Ltd 2004-2006
Serial Number:001-001-xxxxxx-xxxx
Unexpected error: Failed to convert Parameter LastCompared to Date 05/22/2008
12:54:27.
Failed to convert Parameter LastCompared to Date 05/22/2008 12:54:27.
RedGate.SQL.Shared.SerialializationParameterConversionException
at RedGate.SQL.Shared.XMLSerializeFormatter.ReadDateTime(String name, Boolean isOptional)
at RedGate.SQL.Shared.XMLSerializeFormatter.ReadDateTime(String name)
at RedGate.SQLDataCompare.Engine.Project.Deserialize(Int32 nVersionId, ISerializeFormatter formatter)
at RedGate.SQL.Shared.XMLSerializeFormatter.DeserializeRootObject(String fileName, String name, String typeName)
at RedGate.SQLDataCompare.Engine.Project.LoadFromDisk(String fileName)
at _23._1(String )
at RedGate.SQLDataCompare.CommandLine.Runner._1(String )
at RedGate.SQLDataCompare.CommandLine.Runner._1()
at RedGate.SQLDataCompare.CommandLine.Runner.Run()
at RedGate.SQLDataCompare.CommandLine.Startup._1(String[] )
Caused by:
String was not recognized as a valid DateTime.
System.FormatException
at System.DateTimeParse.GetDayOfNNY(DateTimeResult result, DateTimeRawInfo raw, DateTimeFormatInfo dtfi)
at System.DateTimeParse.ProcessTerminaltState(Int32 dps, DateTimeResult result, DateTimeRawInfo raw, DateTimeFormatInfo dtfi)
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at System.DateTime.Parse(String s, IFormatProvider provider, DateTimeStyles styles)
at System.DateTime.Parse(String s, IFormatProvider provider)
at System.DateTime.Parse(String s)
at RedGate.SQL.Shared.XMLSerializeFormatter.ReadDateTime(String name, Boolean isOptional)
**********************Database Comparison Completed on Thu-22-05 at 01:37 ********************
Regars
Colin
Colin
Comments
Regards
Col
Colin
Thought - the "upgrade" for version 5 to version 6 actually equals a parallel installation, not an upgrade of the existing software. Being a typical Kiwi Bloke, who never reads the instruction book until things go very wrong, I'm sure there's a piece of documentation somewhere on the Redgate website that tells the unwary about this.
Sorry if this is a bit blunt, no intention to offend
Colin
It's a parallel install in the sense that you can continue to use v5 with v6 installed, but obviously we can't ensure full backwards compatability in the sense of running v6 projects in v5 since v6 has introduced new features.
However, I agree that just opening a project in the later version shouldn't cause it to break. I think, if memory serves me correctly, that there was a bug in v5 in our date handling code. This was fixed for v6, but looks like it had the side effect of saving dates to disk in a format no longer readable by v5. In this case, it's due to the "last compared" date, which is set on the project whenever you run a comparison in the UI.
If you need to run v5 projects in the v5 UI (and also be able to run them on the v5 command line), I'd suggest making the project files read-only on disk - this should prevent the last compared date from being written back.
Regards,
Robert
Red Gate