Session: A10 Let’s Take a Walk With WebSphere Federated Server

Tom Glaser AT&T

May 21, 2008 • 01:30 P.M. – 02:30 P.M. Platform: Cross Platform

Abstract: Ever had a need to join data sources and you had to do this across platforms? I bet you thought it would be difficult, so that's as far as the project got. We'll tackle the issue of joining data sources across DBMSs and flat files by using WebSphere Federated Server. That's right, we'll join DB2, Oracle, Teradata, SQL Server and flat files within the same query. I'll show you how easy it is to query a flat file on z/OS using Classic Federation. We’ll take a look at one of our applications. * AT&T application overview * Current architecture and the problems associated with it: Requires access to: - DB2 z/OS - flat files on z/OS - SQL Server - Teradata - Oracle * Overview of WebSphere Federated Server and how it can make life a little easier * Installation/user experiences of WebSphere Federated Server * Installation/user experiences of WebSphere Classic Federation * New architecture of application using WebSphere Federated Server and WebSphere Classic Federation

1 Agenda

• Who is AT&T • Application Overview / Complexity • IBM Tools Required to Reduce Complexity • WebSphere Federated Server • WebSphere Classic Data Architect • WebSphere Classic Federation for z/OS • Querying a sequential file on z/OS • Setup; step by step example • Setting up access to: • DB2 • SQL Server • Oracle • Teradata • Benefits obtained with IBM’s tool set

2

Agenda

2 Who is AT&T?

3

Who is AT&T? It’s now made up of the following companies:

SBC + Classic AT&T + BellSouth + Cingular

3 System Environments

175+ IMS, 380+ CICS

185 1,000,000,000+ DB2 Production IMS Sub- Classic SBC only Transactions/Day Systems

62,000+ MIPS

