sys.dm_exec_sql_text bug - by Joe.TJ

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 776561 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 1/14/2013 11:17:36 PM
Access Restriction Public

Description

在非master上下文中,使用sys.dm_exec_sql_text,一直报错:Incorrect syntax near '.'.
是否这个表值函数只能在master中使用。
我的SQL Server版本号:Microsoft SQL Server 2008 (SP2) - 10.0.4000.0 (X64)   Sep 16 2010 19:43:16   Copyright (c) 1988-2008 Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) 
Sign in to post a comment.
Posted by Joe.TJ on 1/16/2013 at 7:27 PM
的确是兼容级别的问题。谢谢
Posted by Microsoft on 1/15/2013 at 11:48 AM
Hello,
The behavior you are seeing is by design. The APPLY operator is available only if your current database has compatibility level >= 90. So please make sure you run the query from a database that matches the compatibility level.

--
Umachandar, SQL Programmability Team