Skip Headers
Oracle® Fusion Middleware Connectivity and Knowledge Modules Guide for Oracle Data Integrator
11g Release 1 (11.1.1)

Part Number E12644-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

6 Microsoft SQL Server

This chapter describes how to work with Microsoft SQL Server in Oracle Data Integrator.

This chapter includes the following sections:

6.1 Introduction

Oracle Data Integrator (ODI) seamlessly integrates data in Microsoft SQL Server. Oracle Data Integrator features are designed to work best with Microsoft SQL Server, including reverse-engineering, changed data capture, data integrity check, and integration interfaces.

6.1.1 Concepts

The Microsoft SQL Server concepts map the Oracle Data Integrator concepts as follows: A Microsoft SQL Server server corresponds to a data server in Oracle Data Integrator. Within this server, a database/owner pair maps to an Oracle Data Integrator physical schema. A set of related objects within one database corresponds to a data model, and each table, view or synonym will appear as an ODI datastore, with its attributes, columns and constraints.

Oracle Data Integrator uses Java Database Connectivity (JDBC) to connect to Microsoft SQL Server.

6.1.2 Knowledge Modules

Oracle Data Integrator provides the Knowledge Modules (KM) listed in Table 6-1 for handling Microsoft SQL Server data. In addition to these specific Microsoft SQL Server Knowledge Modules, it is also possible to use the generic SQL KMs with Microsoft SQL Server. See Chapter 4, "Generic SQL" for more information.

Table 6-1 Microsoft SQL Server Knowledge Modules

Knowledge Module Description

IKM MSSQL Incremental Update

Integrates data in a Microsoft SQL Server target table in incremental update mode.

IKM MSSQL Slowly Changing Dimension

Integrates data in a Microsoft SQL Server target table used as a Type II Slowly Changing Dimension in your Data Warehouse.

JKM MSSQL Consistent

Creates the journalizing infrastructure for consistent journalizing on Microsoft SQL Server tables using triggers.

JKM MSSQL Simple

Creates the journalizing infrastructure for simple journalizing on Microsoft SQL Server tables using triggers.

LKM File to MSSQL (BULK)

Loads data from a File to a Microsoft SQL Server staging area database using the BULK INSERT SQL command.

LKM MSSQL to MSSQL (BCP)

Loads data from a Microsoft SQL Server source database to a Microsoft SQL Server staging area database using the native BCP out/BCP in commands.

LKM MSSQL to MSSQL (LINKED SERVERS)

Loads data from a Microsoft SQL Server source database to a Microsoft SQL Server staging area database using the native linked servers feature.

LKM MSSQL to ORACLE (BCP SQLLDR)

Loads data from a Microsoft SQL Server to an Oracle database (staging area) using the BCP and SQLLDR utilities.

LKM SQL to MSSQL (BULK)

Loads data from any ANSI SQL-92 source database to a Microsoft SQL Server staging area database using the native BULK INSERT SQL command.

LKM SQL to MSSQL

Loads data from any ANSI SQL-92 source database to a Microsoft SQL Server staging area. This LKM is similar to the standard LKM SQL to SQL described in Chapter 4, "Generic SQL" except that you can specify some additional specific Microsoft SQL Server parameters.

RKM MSSQL

Retrieves metadata for Microsoft SQL Server objects: tables, views and synonyms, as well as columns and constraints.


6.2 Installation and Configuration

Make sure you have read the information in this section before you start working with the Microsoft SQL Server technology:

6.2.1 System Requirements and Certifications

Before performing any installation you should read the system requirements and certification documentation to ensure that your environment meets the minimum installation requirements for the products you are installing.

The list of supported platforms and versions is available on Oracle Technical Network (OTN):

http://www.oracle.com/technology/products/oracle-data-integrator/index.html.

6.2.2 Technology Specific Requirements

Some of the Knowledge Modules for Microsoft SQL Server use specific features of this database. The following restrictions apply when using these Knowledge Modules. See the Microsoft SQL Server documentation for additional information on these topics.

6.2.2.1 Using the BULK INSERT Command

