Showing posts with label Microsoft OLE DB Provider. Show all posts
Showing posts with label Microsoft OLE DB Provider. Show all posts

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

Wednesday, November 2, 2011

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]

Friday, March 18, 2011

SQL Injection: Defense in Depth -

SQL Injection happens when a developer accepts user input that is directly placed into a SQL Statement and doesn't properly filter out dangerous characters. This can allow an attacker to not only steal data from your database, but also modify and delete it.

Certain SQL Servers such as Microsoft SQL Server contain Stored and Extended Procedures (database server functions). If an attacker can obtain access to these Procedures it may be possible to compromise the entire machine.

In addition, attackers commonly insert single qoutes into a URL's query string, or into a forms input field to test for SQL Injection. If an attacker receives an error message like the one below there is a good chance that the application is vulnerable to SQL Injection.


Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the
keyword 'or'



The following article talks about how to prevent SQL Injections. I thought it was pretty comprehensive and has good examples on how to achieve a good strategy to minimize these attacks.

http://www.simple-talk.com/sql/learn-sql-server/sql-injection-defense-in-depth/

You can also learn more about it here http://msdn.microsoft.com/en-us/library/ms161953.aspx

Also, there are a few videos that walk you through some of these issues here http://www.google.com/#q=sql+injections+tutorial&hl=en&sa=X&prmd=ivns&source=univ&tbs=vid:1&tbo=u&ei=DGCDTceeN6WY0QG8r7XkCA&ved=0CEcQqwQ&bav=on.2,or.r_gc.r_pw.&fp=3d8c1b5379a812ef