ms sql business inteligence with my sql

Post on 10-May-2015

1.347 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Business Intelligence with mySQL Data

Praveen SrivatsaDirector, AsthraSoft ConsultingMicrosoft Regional Director, BangaloreSession Code:

AgendaConnecting to mySQL from .NETLeveraging SQL Reporting Services with mySQL DataHarvesting mySQL data into Analysis Services with SSIS

ObjectiveIn this session, we will talk about connecting to mySQL from the .NET world. We will then see how we can use SQL Reporting services with your data in mySQL and look at best practices in working with mySQLLastly we will look at how we can use your mySQL data with SSIS and get the data into SQL Analysis Servcies

Leveraging your investments

In the short term, migrating from mySQL is a lot of work. You can preserve your investments in mySQL and leverage features of SQL Server 2008 to get the most out of your current data. Lets take a look at how we canUse mySQL Data access from .NETBuild Reporting Solutions on mySQLTransfer data for reporting and analysis using SSIS mySQL data

ODBC SolutionRequirements

Access Multiple DBMSs using same source code without recompiling and relinkingSimultaneously

Which DBMS features should ODBC expose ?Common to all DBMSsAny feature that is available in any DBMS

SolvesIt is a Call Level Interface(CLI)Defines Standard SQL GrammarDriver Manager -> simultaneous access to multiple DBMSs Feature Set

ODBC Architecture

Application

Driver Manager

Driver Driver Driver Driver

Data Source

Data Source

Data Source

Data Source

ODBC API

ODBC API

Connector/ODBC with .NET• ODBC.NET Provider

– Add-in component to the Microsoft.NET Framework – Directly accesses native ODBC drivers

• Setup– Microsoft .NET Framework SDK– MDAC 2.6 or later (2.7 is recommended)– ODBC.NET Provider (Microsoft.Data.Odbc name space)

• Installed to “C:\Program Files\Microsoft.NET\Odbc.Net”

ODBC.NET Architecture

ODBC.NET Application

ODBC.NET Provider

Driver Driver Connector/ODBC

Data Source

Data Source MySQL

ODBC.NET API

ODBC API

MySQL C API

Developing ODBC.NET Applications

OdbcCommand OdbcInfoMessageEventArgs

OdbcCommandBuilder OdbcParameter

OdbcConnection OdbcParameterCollection

OdbcDataAdapter OdbcPermission

OdbcDataReader OdbcPermissionAttribute

OdbcError OdbcRowUpdatedEventArgs

OdbcErrrorCollection OdbcRowUpdatingEventArgs

OdbcException OdbcTransaction

Main classes

Enumeration Type OdbcType

Ref: ODBC.NET Data Provider Reference Document

Developing ODBC.NET Applications (cont ..)

• First, import the ODBC.NET namespaceImports Microsoft.Data.Odbc ( VB.net )using Microsoft.Data.Odbc (C# )

• Connect to MySQL server by loading Connector/ODBCString myconStr= “DSN=myodbc3-test;…”OdbcConnection myOdbcCon= new OdbcConnection(myConStr)myOdbcCon.open()

• Complete article on ‘Exploring MySQL in the .NET environment” can be found from here:http://www.mysql.com/articles/dotnet

mySQL Driver Programming Hints

• Direct linking with the driver will drastically increase the performance by a factor of ~40-50%

• Do not use the debug version of the driver DLL

• Turn off all ODBC and Connector/ODBC loggers

• Avoid using ODBC API calls that works on prepared results instead use it on execute call

Using Reporting ServicesHarvesting your mySQL data

SQL Server Reporting Services can report on data from any data source

For connecting to mySQL, involves a lot of syntax changesReports cannot be used across mySQL and SQL server easilyDriver inconsistency leads to bad reporting experience

Using Linked ServerBridging your data from mySQL to SQL Server

SQL Server allows the definitions of Linked Servers

Uses Data providers to connect to mySQLShows the data as a SQL Server data to the outside worldAllows for SQL syntax, but continues limitations of the driversEnables for easy migration from mySQL to SQL Server later.

Using RS with Linked ServerHarvesting your mySQL data

Leverage Linked Servers to connect to mySQLMakes connections to mySQL easierCan cache and operate on the data inside of SQL ServerMakes migration to SQL Server easier with least code changeImpact of performance less than 5%

DO NOT USE THE DRIVER DIRECTLY!

Using Analysis ServicesIntegrating and Analysing mySQL data

SSAS can connect to mySQL and use it as a store for OLTP reporting

Very unstableMove to OLAP not smoothPerformance issues with the mySQL Driver

Using Analysis ServicesIntegrating and Analysing mySQL data

SSIS can connect to mySQL to look up information

It can translate the data to OLTP in SQL or OLAP directlyExcellent performanceRich pipeline transformations

mySQL Bi Architecture

ASP.NETmySQL

DB

ADO.NET ProviderReporting Services

SSIS

SQL ServerDB

mySQL Bi Architecture

ASP.NETmySQL

DB

Reporting Services

SSIS

SQL ServerDB Linked Server

SummaryHarvesting your mySQL data for BI

The mySQL ODBC.NET Drivers provide for a way to link to your mySQL data directly from .NETReporting Services can use the .NET Drivers directly but not all features of RS can be leveraged with thisLinked servers provide an excellent bridge and migration path from mySQL to SQL ServerSSIS can connect to and use mySQL data for analysis services

धन्यवा�दઆભા�ર ধন্য�বা�দ

ਧੰ�ਨਵਾ�ਦ

ଧନ୍ୟ�ବା�ଦ

நன்றி�

ధన్య�వాదాలు� ಧನ್ಯ�ವಾ�ದಗಳು

നി�ങ്ങള്‍‌ക്ക്� നിന്ദി�

question & answer

Track Resources

ASP.NET with mySQL (http://www.codeproject.com/KB/webforms/MySQLsuite.aspx)

mySQL Ado.NET Provider (http://dev.mysql.com/downloads/connector/net/6.0.html)

mySQL ODBC Driver (http://dev.mysql.com/downloads/connector/odbc/5.1.html)

© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS,

IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

top related