This section describes the requirements that must be met before using the BULK INSERT command with Microsoft SQL Server:

  • The file to be loaded by the BULK INSERT command needs to be accessible from the Microsoft SQL Server instance machine. It could be located on the file system of the server or reachable from a UNC (Unique Naming Convention) path.

  • UNC file paths are supported but not recommended as they may decrease performance.

  • For performance reasons, it is often recommended to install Oracle Data Integrator Agent on the target server machine.

6.2.2.2 Using the BCP Command

This section describes the requirements that must be met before using the BCP command with Microsoft SQL Server:

  • The BCP utility as well as the Microsoft SQL Server Client Network Utility must be installed on the machine running the Oracle Data Integrator Agent.

  • The server names defined in the Topology must match the Microsoft SQL Server Client connect strings used for these servers.

  • White spaces in server names defined in the Client Utility are not supported.

  • UNC file paths are supported but not recommended as they may decrease performance.

  • The target staging area database must have the option select into/bulk copy.

  • Execution can remain pending if the file generated by the BCP program is empty.

  • For performance reasons, it is often recommended to install Oracle Data Integrator Agent on the target server machine.

6.2.2.3 Using Linked Servers

This section describes the requirements that must be met before using linked servers with Microsoft SQL Server:

  • The user defined in the Topology to connect to the Microsoft SQL Server instances must have the following privileges:

    • The user must be the db_owner of the staging area databases

    • The user must have db_ddladmin role

    • For automatic link server creation, the user must have sysdamin privileges

  • The MSDTC Service must be started on both SQL Server instances (source and target). The following hints may help you configure this service:

    • The Log On As account for the MSDTC Service is a Network Service account (and not the 'LocalSystem' account).

    • MSDTC should be enabled for network transactions.

    • Windows Firewall should be configured to allow the MSDTC service on the network. By default, the Windows Firewall blocks the MSDTC program.

    • The Microsoft SQL Server must be started after MSDTC has completed its startup.

    See the following links for more information about configuring the MSDTC Service:

6.2.3 Connectivity Requirements

This section lists the requirements for connecting to a Microsoft SQL Server database.

JDBC Driver

Oracle Data Integrator is installed with a default Microsoft SQL Server Datadirect Driver. This drivers directly uses the TCP/IP network layer and requires no other installed component or configuration. You can alternatively use the drivers provided by Microsoft for SQL Server.

6.3 Setting up the Topology

Setting up the Topology consists of:

  1. Creating a Microsoft SQL Server Data Server

  2. Creating a Microsoft SQL Server Physical Schema

6.3.1 Creating a Microsoft SQL Server Data Server

A Microsoft SQL Server data server corresponds to a Microsoft SQL Server server connected with a specific user account. This user will have access to several databases in this server, corresponding to the physical schemas in Oracle Data Integrator created under the data server.

6.3.1.1 Creation of the Data Server

Create a data server for the Microsoft SQL Server technology using the standard procedure, as described in "Creating a Data Server" of the Oracle Fusion Middleware Developer's Guide for Oracle Data Integrator. This section details only the fields required or specific for defining a Microsoft SQL data server:

  1. In the Definition tab:

    • Name: Name of the data server that will appear in Oracle Data Integrator

    • Server: Physical name of the data server

    • User/Password: Microsoft SQLServer user with its password

  2. In the JDBC tab:

    • JDBC Driver: weblogic.jdbc.sqlserver.SQLServerDriver

    • JDBC URL: jdbc:weblogic:sqlserver://hostname:port[;property=value[;...]]

6.3.2 Creating a Microsoft SQL Server Physical Schema

Create a Microsoft SQL Server physical schema using the standard procedure, as described in "Creating a Physical Schema" of the Oracle Fusion Middleware Developer's Guide for Oracle Data Integrator.

The work schema and data schema in this physical schema correspond each to a database/owner pair. The work schema should point to a temporary database and the data schema should point to the database hosting the data to integrate.

Create for this physical schema a logical schema using the standard procedure, as described in "Creating a Logical Schema" of the Oracle Fusion Middleware Developer's Guide for Oracle Data Integrator and associate it in a given context.

