尝试sp_BlitzCache
在 SQL Server 2008 上安装时,我得到:
Msg 102, Level 15, State 1, Procedure sp_BlitzCache, Line 2705 Incorrect syntax near '.'.
Msg 102, Level 15, State 1, Procedure sp_BlitzCache, Line 2715 Incorrect syntax near '.'.
Msg 102, Level 15, State 1, Procedure sp_BlitzCache, Line 2865 Incorrect syntax near '.'.
第 2705 行是:
/* END Testing using XML nodes to speed up processing */
第 2865 行是以下FROM
行:
/* Set configuration values */
SELECT @ctp = NULLIF(CAST(value AS INT), 0)
FROM sys.configurations
WHERE name = 'cost threshold for parallelism'
OPTION (RECOMPILE);
好像是5.5版本
SQL Server 版本为 10.0.6000.29。
当我翻阅代码时,我看到的第一个突出显示的错误是源文件中的 #1162:(之后还有 4 个错误。)
SELECT CAST('' AS XML).value('xs:hexBinary( substring(sql:variable("@individual"), sql:column("t.pos")) )', 'varbinary(max)')
"Cannot call methods on int."
下一个错误出现在源代码的第 2032 行 - 一个带有
q.n.query('.') AS statement
Can't find q as a column, function, or q.n.query is ambiguous.
之后有更多的级联错误。