Normally when one creates a group which will be dynamically populated and this group is being saved, all is well. So it was until I moved the OpsMgr-database to another SQL-server. When I made a new group and configured this group to be dynamically populated and tried to save this group, I got this error message:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnx8JCRGLumfE_fBTHI4cqAhyphenhyphenG-tayxMbQOCvRe1yI617N6mzTZ68_u4ejjHvu-4Gda6S7yyrI4FTIUVimiXX3NphVsrzleygO_eLKTpwZeo3liQkw5THKY7Gx7LEa7nJf3c7eyBEkZ-6j/s320/2602_01.jpg)
I was a bit suprised at first but since I had created many dynamically populated groups already without any error I knew the error had to be related with the move of the OpsMgr-database. More over since that was the only change in the SCOM-environment.
The OpsMgr eventlog showed this event:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmVWEL_JWMLcdc2SZifMljp6Ps7OUwHngdhM6TbDBnrR7U3QvbzVOJlzKhNnMzWPJRDnh60-DNbK7By-qtysjTjQ8nGsWUFqaijscLRnctUiwU78ScoH5cR5ev2_OueyOCJzS-2MZ8rYfF/s320/2602_02.jpg)
How nice! This event told me what was wrong: The execution of usercode in the .NET Framework is disabled. And that is default on a freshly installed SQL 2005 server. When one installs OpsMgr this feature is enabled. But in this case that is a different SQL-server now.
Cause
By default SQL accepts only Stored Procedures based on T-SQL. But when one creates a group which is to e bdynamically populated, certain Stored Procedures are used which are based on any language but T-SQL.
Solution
In order to resolve this issue, Common Language Runtime has to be enabled on the SQL instance where the OpsMgr database resides. Look here how to enable it. (Also a good source for any other programming and/or SQL related information)
See screendump below how the CLR must be set on the SQL-server:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0NpTY-XzG2QvsV_WfzblF-id7yCcixeswhki0CAtdNRW2NH9WKFZRD13tfxy9Y35V3btmWX0Z2r91gMZjmkZyI3iUdruKcROl9buXcXv29Mes8iRtFCWClgW8uz-X8clVapY3BBVncSLH/s320/2602_03.jpg)