6.4 Setting Up an Integration Project

Setting up a project using the Microsoft SQL Server database follows the standard procedure. See "Creating an Integration Project" of the Oracle Fusion Middleware Developer's Guide for Oracle Data Integrator.

It is recommended to import the following knowledge modules into your project for getting started with Microsoft SQL Server:

6.5 Creating and Reverse-Engineering a Microsoft SQL Server Model

This section contains the following topics:

6.5.1 Create a Microsoft SQL Server Model

Create a Microsoft SQL Server Model using the standard procedure, as described in "Creating a Model" of the Oracle Fusion Middleware Developer's Guide for Oracle Data Integrator.

6.5.2 Reverse-engineer a Microsoft SQL Server Model

Microsoft SQL Server supports both Standard reverse-engineering - which uses only the abilities of the JDBC driver - and Customized reverse-engineering, which uses a RKM to retrieve the metadata.

In most of the cases, consider using the standard JDBC reverse engineering for starting. Standard reverse-engineering with Microsoft SQL Server retrieves tables, views, and columns.

Consider switching to customized reverse-engineering for retrieving more metadata. Microsoft SQL Server customized reverse-engineering retrieves the tables, views, and synonyms. The RKM MSSQL also reverse-engineers columns that have a user defined data type and translates the user defined data type to the native data type.

Standard Reverse-Engineering

To perform a Standard Reverse-Engineering on Microsoft SQL Server use the usual procedure, as described in "Reverse-engineering a Model" of the Oracle Fusion Middleware Developer's Guide for Oracle Data Integrator.

Customized Reverse-Engineering

To perform a Customized Reverse-Engineering on Microsoft SQL Server with a RKM, use the usual procedure, as described in "Reverse-engineering a Model" of the Oracle Fusion Middleware Developer's Guide for Oracle Data Integrator. This section details only the fields specific to the Microsoft SQL Server technology:

  1. In the Reverse tab of the Microsoft SQL Server Model, select the KM: RKM MSSQL.<project name>.

  2. In the COMPATIBLE option, enter the Microsoft SQL Server version. This option decides whether to enable reverse synonyms. Note that only Microsoft SQLServer version 2005 and above support synonyms.

Note the following information when using this RKM:

  • The connection user must have SELECT privileges on any INFORMATION_SCHEMA views.

  • Only native data type will be saved for the column with user defined data type in the repository and model.

  • User defined data types implemented through a class of assembly in the Microsoft .NET Framework common language runtime (CLR) will not be reversed.

6.6 Setting up Changed Data Capture

The ODI Microsoft SQL Server Knowledge Modules support the Changed Data Capture feature. See Chapter "Working with Changed Data Capture" of the Oracle Fusion Middleware Developer's Guide for Oracle Data Integrator for details on how to set up journalizing and how to use captured changes.

Microsoft SQL Server Journalizing Knowledge Modules support Simple Journalizing and Consistent Set Journalizing. The Microsoft SQL Server JKMs use triggers to capture data changes on the source tables.

Oracle Data Integrator provides the Knowledge Modules listed in Table 6-2 for journalizing Microsoft SQL Server tables.

Table 6-2 Microsoft SQL Server Journalizing Knowledge Modules

KM Notes

JKM MSSQL Consistent

Creates the journalizing infrastructure for consistent journalizing on Microsoft SQL Server tables using triggers.

JKM MSSQL Simple

Creates the journalizing infrastructure for simple journalizing on Microsoft SQL Server tables using triggers.


Log-based changed data capture is possible with Microsoft SQL Server using the Oracle Changed Data Capture Adapters. See Chapter 25, "Oracle Changed Data Capture Adapters" for more information.

6.7 Setting up Data Quality

Oracle Data Integrator provides the generic CKM SQL for checking data integrity against constraints defined on a Microsoft SQL Server table. See "Set up Flow Control and Post-Integration Control" in the Oracle Fusion Middleware Developer's Guide for Oracle Data Integrator for details.

See Chapter 4, "Generic SQL" for more information.

