2

I am using sp_BlitzCache version 4.1 (20161210) and executing it on a 2008R2 instance (10.5.4042).

If I execute the sp without the @OutputDatabaseName, @OutputSchemaName, and @OutputTableName, it works fine. However, when I set those values, it runs through its process and at the very end, and error appears:

"The select list for the INSERT statement contains more items than the insert list. The number of SELECT values must match the number of INSERT columns."

The specific statement I am running is:

EXEC [dbo].[sp_BlitzCache] @OutputDatabaseName = 'Maintenance_Stats'
,@OutputSchemaName = 'dbo'
,@OutputTableName = 'BlitzCacheResults'

The database, schema, and table already exist, but has no records in it. So...somewhere in the sp code, it created the table, but is trying to stuff too many values into the table.

I am using this to try to troubleshoot an application (SCCM) hang issue, and as recommended, have created a SQL Agent job that the helpdesk can execute when they encounter the issue (it is intermittent), but I tried executing it myself, and it failed with the above error.

  • Is there anywhere in the BlitzCache procs that creates the table? If so, can you just drop (or just rename) the existing table and have the process re-create it? I'm assuming it may just be an outdated table with less columns than the version used by the BlitzCache Procedure. – MguerraTorres Feb 9 '17 at 22:36
  • 1
    I believe that is fixed in the latest sp_blitzcache – Max Vernon Feb 9 '17 at 22:39
  • are you using this version github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/blob/… – Kin Shah Feb 9 '17 at 22:41
4

The comments are right, but I figured I'd chime in. That is fixed in the latest release

Full disclosure: I am owned and operated by Brent Ozar Unlimited, and contributed both the bug and the bug fix to this code.

On my birthday.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.