SQLDataCompare and DOS batch file
MikeD
Posts: 9
I have successfuly tested my database comparison using a simple batch file to call SQLDataCompare. This works fine on my dev pc.
I copied my batch file and the recommended RedGate files (as per the help file)
SQLDataCompare.exe
RedGate.CommandLine.BuildInfo.dll
RedGate.CommandLine.Commoon.dll
RedGate.CommandLine.Distribution.dll*
RedGate.SQL.Shared.dll
RedGate.SQLDataCompare.CommandLine.dll
RedGate.SQLDataCompare.Engine.dll
RedGate.CommandLine.Distribution.dll*
to the server that I want the comparison to run from but it fails with the error: -
Error: This is an unlicensed copy of the Red Gate SQL Toolkit command-line. Please contact the person or organisation that
supplied you with this software.
I don't get any prompts to enter a license key.
The server has the .NET Framework 1.1 installed
I copied my batch file and the recommended RedGate files (as per the help file)
SQLDataCompare.exe
RedGate.CommandLine.BuildInfo.dll
RedGate.CommandLine.Commoon.dll
RedGate.CommandLine.Distribution.dll*
RedGate.SQL.Shared.dll
RedGate.SQLDataCompare.CommandLine.dll
RedGate.SQLDataCompare.Engine.dll
RedGate.CommandLine.Distribution.dll*
to the server that I want the comparison to run from but it fails with the error: -
Error: This is an unlicensed copy of the Red Gate SQL Toolkit command-line. Please contact the person or organisation that
supplied you with this software.
I don't get any prompts to enter a license key.
The server has the .NET Framework 1.1 installed
Comments
I think that the help file has a bit of an omission. Once you have activated the command-line tools on one machine, you can use them without activating again on a second machine if you include:
RedGate.CommandLine.BuildInfo.dll
RedGate.CommandLine.Common.dll
RedGate.CommandLine.Distribution.dll
RedGate.CommandLine.Distribution.mod
In the same directory as the command line tools that you want to use. Don’t forget to copy all of the necessary support files as well, for example, for SQLDATACOMPARE.exe:
RedGate.SQLDataCompare.CommandLine.dll
RedGate.SQLDataCompare.Engine.dll
RedGate.SQL.Shared.dll
Don't forget that you must successfully activate the software on the computer where the Red Gate SQL Bundle had originally been installed before copying the files!
I have included the .Distribution.Mod file but now I get the following error: -
Unexpected error: The format of the file 'RedGate.CommandLine.Distribution.dll' is invalid.
The format of the file 'RedGate.CommandLine.Distribution.dll' is invalid.
System.BadImageFormatException
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at ?.?(String )
at ?.?()
at RedGate.CommandLine.Common.CommandLine.ParseCommandLine(Stream metaDefinitionIn, String[] args, Boolean useCommon)
at RedGate.CommandLine.Common.CommandLine.ParseCommandLine(Stream metaDefinitionIn, String[] args)
at RedGate.SQLDataCompare.CommandLine.Startup.?(String[] )
These files have all been copied from my local machine which runs the SQLDataCompare without error.
Mike.
The list of files that I had supplied is the complete list. I copied these to a clean machine just to make sure.
I'd say that now you've come across a completely unrelated .NET Runtime error. What is the complete version of .NET that you have installed? You should have .NET 1.1.4322.573. If you are using 1.1.4322.510, for instance, you can get wierd problems like this. Also if you have 1.1 and 2.0 installed simultaneously. It will work if you have 2.0 and 1.0 or 1.0 and 1.1.
My dev pc has .NET 1.1.4322.573 but the server giving me the error has .NET 1.1.4322.2032
I will get this upgraded and post back the results.
Thanks
Mike.
I finally got my server installed with 1.1.4322.573 of .NET Framework but I am still getting the same error. This is the only version of the Framework installed. The server is Windows 2000 (SP4)
I am a bit stumped now as to why this is not working. Any ideas?
Thanks,
Mike.
I have mailed the toolkit files as requested.
Mike.