Total Pageviews

Search This Blog

Tuesday, April 2, 2013

Tip - How to retrieve Security Policy Metadata info stored in ModelSecPolRuntimeEx (Dynamics AX 2012)

Dear Friends,

Thought to share with you about this table in Dynamics AX 2012 which stores the runtime metadata for all the queries involved in Security Policies. I figured out  it's a good starting point for debugging your Security Policies.

The resultset retrieved from the below query will tell you about the PrimaryTable, ConstrainedTable, Query Name, and more importantly, the column ModeledQueryDebugInfo which contains the raw sql statement that is used behind the scenes. (Just copy-paste the below SQL and run in your Management Studio to see the results)

SELECT [PRIMARYTABLEAOTNAME], [QUERYOBJECTAOTNAME],
[CONSTRAINEDTABLE], [MODELEDQUERYDEBUGINFO],
[CONTEXTTYPE],[CONTEXTSTRING],
[ISENABLED], [ISMODELED]
FROM [dbo].[ModelSecPolRuntimeEx]

As per msdn, The ModelSecPolRuntimeEx table stores the runtime metadata that is necessary to apply security policies.



2 comments:

Gexton said...

Security is the one of the best thing which always give you a sense of Ultra security and protection against the internal as well as external factor
home security service
home security solution

Akhil Khatri said...

Nice Blog.

Check http://makealivingwriting.blogspot.in/ if you want practical information on how to make money by writing.