(15 IGS + 2 AT&T z/OS Support vs LUW Support(5 AT&T)

4

Today’s environment at SBC. This does not include Classic AT&T, BellSouth or Cingular.

4 Application Overview

FinanceWeb Web Site and SQL Server • Acronym: FinanceWeb • Purpose: The FinanceWeb Servers are used to distribute monthly Budget Variance Reports, Headcount Reports, and various operational metrics reports for the Midwest Region Network Services Organization as well as similar Reports for the Credit & Collections Organization in all regions • Geographic Footprint: Illinois, Indiana, Michigan, Ohio, Wisconsin, Arkansas, Kansas, Missouri, Oklahoma, Texas, California, Nevada • #Users: 1500

5

FinanceWeb is an in-house developed application used to distribute monthly Budget Variance Reports, Headcount Reports, and various operational metrics reports for the Midwest Region Network Services Organization as well as similar Reports for the Credit & Collections Organization in all regions.

5 Application Overview

6

Home page for the FinanceWeb application. From here, the application users can drill down to specific reports.

6 Application Overview

Statements from FinanceWeb application support team:

• We want to join tables in a DB2 environment like AIRS (BIAS) in the Midwest to EDW (Enterprise – Teradata) tables • We want to join SQL Server tables to datasets on the MVS platforms and to EDW tables • Right now we spend a large amount of time, pushing and pulling datasets between mainframes, SQL Server, QMF for Windows queries, SAS results, Access , and EDW • I'm afraid you would laugh at some of it. We FTP, import to SQL, pull from EDW, link tables and on and on just to get data together • We can't afford an IT project so we have learned to mold what we can get the best we can • I'm quite proud of what we have been able to accomplish but again, there has to be a better way without having to build huge complex IT projects • Soon….we will need access to Oracle

• “Often I feel like I am hand cranking ice cream when I know there is an electric machine on the market”

7

Exact quotes from our “Associate Director of Credit Collections.” As you can see, data is coming from many sources. DB2, Teradata, SQL Server, Access, flat files,,,and soon, Oracle.

7 Application Overview

“To get a current balance as of today on all business accounts in Illinois, I would run this QMF for Windows from the BIAS Table and export to SQL/or ACCESS or to .txt:”

“…I would run it for the 5 states. Push it into Access.”

8

QMF for Windows is used to extract data from multiple tables, from multiple subsystems.

The joining of the 5 states can be done just using the DB2 Federated Database that we currently use to join DB2 z/OS tables across subsystems.

8 Application Overview

“Then I would have to go to Teradata, set up a temp table and run SQL Assistant to get more of the Business Unit Identifier and Collection Control Indicator (Collection Treatment performed on account) since that is not on the BIAS Tables:”

9

Teradata is used

9 Application Overview

“Then I need to run a SAS query on the Mainframe to get some point in time info:”

10

SAS is used to extract data and creates multiple sequential files on z/OS.

10 Application Overview

“Then we would use SQL Server Views or Query Analyzer to lump it all together…”

11

SQL Server is used…..so many pieces to this puzzle

11 To Sum it up…

What can we do to make life easier for this application? They need access to the following: • Flat file, located on z/OS • DB2 on z/OS • Oracle • Teradata • SQL Server

12

There must be a way to bring all this diversity into one meaningful location. If data replication is not an option, maybe the data can be accessed in real time? To the programmer, all this data might appear as one data source….and who cares where the data is physically located, or what data sources it comes from.

12 What Tools Do We Need?

WebSphere Federated Server(WFS)

+ Classic Data Architect(CDA)

+ Classic Federation Server

13

Three tools will help us to achieve one data source…

WebSphere Federated Server + Classic Data Architect + Classic Federation.

Federated Server is what pulls all the remote locations together. Data Architect is the GUI tool that connects to Classic Federation. Classic Federation is what allows the user to query a flat file on z/OS.

13 WebSphere Federated Server

Where is WebSphere Federated Server going to run?

• INTEL LINUX RHEL 4.0 (X86) • Current processes running on this server: • Federated Database for DB2 z/OS access • QMF for WebSphere • DB2 Web Query

14

Our existing Federated Database was running on Linux. The database allowed our DB2 z/OS users to join tables across subsystems. We had a test and a production server. We used the test server to install WebSphere Federated Server.

We also had two other tools running on this server. DB2 Web Query and QMF for WebSphere. Both tools used WebSphere to access DB2 on z/OS. Web Query stored its repository on the local DB2 instance.

14 WebSphere Federated Server

The problems (opportunities) begin…. DB2 UDB V8.2 was originally installed. But we wanted to upgrade to DB2 LUW 9.1. Why? Because WebSphere Federated Server was at V9 • DB2 LUW V9 requires Red Hat v4 U4 and kernel 2.6.9. We were on Red Hat v3 U6 and Kernel 2.4. So, we had to upgrade to Red Hat v4 U4 and kernel 2.6.9 • IBM Web Site showing Platform Requirements:

http://www-306.ibm.com/software/data/db2/linux/validate/rhel4_viper.html

15

We migrated DB2 UDB V8 to DB2 LUW V9.

15 WebSphere Federated Server

The problems...Continued

• We attempted to upgrade the Linux server from 32 bit to 64 bit. 64 bit will exploit the additional memory that's available, providing better performance when joining the data sources within DB2. This was rejected due to the fact everything had to be reinstalled

16

To exploit additional memory for joining large result sets coming from the various data sources, we wanted to upgrade our server from 32 bit to 64 bit. This, however, did not happen. Today, out test server is still 32 bit. For production usage, we will upgrade to 64 bit.

16 WebSphere Federated Server

Installation:

• Do we need to discuss internal issues large companies might have to acquiring the software…..even thought there’s no cost for the software?

17

Like many large companies, simply downloading and installing the software is not as easy as it sounds. Even though our company had already purchased the software, the software had to purchased somehow. Acquiring the funding was the biggest issue. Then, to install, we have a “Change Management Tool” in place called Vantive. Everything must be done via Vantive, and requires a 3 day notice….unless to correct a production problem.

17 WebSphere Federated Server

DB2 Data Joiner: DB2 Relational Connect DB2 Information Integrator WebSphere Information Integrator WebSphere Federated Server A closer look: • Federated Server and Database • Wrappers and other Federated Objects • Query Optimizer • Two-phase Commit for Federated Transactions • Rational Data Architect

18

The federated server and database Central components of a federated system include the federated server and the federated database. Wrappers and other federated objects Within a federated server and federated database, you use connectors (referred to as wrappers in the federated system), server definitions, user mappings, and nicknames to configure connections to a data source and to reference objects within the data source. Query optimization The federated database optimizes the performance of SQL queries against heterogeneous data sources by leveraging the DB2 query optimizer and by determining when it is faster to process a query on the data source or on the federated database. Two-phase commit for federated transactions A federated system can use two-phase commit for transactions that access one or more data sources. Two-phase commit can safeguard data integrity in a distributed environment. Rational Data Architect Rational Data Architect is a companion product to the WebSphere Federation Server component of IBM Information Server that helps you design databases, understand information assets and their relationships, and streamline integration projects.

18 WebSphere Federated Server

Why WebSphere Federated Server? • Enables enterprises to access and integrate diverse data and content, structured and unstructured, mainframe and distributed, public and private, as if it were a single resource • Because of mergers and acquisitions, hardware and software improvements, and architectural changes, organizations often must integrate diverse data sources into a unified view of the data and ensure that information is always available, when and where it is needed, by people, processes, and applications • Applications that work with a federated server can interact with a single virtual data source

19

WebSphere Federated Server is the IBM tool that provides the connectivity between the various data sources. For example, it’s the engine that joins data between Oracle, SQL Server and DB2.

19 WebSphere Federated Server

• With federation, an integrated view of diverse sources is developed once and leveraged multiple times while it is maintained in a single place, which allows a single point of change • By using advanced query processing, a federated server can distribute the workload among itself and the data sources that it works with. The federated server determines which part of the workload is most effectively run by which server to speed performance

20

This is the tool that allows the various data sources, to appear as one. To the application, it appears they are connecting to one DB2 instance. Once connected, they query a table. Behind the scenes, the table is mapped (nickname) to another remote table. Authorizations are handled by something called “User Mapping.”

20 WebSphere Federated Server

Components of a federated system:

21

WebSphere Federation Server leverages the metadata of sources systems to automate the building and compiling of federated queries. Metadata also enables traceability and auditability throughout the federation process. Federated queries can easily scale to run against any volume of information by leveraging IBM Information Server’s powerful parallel processing engine. You can deploy federation logic as real-time services within a SOA, as event- driven processes triggered by business events, or on-demand within self-service portals. A federated system has the following abilities: Correlate data from local tables and remote data sources, as if all the data is stored locally in the federated database Update data in relational data sources, as if the data is stored in the federated database Move data to and from relational data sources Use data source processing strengths by sending requests to the data sources for processing Compensate for SQL limitations at the data source by processing parts of a distributed request at the federated server Access data anywhere in your enterprise, regardless of what format it is in or what vendor you use, without creating new databases and without disruptive changes to existing ones, using standard SQL and any tool that supports JDBC or ODBC.

21 Classic Data Architect

Includes: • Classic Federation Server for z/OS • Classic Event Publisher for z/OS • Classic Replication Server for z/OS • To assist user in creating relational views of z/OS sources, such as IMS, VSAM, and flat files • You can then use these relational mappings to perform federation or control which events are published or replicated • Eclipse based GUI tool. Eclipse-based tools give developers freedom of choice in a multi-language, multi-platform, multi-vendor supported environment supported by multiple vendors

22

If you purchase Classic Federation Server, Classic Event Publisher or Classic Replication Server, you will install the GUI interface to these tools called Classic Data Architect, built on Eclipse. This is the tool that will allow you to map a flat sequential file on z/OS to a “fake” table. When querying the flat file, DB2 treats this file like the “fake” table….and, to DB2, it appears to be an actual table. The down side is that no indexes can be built on this flat file. So, for a very large table, a query could run for a lot a while.

22 Classic Data Architect

Installation: • ftp://ftp.software..com/software/data/integration/iicf/ • For Windows, download file cda91wn_ga.zip • For Linux, download file cda91lx_ga.zip • WebSphere Classic Data Architect Product Updater

23

To install this tool on Linux, Unix or Windows, download the software from the following site: ftp://ftp.software.ibm.com/software/data/integration/iicf/

Once installed, you can execute a program called Product Updater. This tool will automatically verify that you are on the latest code. If not, it will download and install the latest, automatically for you.

23 Classic Federation Server for z/OS

To query a flat file on z/OS, we need a tool called Classic Federation Server on z/OS Overview: • SQL access to mainframe databases and files without mainframe programming • Read from and write to mainframe data sources using SQL • Map logical relational table structures to existing physical mainframe databases and files • Use the Classic Data Architect graphical user interface (GUI) to issue standard SQL commands to the logical tables • Use standards-based access with ODBC, JDBC, or CLI interfaces

24

To query a flat file on z/OS, you need a tool called Classic Federation Server on z/OS. If you want to query flat files, VSAM files, IMS databases, then install this tool. It maps out the non relational data sources to a relations data source, like DB2.

24 Classic Federation Server for z/OS

An Overview (Cont…): • Architecture • Data Server - perform all data access • Data Connectors - load module to access (Adabas, CA- Datacom, CA-IDMS, DB2 on z/OS, IMS, Sequential, VSAM) • Classic Data Architect - performs the mapping of sequential files to logical tables • Metadata Catalog - tables that contain information about how to convert data from non-relational to relational formats • Client (ODBC, JDBC, CLI) - enables client applications or tools to submit SQL queries to the data server

25

Data server: Data servers perform all data access. The architecture of the data server is service-based. The data server consists of several components, or services. A major service embedded in the data server is the query processor that acts as the relational engine for Classic federation. Data connectors: The query processor dynamically loads one or more data connectors to access the target database or file system that is referenced in an SQL request. Classic Data Architect: To process SQL data access requests, data definitions must be mapped to logical tables. The Classic Data Architect is the administrative tool that you use to perform this mapping. Metadata catalog: The information that you generate from the Classic Data Architect is stored in metadata catalogs. A metadata catalog is a set of relational tables that contain information about how to convert data from non-relational to relational formats. The data server accesses the information stored in these catalogs. Clients: WebSphere Classic Federation Server for z/OS provides the ODBC, JDBC, and CLI clients. The clients enable client applications or tools to submit SQL queries to the data server.

25 Classic Federation Server for z/OS

Installation: • SMP/E installable…V9R1 • Started Task to communicate with Classic Data Architect (CDA) gui tool: • Copied SUPT.DB2.IBM.DB2TOOLS.CAC.V9R1M0. ACACSAMP(CACDS) to SYSD.PROCLIB • Setup… • APF Authorize libraries for STEPLIB DD • Local DB2 subsystem SDSNLOAD had to be concatenated with STEPLIB DD

26

We installed Classic Federation Server V9, even though we are on DB2 V8 on z/OS.

To had to set up a started task, APF authorize one library and define the TCP/IP information about our Linux test server.

26 Classic Federation Server for z/OS

• SUPT.DB2.IBM.DB2TOOLS.CAC.V9R1M0.SCACCONF(C ACDSCF)….TCP/IP and port number of local LPAR:

• Submit Start Task:

27

In this example, we only need to provide the TCP/IP address, as well as the PORT number.

Second example shows the started task running on z/OS, via SDSF (System Display and Search Facility).

27 Review App. Requirements

Application needs access to the following: • Flat file, located on z/OS • DB2 on z/OS • Oracle • Teradata • SQL Server

28

In review, the application would like access to Flat files on z/OS, DB2 on z/OS, Oracle, Teradata and SQL Server.

28 Querying a flat file (sequential)

Classic Data Architect(CDA) + Classic Federation • Mapping of file is handled by CDA • A look inside:

29

Let’s start with querying a flat file. Yes, this can be done. Let’s review an example. Here, we are mapping a flat file, to the columns of a table. The table columns are being displayed via IBM’s Admin Tool.

29 Querying a flat file (sequential)

Create a Data Design Project with CDA

Data Models

30

Using the Classic Data Architect (CDA), you first create a Design Project. Once built, click on Data Models. You’ll want to make sure that you specify Classic Integration as the Database type.

30 Querying a flat file (sequential)

Click on Schema > Add Classic Object > Add Sequence Table

FTP from DCLGEN

31

You will need to drill down to Schema, Add Classic Object and then Add Sequence Table. A new panel will be displayed where you need to enter the copy book.

31 Querying a flat file (sequential)

What’s a Cobol Copybook?

Comments not allowed

32

I created a table in DB2 that mapped out what I was wanting to access in my flat file.

There are many ways to build a copy book, here’s one method. I jumped into DB2-I (DB2 Interactive Menu) and went to option 2, DCLGEN. The generated DCLGEN mapped out what each column would look like.

Simply FTP this file to your PC, or where Classic Data Architect (CDA) can read this file. On a side note, CDA could not read a flat file that contained comments. It would encounter syntax errors. Once I removed the comment section, CDA was able to read the file .

32 Querying a flat file (sequential)

Data set on z/OS to be queried:

Colum names from DCLGEN.

33

Once the CDA tool reads the copy book, you’ll be able to drill down to the specific columns for the sequential file.

33 Querying a flat file (sequential)

Structure of Table:

Now that CDA knows the structure of the sequential file, generate DDL for metadata catalog.

34

Note that these columns are not really physical. You might say it is meta data. They logically map out a physical column within the flat file. From the GENERATE DDL option, you must generate the DDL to build the objects within the tool.

34 Querying a flat file (sequential)

MetaData Catalog:

35

Once the table has been defined, you can submit it and allow it to run to good completion.

35 Querying a flat file (sequential)

ODBC Connection from Linux to z/OS

• Connecting from Linux server to z/OS will be via ODBC • DB2 Control Center was used to create ODBC wrapper, which is included with WebSphere Classic Federation

36

To acquire the connectivity to DB2 on z/OS, we had to set up an ODBC (Open DataBase Connectivity) connection. This was built using the DB2 Control Center from my Windows PC.

36 Querying a flat file (sequential)

37

Our next step is to create a Server. This server will point to the remote site that contains the flat file.

37 Querying a flat file (sequential)

• After we created the Wrapper, we encountered the following error: IBM][CLI Driver][DB2/LINUX] SQL1476N The current transaction was rolled back because of error "-430". SQLSTATE=40506 To correct, we had to specific the Code Page on the local Linux server

38

We encountered a problem with the differences in code pages between the Linux server the z/OS. Specifying a code page of 819 on the local Linux server, corrected this issue.

38 Querying a flat file (sequential) Building the Nickname…-551

Classic Federation Started Task

Build Nickname

39

Now that we created the server, we can query the flat file. Using SPUFI, we were able to run the following query:

SELECT * FROM DB2SUPT.DCLIDUG_TABLES

Looks like we have data:

DSNE625I CONNECT TO LOCATION FED_DB_T PERFORMED, DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQL ------+------+------+------+------SELECT * FROM DB2SUPT.DCLIDUG_TABLES ------+------+------+------+------DBNAME TBNAME NAME ------+------+------+------+------COFFEE1 SYSTABLESPACE ABP_SYSTABLESPAC DSNDB06 SYSVIEWDEP ABP_SYSVIEWDEP DSNDB06 SYSCOLAUTH COLAUTH1 DSNDB06 SYSCOLAUTH COLAUTH2 DSNDB06 SYSCOLUMNS COLUMNSX DSNDB06 SYSCOPY COPY0001 DSNDB06 SYSCOPY COPY0002 DSNDB06 SYSDATABASE DBASE001 DSNDB06 SYSDBAUTH DBAUTH01 DSNDB06 SYSDBAUTH DBAUTH02 . . .

