Showing posts with label Microsoft SQL 2008 R2. Show all posts
Showing posts with label Microsoft SQL 2008 R2. Show all posts

Friday, May 25, 2012

AX 2012 Retail Event Trace Parser - Missing?



Hi there,

I hope everybody had a great week and that you are ready for a well-deserved long and restful weekend.

As you already know, I will be working on a series of articles related to the Microsoft Dynamics AX 2012 POS application. Last week I wrote an article called
AX 2012 POS Development - Application Triggers. Please check it out if you haven’t already done so.

In the course of this week I have been gathering a lot of information about the AX 2012 POS application, and the more I work with it, the more sense it makes to me. There are many different layers to this application, but this will be covered in future articles.

Anyway, this week I was working on a new instance of the AX 2012 POS application. To run it from Visual Studio, I followed the steps outlined in my last article AX 2012 POS Development - Application Triggers.

When all the setup steps were completed, I started the solution, keyed my user name and password and all of the sudden I got the following error:



This was odd as I went back to the demo instance I have and after following the same steps, I did not get this error. Luckily, there is LOG table called RETAILLOG in the AX 2012 POS application that can tell you what’s going on, and for my surprise, I was missing the Microsoft.Dynamics.Retail.EventTraceParser.dll as depicted in the following picture (from a working application).




The solution was easy; I just placed the missing dll to my AX 2012 POS application root folder. So, the Event Trace Parser enables rapid analysis of traces to find the longest running code, longest running SQL query, highest call count and other metrics useful in debugging a performance problem.

The Microsoft.Dynamics.Retail.EventTraceParser.dll is installed when installing AX 2012 for Retail and you can find it in your AX 2012 client folder.

The Walk through major features of Microsoft Dynamics AX 2012 article will give you a good introduction to its basic concepts.

That’s it for now folks. I hope you have a wonderful weekend. And stay tune for more to come on AX 2012 POS development. Next week I will post about how to use the AX 2012 POS System.Settings dynamics library and its in-memory functions.

Also, the following week I will write about Blank Operations by going through a really cool simple project.
Take Care!



Monday, December 19, 2011

OLTP vs OLAP - Definition and Differences

We can divide IT systems into transactional (OLTP) and analytical (OLAP). In general we can assume that OLTP systems provide source data to data warehouses, whereas OLAP systems help to analyze it.




In Microsoft Dynamics AX 2012 database we can find an OLTP database, which stores the AX data and the AX Model store, and the SSAS database used for SSRS reporting. At the same time, the Microsoft SQL Server Analysis Services uses an on-line analytical processing (OLAP) engine that helps users analyze business data and identify trends.

In this post I would like to describe what OLTP and OLAP is, differences, and provide a day-to-day example about the two.

OLTP (On-line Transaction Processing) deals with operational data, which is data involved in the operation of a particular system and it is characterized by a large number of short on-line transactions (INSERT, UPDATE, and DELETE).

The main emphasis for OLTP systems is put on very fast query processing, maintaining data integrity in multi-access environments and an effectiveness measured by number of transactions per second.

In addition, in an OLTP system, the data is frequently updated and queried and to prevent data redundancy and to prevent update anomalies the database tables are normalized, which makes the write operation in the database tables more efficient.

Example: In a banking System, you withdraw amount through an ATM. Then account Number, ATM PIN Number, Amount you are withdrawing and Balance amount in account are operational data elements.

An OLAP (On-line Analytical Processing) deal with Historical Data or Archival Data, and it is characterized by relatively low volume of transactions.  In addition, the Queries needed for these systems are often very complex and involve aggregations as for OLAP systems the response time is an effectiveness measure.

Example: If we collect last 10 years data about flight reservation, the data can give us much meaningful information such as the trends in reservation. This may give useful information like peak time of travel, and what kinds of people are traveling in the various classes available (Economy/Business).

The following table summarizes the major differences between OLTP and OLAP system design.


