sms policy provider Message ID 620 SQL

Hello,

I have installed system center 2012 SP1 on Windows server 2012, with SQL server 2012  on the same server.

I noticed in our component status that the SMS_POLICY_PROVIDER was critical... and when I open it up... I see hundreds of the same message ID 620

"Microsoft SQL Server reported SQL message 50000, Severity 16: *** Unknown SQL Error!"

There were not any other messages logged as they had been cleared.

Here is part of the policypv log

~CPolicySource::HandleSiteControlPolicy: ModernDeviceGenericSiteConfig  $$<SMS_POLICY_PROVIDER><02-06-2013 15:03:52.441+480><thread=6752 (0x1A60)>
*** EXEC sp_UpdResPolicyMap_DefaultPolicy  16777220,16777231  $$<SMS_POLICY_PROVIDER><02-06-2013 15:03:52.457+480><thread=6752 (0x1A60)>
*** *** Unknown SQL Error!  $$<SMS_POLICY_PROVIDER><02-06-2013 15:03:52.457+480><thread=6752 (0x1A60)>
~CPolicySource::HandleSiteControlPolicy: Failed to update the ResPolicyMap table for resource ID 16777220  $$<SMS_POLICY_PROVIDER><02-06-2013 15:03:52.458+480><thread=6752 (0x1A60)>
~CPolicySource::HandleSiteControlPolicy: DeviceGenericSiteConfig  $$<SMS_POLICY_PROVIDER><02-06-2013 15:03:52.459+480><thread=6752 (0x1A60)>
*** EXEC sp_UpdResPolicyMap_DefaultPolicy  16777220,16777232  $$<SMS_POLICY_PROVIDER><02-06-2013 15:03:52.467+480><thread=6752 (0x1A60)>
*** *** Unknown SQL Error!  $$<SMS_POLICY_PROVIDER><02-06-2013 15:03:52.467+480><thread=6752 (0x1A60)>
~CPolicySource::HandleSiteControlPolicy: Failed to update the ResPolicyMap table for resource ID 16777220  $$<SMS_POLICY_PROVIDER><02-06-2013 15:03:52.468+480><thread=6752 (0x1A60)>
~CPolicySource::HandleSiteControlPolicy: DeviceEnrollmentSiteConfig  $$<SMS_POLICY_PROVIDER><02-06-2013 15:03:52.469+480><thread=6752 (0x1A60)>
~no change  $$<SMS_POLICY_PROVIDER><02-06-2013 15:03:52.469+480><thread=6752 (0x1A60)>
~CPolicySource::HandleSiteControlPolicy: DeviceAPNSCertSiteConfig  $$<SMS_POLICY_PROVIDER><02-06-2013 15:03:52.469+480><thread=6752 (0x1A60)>
~no change  $$<SMS_POLICY_PROVIDER><02-06-2013 15:03:52.469+480><thread=6752 (0x1A60)>
~CPolicySource::HandleSiteControlPolicy: DeviceAPNSCSRSiteConfig  $$<SMS_POLICY_PROVIDER><02-06-2013 15:03:52.470+480><thread=6752 (0x1A60)>
~no change  $$<SMS_POLICY_PROVIDER><02-06-2013 15:03:52.470+480><thread=6752 (0x1A60)>
~CPolicySource::HandleSiteControlPolicy: Branding  $$<SMS_POLICY_PROVIDER><02-06-2013 15:03:52.470+480><thread=6752 (0x1A60)>
~no change  $$<SMS_POLICY_PROVIDER><02-06-2013 15:03:52.470+480><thread=6752 (0x1A60)>
~CPolicySource::HandleSiteControlPolicy: DeviceWP8AppMgmtSiteConfig  $$<SMS_POLICY_PROVIDER><02-06-2013 15:03:52.471+480><thread=6752 (0x1A60)>
~CDeviceEnrollmentGenericSCConfig::GenerateDevicePolicyXML: failed to retrieve DTGuid from AppModelname 0  $$<SMS_POLICY_PROVIDER><02-06-2013 15:03:52.473+480><thread=6752 (0x1A60)>


So I tried to run this query in SQL

EXEC sp_UpdResPolicyMap_DefaultPolicy 16777220,16777231

Which gives me this error:

Msg 10314, Level 16, State 11, Procedure DMP_FetchPolicyData, Line 139
An error occurred in the Microsoft .NET Framework while trying to load assembly id 65539. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error: 
System.IO.FileLoadException: Could not load file or assembly 'cryptoutility, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. An error relating to security occurred. (Exception from HRESULT: 0x8013150A)
System.IO.FileLoadException: 
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
Msg 515, Level 16, State 2, Procedure sp_UpdResPolicyMap_DefaultPolicy, Line 64
Cannot insert the value NULL into column 'PolicyID', table 'CM_HQM.dbo.MDMPolicy'; column does not allow nulls. UPDATE fails.
The statement has been terminated.
Msg 515, Level 16, State 2, Procedure sp_UpdResPolicyMap_DefaultPolicy, Line 84
Cannot insert the value NULL into column 'PolicyID', table 'CM_HQM.dbo.MDMPolicyAssignment'; column does not allow nulls. INSERT fails.
The statement has been terminated.

Which leads me to this KB

http://support.microsoft.com/kb/918040

I'm not sure how any permissions got messed up, there was no detaching/reattaching of databases... but at this point I'm stuck... 