6.8 Designing an Interface

You can use Microsoft SQL Server as a source, staging area or a target of an integration interface.

The KM choice for an interface or a check determines the abilities and performance of this interface or check. The recommendations in this section help in the selection of the KM for different situations concerning a Microsoft SQL Server data server.

6.8.1 Loading Data from and to Microsoft SQL Server

Microsoft SQL Server can be used as a source, target or staging area of an interface. The LKM choice in the Interface Flow tab to load data between Microsoft SQL Server and another type of data server is essential for the performance of an interface.

6.8.1.1 Loading Data from Microsoft SQL Server

Oracle Data Integrator provides Knowledge Modules that implement optimized methods for loading data from Microsoft SQL Server to a target or staging area database. These optimized Microsoft SQL Server KMs are listed in Table 6-3.

In addition to these KMs, you can also use the Generic SQL KMs or the KMs specific to the other technology involved to load data from Microsoft SQL Server to a target or staging area database.

Table 6-3 KMs for loading data from Microsoft SQL Server

Source or Staging Area Technology KM Notes

Microsoft SQL Server

LKM MSSQL to MSSQL (BCP)

Loads data from a Microsoft SQL Server source database to a Microsoft SQL Server staging area database using the native BCP out/BCP in commands.

Microsoft SQL Server

LKM MSSQL to MSSQL (LINKED SERVERS)

Loads data from a Microsoft SQL Server source database to a Microsoft SQL Server staging area database using the native linked servers feature.

Oracle

LKM MSSQL to ORACLE (BCP SQLLDR)

Loads data from a Microsoft SQL Server to an Oracle database (staging area) using the BCP and SQLLDR utilities.


6.8.1.2 Loading Data to Microsoft SQL Server

Oracle Data Integrator provides Knowledge Modules that implement optimized methods for loading data from a source or staging area into a Microsoft SQL Server database. These optimized Microsoft SQL Server KMs are listed in Table 6-4.

In addition to these KMs, you can also use the Generic SQL KMs or the KMs specific to the other technology involved.

Table 6-4 KMs for loading data to Microsoft SQL Server

Source or Staging Area Technology KM Notes

File

LKM File to MSSQL (BULK)

Loads data from a File to a Microsoft SQL Server staging area database using the BULK INSERT SQL command.

Microsoft SQL Server

LKM MSSQL to MSSQL (BCP)

Loads data from a Microsoft SQL Server source database to a Microsoft SQL Server staging area database using the native BCP out/BCP in commands.

Microsoft SQL Server

LKM MSSQL to MSSQL (LINKED SERVERS)

Loads data from a Microsoft SQL Server source database to a Microsoft SQL Server staging area database using the native linked servers feature.

SQL

LKM SQL to MSSQL (BULK)

Loads data from any ANSI SQL-92 source database to a Microsoft SQL Server staging area database using the native BULK INSERT SQL command.

SQL

LKM SQL to MSSQL

Loads data from any ANSI SQL-92 source database to a Microsoft SQL Server staging area.


6.8.2 Integrating Data in Microsoft SQL Server

Oracle Data Integrator provides Knowledge Modules that implement optimized data integration strategies for Microsoft SQL Server. These optimized Microsoft SQL Server KMs are listed in Table 6-5. I

In addition to these KMs, you can also use the Generic SQL KMs.

The IKM choice in the Interface Flow tab determines the performances and possibilities for integrating.

Table 6-5 KMs for integrating data to Microsoft SQL Server

KM Notes

IKM MSSQL Incremental Update

Integrates data in a Microsoft SQL Server target table in incremental update mode.

IKM MSSQL Slowly Changing Dimension

Integrates data in a Microsoft SQL Server target table used as a Type II Slowly Changing Dimension in your Data Warehouse


Using Slowly Changing Dimensions

For using slowly changing dimensions, make sure to set the Slowly Changing Dimension value for each column of the target datastore. This value is used by the IKM MSSQL Slowly Changing Dimension to identify the Surrogate Key, Natural Key, Overwrite or Insert Column, Current Record Flag and Start/End Timestamps columns.