39 Querying a flat file (sequential) SPUFI….-551

No authority to select from table

40

Now that we created the server, we can query the flat file. Using SPUFI, we were able to run the following query:

SELECT * FROM DB2SUPT.DCLIDUG_TABLES

Looks like we have data:

DSNE625I CONNECT TO LOCATION FED_DB_T PERFORMED, DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQL ------+------+------+------+------SELECT * FROM DB2SUPT.DCLIDUG_TABLES ------+------+------+------+------DBNAME TBNAME NAME ------+------+------+------+------COFFEE1 SYSTABLESPACE ABP_SYSTABLESPAC DSNDB06 SYSVIEWDEP ABP_SYSVIEWDEP DSNDB06 SYSCOLAUTH COLAUTH1 DSNDB06 SYSCOLAUTH COLAUTH2 DSNDB06 SYSCOLUMNS COLUMNSX DSNDB06 SYSCOPY COPY0001 DSNDB06 SYSCOPY COPY0002 DSNDB06 SYSDATABASE DBASE001 DSNDB06 SYSDBAUTH DBAUTH01 DSNDB06 SYSDBAUTH DBAUTH02 . . .

40 Querying a flat file (sequential) SPUFI….-1822

41

By default, Classic Federation Server will only query 10,000 rows. I modified this to 0 (zero) to look at all 1,000,000 rows.

41 Querying a flat file (sequential)

Performance; querying 1,000,000 row file:

42

Now that we created the server, we can query the flat file. Using SPUFI, we were able to run the following query:

SELECT * FROM DB2SUPT.DCLIDUG_TABLES

Looks like we have data:

DSNE625I CONNECT TO LOCATION FED_DB_T PERFORMED, DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQL ------+------+------+------+------SELECT * FROM DB2SUPT.DCLIDUG_TABLES ------+------+------+------+------DBNAME TBNAME NAME ------+------+------+------+------COFFEE1 SYSTABLESPACE ABP_SYSTABLESPAC DSNDB06 SYSVIEWDEP ABP_SYSVIEWDEP DSNDB06 SYSCOLAUTH COLAUTH1 DSNDB06 SYSCOLAUTH COLAUTH2 DSNDB06 SYSCOLUMNS COLUMNSX DSNDB06 SYSCOPY COPY0001 DSNDB06 SYSCOPY COPY0002 DSNDB06 SYSDATABASE DBASE001 DSNDB06 SYSDBAUTH DBAUTH01 DSNDB06 SYSDBAUTH DBAUTH02 . . .

42 DB2 on z/OS

To access DB2 on z/OS, we have two options • Classic Federation • DRDA via Federated Database

For optimum performance, DRDA will have the best performance

