Download Configuring a JDBC Resource for IBM DB2/iSeries in

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Oracle Database wikipedia , lookup

Concurrency control wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

SQL wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

PL/SQL wikipedia , lookup

Database wikipedia , lookup

Clusterpoint wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Relational model wikipedia , lookup

Database model wikipedia , lookup

Transcript
Configuring a JDBC Resource for IBM
DB2/iSeries in Metadata Manager
© 2011 Informatica Corporation. No part of this document may be reproduced or transmitted in any form, by any means
(electronic, photocopying, recording or otherwise) without prior consent of Informatica Corporation.
Abstract
JDBC resource allows you to extract metadata from any relational database that you can connect to through JDBC. This
article describes how to create and configure a JDBC resource in Metadata Manager to extract metadata from IBM DB2/iSeries.
Supported Versions
¨ Metadata Manager 9.1.0
Table of Contents
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Database Management Resources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Configuring the JDBC Metadata Source. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Install the Metadata Manager Agent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Configure Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Creating a JDBC Resource. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Assigning Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Troubleshooting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Objects Extracted and Objects Not Extracted. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Overview
You can create and configure a JDBC resource to extract metadata from any relational database management system that
is accessible through JDBC.
You can create a JDBC resource for any relational database that supports JDBC. Informatica has tested the JDBC resource
for IBM DB2/iSeries. You cannot connect to relational databases through ODBC. Where available, you should use the
existing database resource types specific to that relational database instead of the JDBC resource. The database-specific
resource types perform better and extract more metadata aspects. For example, to load metadata from an Oracle database,
create an Oracle resource instead of creating a JDBC resource.
Database Management Resources
You can configure the following database management resources specific to these relational databases:
¨ IBM DB2 for LUW
¨ IBM DB2 for z/OS
¨ IBM Informix
¨ Microsoft SQL Server
¨ Netezza
¨ Oracle
¨ Sybase ASE
¨ Teradata
2
Configuring the JDBC Metadata Source
Before you create a JDBC resource, you must configure the metadata source. If you do not correctly configure the metadata
source, the metadata load can fail or the metadata can be incorrectly loaded in the Metadata Manager warehouse.
Install the Metadata Manager Agent. Configure the permissions for the database user account that you use to connect to the
database. Make sure that the user has access to the system tables rather than the data tables.
Install and configure required database drivers. For example, to configure a JDBC resource to use IBM DB2/iSeries, you can
use the data drivers that are available to you when you install PowerCenter. Make sure that the JDBC driver JAR files are
available on the same host as the Metadata Manager Agent.
To test the connection settings to the data source, use any available interface to connect to it through JDBC. For example,
you use the database development perspective in Eclipse to test the connection settings. After connecting to the data
source, verify that you can access the catalog, schema, or tables that you want to import. Use these connection settings
when you configure a JDBC resource for that data source.
Install the Metadata Manager Agent
The Metadata Manager Agent is a Windows-based program that Metadata Manager uses to access metadata sources and
extract source metadata. By default, the Metadata Manager Agent runs on the Windows nodes where the Metadata
Manager Service runs.
The Metadata Manager Agent does not run on UNIX. If the Metadata Manager Service runs on UNIX, you must install the
Metadata Manager Agent separately on a Windows machine.
Configure Permissions
To enable access to system objects in a relational database, you need to configure appropriate permissions.
Creating a JDBC Resource
Before you create a JDBC resource, configure the JDBC metadata source.
1.
On the Load tab, click Actions > New Resource.
The Resource Selection window appears.
2.
Click Database Management > JDBC.
3.
Click Next.
The Properties page appears.
4.
Enter the following information:
Property
Description
Name
Name for the resource. The resource appears in the Resources panel with this name. The name must
be unique and have from 1 through 256 characters. It cannot include the following characters:
/\:*'?"<>|[]
Description
5.
Description for the resource. Description cannot exceed 4,000 characters.
Click Next.
The Configuration page appears.
3
6.
Configure the following resource connection properties:
Property
Description
Agent URL
Host name and port number of the Metadata Manager Agent. You can use the Metadata Manager Agent
installed on any machine.
For example: http://localhost:19980
Source system
version
Name and version of the metadata source.
Driver class
Name of the Java class that implements the JDBC driver interface. Specify the full name including the
package name.
For example: com.informatica.jdbc.db2.DB2Driver
Driver path
Path to the JDBC driver JAR file. Separate multiple values with a semicolon (;). If required, copy the JAR
file to the Windows machine on which the Metadata Manager Agent is installed.
The driver path is relative to the Metadata Manager Agent location. If you specify the file name without
specifying the path, make sure that the JAR file is in the classpath of the agent.
For example, the data driver for IBM DB2/iSeries is available at the following location: <PowerCenter
install location>\source\tomcat\common\lib\dwdb2.jar
URL
JDBC URL to connect to the database. Metadata Manager uses this URL to verify connection information
to the database. The value you specify depends on the database and driver you use.
For example: jdbc:informatica:db2://host_name:port;LocationName=<location
name>;PackageCollection=<package collection>
Default port number of the IBM DB2/iSeries server is 446.
User name
Name of the user account used to connect to the database.
Password
Password for the user account used to connect to the database.
Catalog
Catalog name that Metadata Manager uses to filter metadata that is extracted. Catalog is a container for
schemas and global objects.
The catalog object is not relevant for all relational databases. For example, IBM DB2/iSeries does not use
this object.
Schema
Schema name that Metadata Manager uses to filter metadata that is extracted. Separate multiple values
with a semicolon (;).
If you do not specify a schema name, Metadata Manager loads the first schema in the list of available
schemas sorted based on ascending alphabetical order.
View definition
extracting SQL
Database-specific SQL query to extract the view definitions. The query must return results with a single
column containing the view definition text.
If you do not enter a query, data lineage between views and their source tables is not built.
For example, in IBM DB2/iSeries, you can enter the following query:
SELECT VIEW_DEFINITION FROM QSYS2.SYSVIEWS WHERE TABLE_NAME=? AND SYSTEM_VIEW_SCHEMA=?
Synonym lineage
SQL
7.
Database-specific SQL query to extract the synonym information for tables and views.
Note: This property is reserved for future use.
Click Test Connection to test the connection to the source system.
If Metadata Manager cannot connect to the source system, an error message appears. Correct any error and test
the connection again.
4
8.
Click Next.
The Schedules window appears.
9.
To add a schedule, select Attach a Schedule and select a schedule in the Schedule list.
If you have not created a schedule, you can assign a schedule to a resource after you create the resource.
10.
Click Finish.
The resource appears in the Resources panel on the Load tab.
Assigning Connections
You can use a JDBC resource as the target for connection assignments after loading it. For example, you can create a
connection assignment between a PowerExchange for IBM DB2/iSeries connection and a JDBC resource representing the
IBM DB2/iSeries database schema.
Troubleshooting
Load fails for a JDBC resource when driver JAR file details are not properly configured.
When you specify the driver JAR files during resource configuration, complete the following tasks:
¨ Specify the absolute path and the full name including the package name.
¨ Ensure that the JAR file is not in a shared location, but is available on the same host as the Metadata Manager
Agent.
Load fails for a JDBC resource when the source is IBM DB2/iSeries version V6R1.
Assign ALLOBJ privilege to the user and reload the resource.
Objects Extracted and Objects Not Extracted
After you create and load a JDBC resource, you can view and run data lineage on the metadata objects that Metadata
Manager extracted.
To view lineage between views and tables, specify a database-specific SQL query to extract the view definitions when you
create or edit a JDBC resource. Metadata Manager uses the view definitions text to build lineage between views and tables.
Objects Extracted
Metadata Manager extracts the following objects from a JDBC resource:
¨ Schema name
¨ Table name, Comments
¨ Column name, Nullable, Position, Length, Scale, Comments, Data type.
Data type is a generic equivalent of the proprietary datatype.
¨ View name, View definition.
View definitions are extracted when the view definition extraction SQL is specified during resource configuration.
Objects Not Extracted
Metadata Manager does not extract the following objects from a JDBC resource:
¨ Catalog name
¨ Synonyms of tables and views
¨ Indexes
5
¨ Stored procedures
¨ Triggers
¨ Primary key and foreign key information
¨ Profiling information
Author
Jyothi Jandhyala
Principal Technical Writer
6