Exception message

Trying to use ClearTrace with SQL2012. Database exists, and contains 2 other tables.Tools->Options, populate with localhost/Sandpit, I get the exception message and the following file gets created.
Looks like I can't add an attachment, so here goes


ClearTrace Error


Version: 2014.45.0
Last Exception: Invalid column name 'WDate'.
Last Target Site: Void OnError(System.Data.SqlClient.SqlException, Boolean, System.Action`1[System.Action])


Exception Type: System.Data.SqlClient.SqlException
Exception Message: Invalid column name 'WDate'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at ClearData.ClearTrace.Helper.ExecuteNonQuery(SqlConnection sqlConnection, String sqlStatement, Int32 commandTimeout)
at ClearData.ClearTrace.Helper.ExecuteNonQuery(String serverName, String databaseName, String sqlStatement, Int32 commandTimeout)
at ClearData.ClearTrace.Helper.UpgradeDatabase(String serverName, String databaseName)
at ClearTraceGui.OptionsForm.ConfigureDatabase()
at ClearTraceGui.OptionsForm.btnSave_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
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.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.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 System.Windows.Forms.Application.RunDialog(Form form)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at ClearTraceGui.MainForm.optionsToolStripMenuItem_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.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 System.Windows.Forms.Application.Run(Form mainForm)
at ClearTraceGui.Program.Main()

So this is the first time you've run ClearTrace against this database?

I believe it was the first time ClearTrace was run against the database / server. I've had so many issues with ClearTrace. I received an error message that when I checked the forums suggested that SMO was not installed when is was. I tried the SQL2014 version but that woulld not read the (2012) trace file, the 2012 version does not seem to have a command line executable. My trace files start at _159, and there are MANY of them (over 150), but only the first one imports.

I've used ClearTrace previously and it's a god send, a tool that has really helped pinpoint areas for focus, but it feels a little too loose at the moment.

pcd

So that's a really odd code path I sent you down to get that error. Do you happen to know the names of the other two tables? My best guess is that if you start with a completely empty database it will work OK. I'll work on getting a fix for this specific issue but it will probably be a day or two.

Regarding SMO, I can't speak to those specific errors without seeing them. I would expect SQL 2014 to read a SQL 2012 trace file. I do know keeping multiple versions of SMO supported is a ROYAL pain. Nothing really surprises me anymore with SMO.

If you want to start at a specific number you can basic wildcards in the file name. That might get you closer to what you're looking for.

Please see the following topic for a build that may fix the SMO issue: