Dynamics AX
  RSS Feed  LinkedIn  Twitter
Want to turn you're data into a true asset? Ready to break free from the report factory?
Ready to gain true insights that are action focused for truly data informed decisions?
Want to do all of this across mutliple companies, instances of Dynamics and your other investments?
Hillstar Business Intelligence is the answer then! (www.HillstarBI.com)

Hillstar Business Intelligence for Microsoft Dynamics AX and NAV on Mobile, Desktop, Tablet


Let us prove to you how we can take the complexity out of the schema and truly enable users to answer the needed questions to run your business! Visit Hillstar Business Solutions at: www.HillstarBI.com

Friday, December 30, 2011

AX 2012 - Run Reports without hitting the Production DB





Update: a reader of this post pointed out that this would not work for the setup using log shipping. Using log shipping is for HA, and he is 100% correct. The log shipped db will remain in standby mode and therefore the .net bc would fail in connecting to it. So instead of using log shipping replace that concept either with replication, or mirroring. The other points that people have brought up, including the same reader, is the cost for the license for the SQL server as well as the extra AOS needed. This is true, however if the desire is to offload the processing of reporting resources from the production, transactional db, then the cost of the extra license would have to be used in order to weight the value in which such a setup could bring. With this, still it is possible to have a reporting database that is different than the production transactional db.


I hope everyone had blessed and wonderful holidays! I hope that you got plenty of time with family, friends and loved ones. I wanted to make sure and get one last post in, for the year 2011. Man, what a great year it has been, for the Dynamics Community and Ecosystem.

There are plenty of great wrap up post going on for 2011, as well as some predictive post as well. So, for my 800th post on this blog, and to close out 2011, I wanted to leave you all with a late Christmas gift, if you will. That is, as the title of this post suggest, a way to run AX 2012 Reports, without hitting the Production Database!



What we see in the above image, is the reporting architecture diagram from MSDN. This explains for us, the steps in which a typical, modeled driven solution report executes and fires from menu item execution, to rendering within the AX Rich client that is hosting the report viewer control.

Now lets take this understanding, along with how to setup multiple instances of SSRS on the same server role, and use this understanding to design a solution that will enable us to run all AX reporting from a Reporting Database. This includes both out-of-the-box and custom developed AX-SSRS Reports!.



Important: This approach has not been widely tested. This is not a solution from Microsoft, but something I've been thinking about how to achieve myself. Use this at your own risk, without any warranty or guarantee's.

So, in order to properly understand how we can do this, safely, and securely, and be able to maintain and support such a design, lets revisit a simple architecture that shows the server roles of how a standard AX-SSRS is setup. To help better understand this point, I've created the following diagram in Visio, that illustrates such a standard setup.



With the above, we see a simple architecture that shows off how SSRS and AX work together. It's via the application layer, and how the default .Net Business Connector configuration is used on the SSRS server role, to point SSRS to the right instance of AX.

The AX instance, has within it, the information that connects it to SSRS. This way when the menu item is fired, from the Rich Client, the AOS then uses the information contained within it's setup about Reporting Servers, to understand what SSRS instance to fire.

Since the default .Net Business Connector configuration for SSRS is pointing back to the same AX instance, when the SSRS instance is executing the reporting and firing the Data Extensions to get to the correct Query object and therefore data, then in this standard approach, we are hitting the production database for your instance of AX. Of course, this could be any instance, we are saying production because the goal is to offload the resource needs of processing reports, away from your production database.

Now that we have the established understanding of how AX and SSRS works, along with the understanding of how we can actually place a specific config file, that will point SSRS to a specific instance of our choice of AX, lets move forward with our new design.

To help understand this concept, I've created the following diagram in Visio. This illustrates our new, beta>, reporting architecture configuration for enabling the execution of reports, against a replicated reporting database instance of AX 2012.



What we see here, is our simple reporting setup, and we are taking the information we have from setting up multiple instances of SSRS on the same server role, and pointing SSRS, when processing it's data needs, to interact with a different AOS, that is pointing to a log shipping replicated database of AX 2012. So, with this we still have the ability for all the out-of-the-box reports to be fired, as well as executed in batch, server side, EP, etc. but the actual hit against the production database does not take place. Instead the data is accessed from the replicated, new reporting database.

The critical keys that enable this concept are, (1) having the production instance of your AOS and Reporting Server setup, pointing to your SSRS server role within AX. (2) Changing what AOS the SSRS server hits for processing data, by deploying a custom configuration file. (3) Log Shipping is enabled at on the AX Production database, so that the AX Reporting Database is kept up to date with live data.

Keep in mind, with this setup, that all users interact with your production AOS. They never interact with the reporting instance AOS.

Now there is still a concept we have not addressed, and one that is critical to the success of this design. That is code promotion, or change management. Why does this matter? Well simply put, it's because the model store that represents the application now lives as a part of the production database. This then gets replicated when any changes take place.

If we are following the guidelines given to us by Microsoft, for promotion of code to a production instance of AX, via Model Store Files, then we should be fine with this solution. The reason this is the case, is because in doing this, we perform a full compile and full CIL compile within the QA / Test environment. in doing this, and then correctly draining all users from production and shutting down all AOS(es), within our instance. We can then safely move the entire Model Store File, into our production database for AX. Further, we can do the same to our log shipping, reporting database of AX as well.

This means, that before we did this action, we would need to turn off log shipping, while we are importing the model store files into production, and also the reporting database, which is a replica of production. After this was completed, and before enabling users the right to get back connected to AX, enable log shipping again, and your solution is back on-line, with any new changes.

Further to this point, if as part of that new reports were brought in as part of the model store file move, you would deploy the reports from the AX production instance. You would not deploy them, via the reporting instance.

So, with the above information, we have a possible solution that could enable the use of Log Shipping, and some configuration tweaks, that would allow our Production Database to not be affected by Reporting resource needs. Instead the reports are executed against a replicated database. This, in theory then, would work for all reports, including batch scheduled, server side and EP. I do welcome any feedback on this concept from the community. If you feel I'm overlooking something, or have failed to bring to light some critical point, please share and I will update this post.

Well that's it for me for this year. Thanks everyone for reading my blog, and supporting me in this effort. The reason I write is because of you, so thanks and have a blessed and safe Happy New Year! May 2012 be the best year for each and every one of you! Till next year!

Important: This approach has not been widely tested. This is not a solution from Microsoft, but something I've been thinking about how to achieve myself. Use this at your own risk, without any warranty or guarantee's.


Follow Me @:
RSS Feed  LinkedIn  Twitter

"Visit the Dynamics AX Community Page today!"

Labels: , , , , , , ,

2 Comments:

Blogger Xavier said...

Hi,

if you take in consideration the licensing aspect, with this solution you needed licencing two Ax installations.

An Ax installation consists in one BBDD, multiple AOS, and the extras (SSAS, SSRS, Sharepoint, ...).

Best Regards

3:26 PM  
Anonymous Stu said...

Such a great article it was which th e there is still a concept we have not addressed, and one that is critical to the success of this design. That is code promotion, or change management.Thanks for sharing this article.

9:38 AM  

Post a Comment

<< Home


Copyright 2005-2011, J. Brandon George - All rights Reserved