The thing is.. good or bad, I haven't noticed this have any affect on anything else... but any help would be appreciated

February 6th, 2013 11:18pm

Do you have an AV product running? That's the usual culprit (one in particular) for nearly all SP1 upgrade issues. Honestly, at this point, you should just call CSS because anything anyone tells you here will be unsupported anyway.
Free Windows Admin Tool Kit Click here and download it now
February 7th, 2013 1:41am


Msg 10314, Level 16, State 11, Procedure DMP_FetchPolicyData, Line 139
An error occurred in the Microsoft .NET Framework while trying to load assembly id 65539. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error: 
System.IO.FileLoadException: Could not load file or assembly 'cryptoutility, Version=5.0.0.0,


This leads to http://support.microsoft.com/kb/2709082
February 7th, 2013 7:28am

Well, even after attempting the changes listed in that KB and in the errors were still occurring. so I did a little more checking and realized that SA was not listed as the DB owner, it was a domain account... so I changed the DB owner to SA, and was able to execute the query manually without error and the errors have stopped.

so it probably required both, the SA as owner, and the trustworthy change... and I did them in backwards order...  but no more errors! 

Thank you for the assistance! 

Free Windows Admin Tool Kit Click here and download it now
February 7th, 2013 6:57pm

Dears,

I have the same Error, and applied the KB except for the SA because i'm running SQL in windows authentication.

and in the logs of policy provider i got this error

CPolicySource::HandleSiteControlPolicy: ModernDeviceGenericSiteConfig SMS_POLICY_PROVIDER 3/19/2013 11:05:47 AM 8148 (0x1FD4)
*** EXEC sp_UpdResPolicyMap_DefaultPolicy  16777217,16777231 SMS_POLICY_PROVIDER 3/19/2013 11:05:47 AM 8148 (0x1FD4)
*** *** Unknown SQL Error! SMS_POLICY_PROVIDER 3/19/2013 11:05:47 AM 8148 (0x1FD4)
CPolicySource::HandleSiteControlPolicy: Failed to update the ResPolicyMap table for resource ID 16777217 SMS_POLICY_PROVIDER 3/19/2013 11:05:47 AM 8148 (0x1FD4)
CPolicySource::HandleSiteControlPolicy: DeviceGenericSiteConfig SMS_POLICY_PROVIDER 3/19/2013 11:05:47 AM 8148 (0x1FD4)
*** EXEC sp_UpdResPolicyMap_DefaultPolicy  16777217,16777232 SMS_POLICY_PROVIDER 3/19/2013 11:05:47 AM 8148 (0x1FD4)
*** *** Unknown SQL Error! SMS_POLICY_PROVIDER 3/19/2013 11:05:47 AM 8148 (0x1FD4)
CPolicySource::HandleSiteControlPolicy: Failed to update the ResPolicyMap table for resource ID 16777217 SMS_POLICY_PROVIDER 3/19/2013 11:05:47 AM 8148 (0x1FD4)
CPolicySource::HandleSiteControlPolicy: DeviceEnrollmentSiteConfig SMS_POLICY_PROVIDER 3/19/2013 11:05:47 AM 8148 (0x1FD4)
no change SMS_POLICY_PROVIDER 3/19/2013 11:05:47 AM 8148 (0x1FD4)

any idea

March 19th, 2013 8:15am

I'm having the same issue over here.

SMS_POLICY_PROVIDER 

Microsoft SQL Server reported SQL message 50000, severity 16: *** Unknown SQL Error!

Microsoft SQL Server reported SQL message 50000, severity 16: *** Unknown SQL Error!

Microsoft SQL Server reported SQL message 50000, severity 16: *** Unknown SQL Error!

Microsoft SQL Server reported SQL message 50000, severity 16: *** Unknown SQL Error!

Microsoft SQL Server reported SQL message 50000, severity 16: *** Unknown SQL Error!

Any idea?????? 

Free Windows Admin Tool Kit Click here and download it now
April 19th, 2013 2:43pm

Hi MedhatRizk,

Even if you are running SQL in windows authentication mode, you should still perform the step to reset the database owner to sa
I know it seems weird because you are running in windows authentication mode, but this is the default setup and is required for things to work properly.

I ran into this issue after I moved my ConfigMgr database LDF file to a different drive.  The detach and attach database commands required me to do the following:

http://support.microsoft.com/kb/2709082
ALTER DATABASE <ConfigMgr DB> SET TRUSTWORTHY ON

http://www.acupofit.com/2012/04/unknown-sql-error-entries-in-sccm-log.html
-- Check Database ownership:

EXEC sp_helpdb

-- Change a Database owner to 'SA'

USE <myDatabaseName>
GO
EXEC sp_changedbowner 'sa'

May 21st, 2013 2:03pm

David,

Please let me know if you are having the same issue after trying the steps I listed for MedhatRizk

Free Windows Admin Tool Kit Click here and download it now
May 21st, 2013 2:04pm

Review sql server log. Give privilege to account machine of SC Server in wsus db.

February 10th, 2015 6:49pm

Folks,  am getting the same -  where the resource IDs are 16777217 and 16777218, neither of which appear in the SCCM DB.  The SCCM server itself is ID 16777219

SCCM DB owner is SA

Free Windows Admin Tool Kit Click here and download it now
September 3rd, 2015 11:26am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics