sp_BlitzCache 安装语法错误

pke*_*ner 2 sql-server sp-blitzcache

尝试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 '.'.
Run Code Online (Sandbox Code Playgroud)

第 2705 行是:

/* END Testing using XML nodes to speed up processing */
Run Code Online (Sandbox Code Playgroud)

第 2865FROM行是:

/* Set configuration values */
SELECT  @ctp = NULLIF(CAST(value AS INT), 0)
FROM    sys.configurations
WHERE   name = 'cost threshold for parallelism'
OPTION (RECOMPILE);
Run Code Online (Sandbox Code Playgroud)

它似乎是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)')
Run Code Online (Sandbox Code Playgroud)
"Cannot call methods on int."
Run Code Online (Sandbox Code Playgroud)

下一个错误在源代码中的第 2032 行 - 带有

q.n.query('.') AS statement
Run Code Online (Sandbox Code Playgroud)
Can't find q as a column, function, or q.n.query is ambiguous.
Run Code Online (Sandbox Code Playgroud)

之后有更多的级联错误。

Bre*_*zar 5

您在 2000 或 2005 兼容级别的数据库中运行它,但不受支持。