Home Dashboard Directory Help
Search

sys.dm_exec_sql_text bug by Joe.TJ


Status: 

Resolved
 as By Design Help for as By Design


1
0
Sign in
to vote
Type: Bug
ID: 776561
Opened: 1/14/2013 11:17:36 PM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

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)
Details
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
Sign in to post a workaround.