OLTP System
OLAP System
Source of data
Operational data; OLTPs are the original source of the data.
Consolidation data; OLAP data comes from the various OLTP Databases
Purpose of data
To control and run fundamental business tasks
To help with planning, problem solving, and decision support
What the data
Reveals a snapshot of ongoing business processes
Multi-dimensional views of various kinds of business activities
Inserts and Updates
Short and fast inserts and updates initiated by end users
Periodic long-running batch jobs refresh the data
Queries
Relatively standardized and simple queries Returning relatively few records
Often complex queries involving aggregations
Processing Speed
Typically very fast
Depends on the amount of data involved; batch data refreshes and complex queries may take many hours; query speed can be improved by creating indexes
Space Requirements
Can be relatively small if historical data is archived
Larger due to the existence of aggregation structures and history data; requires more indexes than OLTP
Database Design
Highly normalized with many tables
Typically de-normalized with fewer tables; use of star and/or snowflake schemas
Backup and Recovery
Backup religiously; operational data is critical to run the business, data loss is likely to entail significant monetary loss and legal liability
Instead of regular backups, some environments may consider simply reloading the OLTP data as a recovery method

Saturday, December 17, 2011

Changes in Reporting tools and Enterprise Portal in AX 2012

Hi there!
Well, I would assume that we are all excited about the new changes around the Reporting and Enterprise Portal tools in Microsoft Dynamics AX 2012, right?

Well, we should be, as Microsoft Dynamics AX 2012 has truly eliminated the need of having to install two different pieces of software to support reporting and EP development.  Currently, in AX 2009 the Reporting and EP tools are required components that we “have” to install in order to integrate AX 2009 and Visual Studio 2008.

 In AX 2012, however, standard Microsoft Visual Studio 2012 tolls can be used to achieve this Reporting and EP Development.  

In AX 2012 most of the basic development and some customization tasks (like creating new pages or adding Web parts to existing pages are all performed directly in SharePoint) related to the Enterprise Portal can be performed using SharePoint Foundation 2010 or SharePoint Server 2010. In addition, AX 2012 allows us to focus on the development of content Web parts in the Enterprise Portal by only using the Enterprise Portal framework and Visual Studio.  In fact, the most sophisticated functionality of Enterprise Portal is created by using Visual Studio.

Personally, I believe, the fact that EP proxies were taken out of the equation is a great step, as this created endless issues when updating EP proxies between AX 2009 and Visual Studio 2008. In fact, it was a suitable nightmare!

Reporting is not that bad in AX 2009, but the fact that we needed to install a piece of software to make it work really bothered me. Instead, AX 2012 provides a model-based approach to develop any type of report. It also provides templates and modeling tools that are part of Visual Studio.  Further, the reporting features provided by AX 2012 are really well integrated with SQL Server Reporting Services, which includes a set of tools for us to define reports in the Visual Studio.

I believe in simplicity, and the less we need to worry about installing several pieces of software to only make “one thing” work, the better.


Take care!

Friday, December 9, 2011

Intelligent Data Management Framework (IDMF)

Hi there,
There has been a lot of talk about the Intelligent Data Management Framework (IDMF) in AX 2012, and for a good reason!  This is because the Intelligent Data Management Framework allows the system administrators optimize the performance of Microsoft Dynamics AX installations, which is something that we all should be concerned about when implementing AX 2012.

Why? Well, first of all, the system requirements for AX 2012 are going to be much more than the ones for AX 2009.

This has been proved by a recent installation in Bank of America where they thought the hardware required was much more of what is needed for AX 2009. For this reason, the IDMF assesses the health of the Microsoft Dynamics AX application, analyzes current usage patterns, and helps reduce database size.  In addition, the IDMF lets you analyze the database and maintain an optimal database size by providing the purge and archive functions.

A Microsoft articles says “the purge function removes or deletes data from a set of related entities, or tables, from the production database. The archive function moves data from all related tables from the production database to a standby database called the archive database. Users can use the archive database for reporting purposes but cannot update it”

Further, both the purge and archive operations depend on a hierarchical relationship tree of related tables based on the Microsoft Dynamics AX metadata, and to create a hierarchical relationship, you select a parent table and discover all related tables based on the AX metadata.  
Moreover, the parent table in the relationship is put at the root level of the tree and the discovery process creates a nested relationship tree from a parent entity to a child entity. This is done until there are no relationships left at the lowest level.

