Options

Database snapshot was saved by newer version of SQL Compare

connectxconnectx Posts: 3
I downloaded the latest SQLToolkit installer (ver 1.8.2.238) this morning. I rebuilt my laptop over the weekend and don't have an earlier version of the RG tools installed.

I used SQL Compare (10.2.0.1337) to generate a snapshot of my SQL 2008 R2 database. I am using this snapshot along with the SQL Compare SDK to synchronize my databases. I have been using the same sync program for a couple of years now. The only thing that changes in it is the snapshot.

I used to have an earlier version of the RG tools from a couple of months ago installed and referenced by my sync project. I have removed and re-added the references to the RG assemblies.

Everything builds successfully. Everything appears to function normally when I run the sync program. By when I actually begin to execute the sdk code I get an error. The error message is: "The database snapshot was saved by a newer version of SQL Compare". The error occurs during a call to RedGate.SQLCompare.Engine.Database.LoadFromStream(). I have included the full exception message below.

Looking through the forums for SQL Compare, I see that some patches were released earlier this month and I'm wondering if this is the cause of the mismatch.

Here are the assembly versions from the \SQL Comparison SDK 10\Assemblies\SQL Compare install folder:

RedGate.Shared.SQL.dll, 9.5.0.440
RedGate.Shared.Utils.dll, 9.5.0.440
RedGate.SQLCompare.ASTParser.dll, 10.0.0.192
RedGate.SQLCompare.Engine.dll, 10.0.0.192
RedGate.SQLCompare.Rewriter.dll, 10.0.0.192

==================================================
Full exception detail:

System.ApplicationException was unhandled
HResult=-2146232832
Message=The database snapshot was saved by a newer version of SQL Compare
Source=RedGate.SQLCompare.Engine
StackTrace:
at RedGate.SQLCompare.Engine.Database.LoadFromStream(Stream #a0, Database #uwL)
at RedGate.SQLCompare.Engine.Database.LoadFromStream(Stream f)
at ChartX.Configurator.Form1.SynchronizeDatabaseWithSnapshot() in c:\Projects\ChartX\ChartX.Configurator\Form1.cs:line 343
at ChartX.Configurator.Form1.btnOpenDatabase_Click(Object sender, EventArgs e) in c:\Projects\ChartX\ChartX.Configurator\Form1.cs:line 295
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at ChartX.Configurator.Program.Main() in c:\Projects\ChartX\ChartX.Configurator\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

===============================================

Hopefully someone has a suggestion for me. I need to get updates out to my clients in the next few days and not being able to synchronize the database schemas using this tool means I have a lot of tedious manual work to do.

Thanks
Robert Johnson
ConnectX Healthware, LLC

Comments

  • Options
    In case anyone else has the same issue as I reported earlierm, I have spoken to RG support. The problem is that currently the SQL Compare uses a newer version of the code than the SDK does. Until the SDK is updated to use the same dll's and newer code this error will continue.

    The resolution, at least for now, is to continue using the older version of SQL Compare to build the snapshots. As long as the version of SQL Compare is older than the SDK version it appears to work fine.
Sign In or Register to comment.