locked
Policy Management assembly exception RRS feed

  • Question

  • Hi,

    I have implemented two very simple policy categories. One stop users adding synonms external resources on the dbo schema and the other simply enforces naming conventions, eg. sp*, tbl*, etc.

     

    Everything seemed to be working fine until yesterday, now rounghly 70% of ddl statements produced this stack trace...

    Msg 6533, Level 16, State 49, Procedure sp_execute_policy, Line 0

    AppDomain mssqlsystemresource.dbo[runtime].367 was unloaded by escalation policy to ensure the consistency of your application. Out of memory happened while accessing a critical resource.

    System.Threading.ThreadAbortException: Thread was being aborted.

    System.Threading.ThreadAbortException:

    at System.Threading.Thread.AbortInternal()

    at System.Threading.Thread.Abort(Object stateInfo)

    at System.Data.SqlServer.Internal.ClrLevelContext.CheckSqlAccessReturnCode(SqlAccessApiReturnCode eRc)

    at System.Data.SqlServer.Internal.ClrLevelContext.PrepExec(EventTranslator eventTranslator, Int64 tranId, Transaction associatedTransaction, UrtNativeRequest* pRequest, Int32* pfRowValid)

    at System.Data.SqlServer.Internal.EventTranslator.PrepExec(Int64 tranId, Transaction associatedTransaction, UrtNativeRequest* pRequest)

    at System.Data.SqlServer.Internal.RequestExecutor.Execute(SmiConnection connection, Int64 transactionId, Transaction associatedTransaction, CommandBehavior behavior, SmiExecuteType executeType)

    at System.Data.SqlClient.SqlCommand.RunExecuteNonQuerySmi(Boolean sendToPipe)

    at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)

    at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

    at Microsoft.SqlServer.Management.Dmf.PolicyEvaluationHelper.LogExceptionMessage(String message, SqlConnection connection)

    at Microsoft.SqlServer.Management.Dmf.PolicyEvaluationHelper.EvaluateAutomatedPolicy(String policy, SqlXml eventData, Int64& historyId)

    at Microsoft.SqlServer.Management.Dmf.PolicyEvaluationWrapper.EvaluateAutomatedPolicy(String policy, SqlXml eventData, Int64& historyId)

    The statement has been terminated.

    The rest of the time it works fine.

     

    Friday, May 7, 2010 9:47 AM

Answers

  • Looks like you are out of memory. DMF tries to do policy evaluation in SQL CLR but runs out of memory.

    Do you still see it? How much memory you have?

    I believe restarting the Sql Server process will help in the short term, if it's something you can do.

    Tuesday, May 11, 2010 1:27 AM