Also, a purge object is used to remove selected records from all tables in the relationship tree from the AX database. Similarly, an archive object is used to move selected records from all tables in the relationship tree from the AX database to the archive database.

After creating a purge object or an archive object, you can apply business rules and selection criteria to entities and transactions to determine which records are deleted or moved from the production database.

System architecture

The IDMF was created using the Microsoft .NET development environment and provides a single document interface (SDI). In addition, the IDMF uses a database, called the management database, for the storage and retrieval of data, and communicates with Application Object Server (AOS) through COM Business Connector or .NET Business Connector.

Now, just be aware that during installation, the IDMF installs a Windows service called the Intelligent Data Management Framework for Microsoft Dynamics AX service. This service is used to run scheduled jobs and is referred to as the scheduler service for the Data Management Framework.

The following diagram provides a high-level overview of the Data Management Framework system architecture.




Deployment scenarios


Single-server deployment



Multi-server deployment



Distributed deployment


Take care!

Wednesday, November 16, 2011

Inside Microsoft Dynamics AX 2012 Performance

Hi there!
I found a very interesting video on AX 2012 performance. It is amazing and really exciting to be part of this release as there have been many improvements to create a better, more reliable and faster product. The following are the key points in the video:
1-   Ax 2012 focuses its efforts on the AOS, this is, the AOS can scale up and scale out.  For example, as computer manufactures create bigger boxes (strong processing power), AX 2012 application server scales out to take full advantage of this new advances.
2-    Ax 2012 takes the unmanaged X++ and run it in .NET. Therefore X++ is now a managed language which means is faster (way faster than before!)
3-    There has been a lot of work done towards space optimization. For instance, in retail situations the number of transactions can quickly grow, and this data needs to be stored efficiently without increasing storage costs.
4-    Transactions are much faster thanks to the improvements in X++ compatibility with .NET. For example, in AX 2009 you could run 100 lines of code in X amount of time (X being a number of seconds). In AX 2012 you can run 1,000 lines of code in the amount of time (X) that AX 2009 does.  This helps achieving fast deployments and customer usability of the product.
5-    The goal of AX 2012 is increase transaction speed and customer satisfaction by implementing the solution on pretty much the same hardware an end user had before.
Check it out.

Take care!

Wednesday, November 2, 2011

Indexes In Microsoft Dynamics AX

Today I would like to have a discussion about Indexes in AX. In my opinion, I think it is extremely important to create an architecture that will support the fast retrieving of records. In addition, there is no way we can provide a good service if we don’t provide a nice and easy to follow guide on indexes.  

So, basically indexes in databases are used to locate records and they are stored separately in the database. They contain a key that can be quickly located in the index, and this key will have a reference to a record.

For example, the let’s think on the SalesIdx index in the Sales Table. This table field index contains the SalesId of a Sales Order. Now, because the Sales order is unique and sequenced, an index will be used to quickly lookup the sales orders records through the reference.

Type of Indexes

Unique

A unique index is created based on a column; Microsoft Dynamics AX assures that no duplicate key values can occur in that same column. Also, when updating a column that contains a unique index will cause an error.


Non-Unique

Non-unique indexes are created for performance reasons. In other words, they give a fast way of retrieving data. For example, (and here we can think on the example above about the SalesIdx) instead of doing a full-table search of all the records in a table, and non-unique index will help us narrow down this search to a reference.

In general, indexes use system space and must be updated every time system data is created, edited, or deleted. I have seen indexes slowing down the updating process. However in most cases the overall performance improvement when selecting records far outweighs the performance loss when updating.

Microsoft recommends that when creating an index to give it a name that reflects the names of the fields on a table plus the suffix Idx. (i.e. SalesIdx)

Creating Indexes

