I am using
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.