5

I am using LINQPad and I want to get the list of instance pipe names from the sys.dm_os_child_instances table. How is that expressed in LINQ-to-SQL?

This doesn't work:

from n in sys.dm_os_child_instances
select n

I don't think it matters, but I am using SQL Server Express 2008.

Also, yes, I know I can run raw SQL from LINQPad.

jedatu
  • 4,053
  • 6
  • 48
  • 60

1 Answers1

6

LINQPad allows this query if you tick the 'Include System Views and SPs' checkbox in connection properties.

A couple of other points:

  • If you have capitalization enabled, it's sys.Dm_os_child_instances rather than sys.dm_os_child_instances

  • The query "from n in sys.Dm_os_child_instances select n" is valid but frivilous: you can just go "sys.Dm_os_child_instances"

Joe Albahari
  • 30,118
  • 7
  • 80
  • 91