Creating indexes is not very difficult at all. You just want to make sure that the fields you want to create the index on exist in the table (I guess this is obvious, but you’ll be surprise with some of the question I have been asked over the years). Anyway, the indexes can be unique or non-unique, and are based on a single column or multiple columns that exist within the table.



  1. Locate a table in the AOT (This has to be a table in your Dev environment or some virtual machine AX)
  2. Right-click the Indexes node in the table and select New Index. A new index Index1 is created.
  3. Rename the index to the field name of the table/field you have chosen
  4. Drag the field you have chosen to the index created in the step above node.
  5. In the properties sheet for the created index node, set the property AllowDuplicates to No.

Just to make it more visually clear, please take a look at the following picture:


Take Care!

AX 2012 Extended Architecture

AX 2012 Extended Architecture
Besides the common (most simple) AX 2012 architecture, there are several other components of the Microsoft technology stack are used in a typical deployment.
The following is a list of the one that are most commonly deploy with implementations:
  1. Reports are delivered by SQL Reporting Services (SSRS). SSRS is a component included in SQL Server.
  2. Business Intelligence (BI) components such as Key Performance Indicators (KPI's) use Online Analytical Processing (OLAP) cubes which are delivered by SQL Analysis Services (SSAS). SSAS is a component included in SQL Server as well.
  3. The Enterprise Portal and Role Pages are hosted in SharePoint. There are two versions of SharePoint that can be used. Window SharePoint Foundation 2010 is a free download. Microsoft SharePoint Server 2010 is a product that can be purchased to provide extended collaboration and content management tools.
  4. Integration to other applications or to third party organizations might require integration solutions such as web services.
The following picture describes a high level extended architecture:



Take Care!

[Some of the iinformation in this article has been taken from a Microsoft Training Manuals]

Thursday, October 27, 2011

Configuring Kerberos Authentication with Enterprise Portal in AX 2009

Hi,

I remember the first time I had to setup the AX 2009 EP. Oh man, it was painful at the time and I wished I could have had the document I'm about to share/

In a way I feel lucky I had to do it and figure it out on my own as the document really makes sense, and I see now what where the steps I did not followed correctly.

Here is the link!

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=16080

Wednesday, September 14, 2011

AX 2009 Data Import / Export

The following post is about shows how to:
1-   Export data from a company in AX using a definition Group
2-   Creating a new company that will take the new data
3-   Importing the data exported from step 1 into the new company created in step 2 using a definition group as well.
In a current project, I needed to freeze the Test1 environment due to some focus testing of a certain functionality we implemented. At the same time, we needed to allow the uses to keep testing other customizations without affecting Test1.
In addition, to make the user’s lives easier, we decided to have the same data that they were using in Test1 in our Test2 instance. So, we exported the data from our Test1 environment, and then imported it to a new company in our Test2 environment.
The following steps will show this process step by step:

1-   First select the company you want to export the data from as the AX current company by clicking in company name in the right lower corner of your AX interface.

2-   This would open the “Select Company” form as shown;
3-   Select  Administration (module)
4-   Under periodic->Data exports /import ->Click Export to
5-   The “Export options” form will appear
6-   Select a definition group. You can either create a new definition group to include what you need, or just choose ALL to get all the tables.

NOTE: In some cases, the already defined “ALL” definition group will not have all the tables, so in this case you would have to create a new definition group. In my case I created a new one name “ALL_NewDef” that included the latest tables.

7-   Enter a file name and select where to save it
8-   Click OK. At this point the company date export process should be done (after processing of course), and the files (.dat & .def) should have be saved on your computer.

Now, let’s create a new company

9-   Make sure that the selected company empty and click area node Administration
10- Click company Accounts under Common forms
11-   Press (Ctrl + N) in order to Create new company
12-   Make sure you select the newly created company as the current company

Import company file already exported in the prior steps and click Administration


13- Under periodic->Data exports /import ->Click import; The “Import options” screen will appear
14- Select the “import definition group” drop down list and choose ALL (otherwise create your own)
15-   Select the .dat file (exported before) and Click Ok to start the process

The import process may take some time according to the size of transactions in the original (exported) company.
In addition, you can choose to delete all the transaction data before the import when you are importing a .dat file o an existing company account to update the data.