43

To access DB2 on z/OS, we could either connect directly via DRDA, or we could use Classic Federation. It’s best to use DRDA.

43 SQL Server Access

DB2 Client to set up SQL Server for Federated Connection • DB2 Control Center via Personal Edition on my PC • DB2 Control Center via Linux Server (Java) • DB2 Command Line • Scripts

44

There are several methods of setting up the various data source accesses. For example, you could use DB2 Client, Control Center (my windows machine) or via Linux. You could use the DB2 Command line window. For me, I prefer to use the DB2 Control Center.

44 SQL Server Access

45

In this example, we are going to set up access to a SQL Server instance. First, we must define a new “wrapper.” A wrapper is a mechanism by which a federated server can interact with a certain category of data source. During the creation of the wrapper, we point to Microsoft SQL Server.

45 SQL Server Access

Creating User Mapping

46

If the authorization Ids are different at the remote servers, then you can set up the ID and password. This makes the handshake from one server to another, transparent to the user.

46 SQL Server Access

Creating SQL Server Nicknames

47

Nicknames point to the actual table name, along with the creator ID and location. Let’s look at this example of a DB2 z/OS table:

CREATE NICKNAME DA5A.SYSIBM_SYSTABLES FOR DA5A.SYSIBM.SYSTABLES

Here, the nickname is SYSIBM_SYSTABLES. The owner of the nickname is DA5A. The user would select against the table called DA5A.SYSIBM_SYSTABLES. You’ll notice that it physically points to DA5A.SYSIBM.SYSTABLES….which is DB2 z/OS subsystem ID of DA5A. The owner of the table is SYSIBM. The actual table name is SYSTABLES.

47 SQL Server Access

Creating Nickname had some issues: • Had to grant authorities to Nickname

• SQL Server displaying table names:

48

To select against SQL Server tables, we had to grant SELECT authorities to our user ID.

48 SQL Server Access

Table….Nickname….Query:

SPUFI:

49

Here, we see the Nickname, pointing to the SQL Server Table.

Within SPUFI, we can run the query against the Nickname to return the result set.

49 Oracle Access

Installation of Oracle Drivers • We installed WebSphere Federated Server V9.1 • We attempted to install Oracle Client 10.2 • Federated Server V9.5 only supports Oracle Client 10.2 • Federated Server V9.1 only supports Oracle Client 10.1 • So….we had to install Oracle Client 10.1 to correct issue • However, Oracle V10.1 will not install on Red Hat Linux • So, we installed Oracle V10.1 with IGNOR PRERECS

50

Installation set up Oracle access.

50 Teradata Access

Installation of Teradata Drivers • For Teradata drivers to work, Linux must be 64 bit. Our Linux server as 32 bit To correct: • From our Linux server, we created a Nickname pointing to DB2 AIX server that points to Teradata

51

Installation set up for Teradata access.

51 Layout of Environment

SQL Server

DB2 z/OS & Sequential Files

Linux

Windows

Oracle DB2 LUW Teradata

52

This graph represents the physical connectivity from our Linux server to DB2 on z/OS, my PC, SQL Server, Oracle, DB2 LUW and Teradata.

52 Layout of Security

SQL Server

DB2 z/OS & Sequential Files

Linux

Windows

Oracle DB2 LUW Teradata

53

This graph represents the physical connectivity from our Linux server to DB2 on z/OS, my PC, SQL Server, Oracle, DB2 LUW and Teradata. An additional graph represents the authority that’s required to connect to each data source.

53 Object Naming Standards

Our naming standards for Nicknames are as follows:

Location-Identifier.TableOwner_TableName

For example, to access a catalog table on subsystem DBA3:

DBA3.SYSIBM_SYSTABLES

If you don’t develop some method of naming your nicknames, you’ll be confused as to which database you are accessing, as well as the server location

54

Object naming standards should be used. With nicknames pointing to DB2, Oracle, Teradata, SQL Server, etc, these names can get confusing. This screen shows an example of what we use as naming standards.

54 Testing a Query in SPUFI…

Six-way join - DB2 LUW on Linux - DB2 on z/OS - SQL Server - Teradata - Oracle on Unix - Flat file z/OS

55

Now that all our data sources have been defined to WebSphere Federated Server, we can run a test using SPUFI. In this example, we are running a query using a 6-way join to:

• DB2 on Linux • DB2 on Z/OS (LPAR HA00) •SQL Server • Teradata •SQL Server • Flat file on z/OS (LPAR ZD00)

While some tables contain a couple hundred rows, the flat file contains 3000 rows and one table contains 30 million rows, the elapsed time of this query is 3.4 seconds.

55 Installation requirements for each server

What I found to be complex were the software requirements for each data source. If you wanted to access Oracle, what needed to be installed on the local server? Following web site is a must: www-1.ibm.com/support/docview.wss?uid=swg27011206

56

To me, the most confusing part of setting this up was figuring out what software was required on the Linux local server. For example, to connect to Oracle, we needed Oracle Client software?

IBM does provide a web site and displays this information, as well as the versions needed: www-1.ibm.com/support/docview.wss?uid=swg27011206

56 Need to add another server?

Need to query another server that’s not defined to WebSphere Federated Server? How difficult is it to add? Following screen shots show step by step how easy it can be!

57

Once things are set up and the application needs an additional server set up, how complex is it? Let’s go through an example.

57 Need to add another server?

Define a Server

58

In this example, we are setting up a Microsoft SQL Server. Here, we define a new server and call it what ever we want.

58 Need to add another server?

Generated SQL

59

In this example, we are setting up a Microsoft SQL Server. We give it a name and indicate it’s an SQL Server. Note how IBM provides a way to display the syntax for the SQL statement?

59 Need to add another server?

Define a Nickname

60

Once the server is defined, we can create nicknames that point to the physical remote location where the SQL Server resides.

60 Need to add another server? Run a Query in Spufi

61

Here’s a quick test…using SPUFI, we can test the connection.

61 Lessons Learned

• Not able to cancel thread connection between DB2 on z/OS and DB2 on Linux, via DB2 on z/OS. (cancel thread from DB2 on z/OS or any tool would not work) START > PROGRAMS > IBM DB2 > MONITORING TOOLS > ACTIVITY MONITOR

62

I have not been able to cancel threads from the DB2 z/OS subsystem. To handle this, I’ve had to cancel the threads from the distributed server. To handle this, I used Activity Monitor, which was installed on my PC when I installed DB2 Connect.

Activity Monitor displayed the threads connected to the instance (my Linux server). I was able to do a “right” click and select FORCE to cancel the thread.

62 Lessons Learned

Setup a connection to an Oracle server, ran a query that tool 6+ hours to bring the data back to z/OS • Oracle “explain” showed good access path • Had to “push” down • CREATE SERVER "CTI1ORA" TYPE ORACLE VERSION '9' WRAPPER "NET8" OPTIONS (COLLATING_SEQUENCE 'Y' ,DB2_MAXIMAL_PUSHDOWN 'Y' ,NODE ' KTLCTI' ,PUSHDOWN 'Y',VARCHAR_NO_TRAILING_BLANKS 'Y')

63

We ran into performance issues when a lot of data was moved to the Linux server. Modifying the server with the following reduced the cpu consumption, as well as the I/O:

CREATE SERVER "CTI1ORA" TYPE ORACLE VERSION '9' WRAPPER "NET8" OPTIONS (COLLATING_SEQUENCE 'Y' ,DB2_MAXIMAL_PUSHDOWN 'Y' ,NODE ' KTLCTI' ,PUSHDOWN 'Y',VARCHAR_NO_TRAILING_BLANKS 'Y')

63 Benefits obtained

With WebSphere Federated Server installed, what benefits are now possible? • Application now treats on data sources as one. Single source, relational updates • DB2, Informix, Oracle, SQL Server, Sybase, Teradata, OLE DB, ODBC, SAP, PeopleSoft, Siebel, Excel, XML, flat files, IMS, etc • Reduce hand coding and development time • Faster response to business needs • Leverage enterprise information assets

64

Benefits for using WebSphere Federated Server: • Application sees one data source • No need for the developer to code for every connection to different data sources • With less coding, application development time is reduced

64 Today?

Where is the application today?

65

As of the March 5th, 2008, the application has only begun testing. By May 21st, the data of this presentation, I hope to provide additional details about the progress of this application using Federated Server and Classic Federation in production.

65 Questions

66

Questions?

66 Session: A10 Let’s Take a Walk With WebSphere Federated Server

Tom Glaser AT&T [email protected]

67

Tom Glaser AT&T [email protected]

67