Wednesday, March 9, 2011

sys.dm_clr_properties

sys.dm_clr_properties: Returns a row for each property related to SQL Server common language runtime (CLR) integration, including the version and state of the hosted CLR.

Enabling CLR using SP_Configure doesn't gurantee that it is initialized. To initialize CLR, you have to execute ASSEMBLY statements, CLR Routine Type or Trigger.

See below image for the output of this DMV.


Below are the different state of CLR.

  • Mscoree is not loaded.

  • Mscoree is loaded.

  • Locked CLR version with mscoree.

  • CLR is initialized.

  • CLR initialization permanently failed.

  • CLR is stopped


Check http://msdn.microsoft.com/en-us/library/ms174983.aspx link for different CLR state description.

2 comments:

  1. How do I un-initialize CLR?

    ReplyDelete
  2. Easiest way to restart the SQL Server and don't run any assembly.

    ReplyDelete