Search

Inconsitent results from sys.dm_exec_describe_first_result_set_for_object when objectID not valid by Dave_Ballantyne

Active

1
0
Sign in
to vote
Type: Bug
ID: 780521
Opened: 3/2/2013 11:20:54 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug

sys.dm_exec_describe_first_result_set_for_object returns inconsistent results when the objectid is not valid.

Select * From sys.dm_exec_describe_first_result_set_for_object(object_id('NoObject'),1);

Returns a single row with a column stating and error message "The object id '0' passed to sys.dm_exec_describe_first_result_set_for_object was invalid."

However :

with cteProcs
as
(
Select object_id('uspGetBillOfMaterials') as ObjectId
union all
Select object_id('uspGetBillOfMaterialsNotFound')

)
select * from cteprocs
         cross apply sys.dm_exec_describe_first_result_set_for_object(objectid,1);


Returns the same data repeated ( though with nullified objectids) for both executions.

Details (expand)

Product Language

English

Version

SQL Server 2012 - Standard Edition

Category

SQL Engine

Operating System

Not Applicable

Operating System Language

Not Applicable

Steps to Reproduce



As above

Actual Results



as above

Expected Results



as above

Platform

32

Virtualization

 
File Attachments
0 attachments
Sign in to post a comment.
Posted by Dave_Ballantyne on 3/2/2013 at 11:22 AM
Formatting of the above looks ok when edited!
Sign in to post a workaround.