views:

13

answers:

1

I want to write a report using SQL Server Reporting Services. I want a plan_handle (which is varbinary(64) ) from the dynamic management view sys.dm_exec_query_stats to be a parameter in another report.

But SQL Server Reporting Services doesn't support this type (varbinary(64)) very well. Looking for solutions, workarounds etc...

A: 

I think I'm going to go with strings out of the db and strings into the db. Strings out will look something like:

[Plan Handle] = '0x' + cast('' as xml).value('xs:hexBinary(sql:column("plan_handle") )', 'varchar(max)')

Strings going in will be handled with dynamic sql (build a varbinary literal into the query).

Michael J Swart