ApatarForge
  Dashboard > APATAR CONNECTOR GUIDES > Apatar Connector Guides > Connector for IBM DB2 > Information > Page Comparison
  APATAR CONNECTOR GUIDES Log In   View a printable version of the current page.  
  Connector for IBM DB2
compared with
Current by olga belokurskaya
on Oct 23, 2009 08:42.

(show comment)
 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 10 changes. View first change.

 {info}This guide will help you learn how to extract/load data from/to IBM DB2 tables.{info}
  {info}This guide will help you learn how to extract/load data from/to IBM DB2 tables.
 {info}
  
 h4. Description
  
 Apatar works with IBM DB2 through ODBC-JDBC bridge. DB2 driver is included in the installation package but still requires a license file to work with user's DB2 database. The process of selecting the license can be done within the Connector Configuration window. Also, the Manage Licenses button is available at the bottom of the Properties grid.
  
 h4. Configuration
  
 To gain access to DB2 tables, please do the following:
 # Drag-and-drop connector for DB2 to Apatar's work panel.
 \\
 \\ !db2_1.PNG!\\
 \\
 # Double-click on the connector.
 # Fill in the authorization details (database name, user name, password, and host name or address).
 # If necessary, change the port number. Connector Configuration window:
 \\
 \\ !db2_2.PNG!\\
 \\
 Input fields specification (all fields are mandatory, except for user password):
 \\
 \\
 #* UserName - user login name
 #* Password - user password (required if a table is protected)
 #* Host - host where DB engine is running
 #* Port - port where DB engine is running
 #* DBName - database name
 \\
 \\
 # Manage licenses, if needed (please read the paragraph below)
 # Click Next.
 # The list of DB2 tables occurs. Make a selection and choose the table you would like to extract data from or write data to.
# Click Next. If all the previous actions were performed correctly, you will see the names of the data fields.
  # Click Next.
 # Select the mode in which the transformation should run. ([Click here|INT:Table Update] to read about the difference between the modes.)If you select Update mode, please also select the field(s) from the list that should be used as primary keys to define if a record already exists in the data target. {note}Make sure you map the fields selected as primary keys to input fields in an operation connecting your data source and data target.{note}
 # Click Finish.
 \\
 \\
  
 h4. How to manage licences
  
      To add a new DB2 license or change an existing one, click on Manage Licenses in DB2 connector properties window. License list is empty by default.
 \\
 \\
            !db2_3.PNG!\\
 * To *add* a license,
 \\
 \\
 a) please click the Add button
 \\
 b) enter the license name
 \\
 c) enter the license path or select it using the Browse button
 \\
 d) click Ok
 \\
 \\ !db2_4.PNG!\\
 \\
 * To *edit* a license,
 \\
 \\
 a) select a license from the list
 \\
 b) click the Edit button
 \\
 c) change the license name
 \\
 d) change the license path or select it using the Browse button
 \\
 e) click Ok
 \\
 \\
 * To *delete* a license,
 \\
 \\
 a) select a license or several licenses from the list clicking Ctrl+A or holding Shift or Ctrl and clicking on the licenses
 \\
 b) click the Delete button
 \\
 c) click OK to confirm selecting the license in the Confirmation window
  
      Close the Manage DB2 Licenses window, close the connector clicking X or Cancel, and restart Apatar.
{note}You do not have to save the datamap to save license settings.{note}
  {note}You do not have to save the datamap to save license settings.
 {note}
  
 h4. Problems with registering DB2 licenses
  
 If you experience problems registering the license, you can also try the following:
  
 1. Create a new folder called _"license"_, if you do not have one, in the location where Apatar is installed: _plugins/connectors/db2/lib_
 2. Copy the _db2jcc_license_PUT_YOUR_DB2_DRIVER_NAME_HERE.jar_ file to the _"license"_ folder
 3. Close Apatar and Scheduling applications
 4. Open the _plugins/connectors/db2/plugin.xml_ file to edit it. This file looks as follows:
{code:xml}<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in Manifest 0.4" "http://jpf.sourceforge.net/plugin_0_4.dtd">
  {code:xml}
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in Manifest 0.4" "http://jpf.sourceforge.net/plugin_0_4.dtd">
  
<plugin id="com.apatar.db2" version="0.0.1">
 <requires>
 <import plugin-id="com.apatar.core" match="compatible" exported="false" optional="false" />
 <import plugin-id="com.apatar.ui" match="compatible" exported="false" optional="false" />
 </requires>
 <runtime>
 <library id="sybase" path="bin/" type="code">
 <export prefix="*" />
 </library>
 <library id="lib_driver" path="lib/db2jcc.jar" type="code">
 <export prefix="*" />
 </library>
 </runtime>
 <extension plugin-id="com.apatar.core" point-id="Node" id="DB2Node">
 <parameter id="class" value="com.apatar.db2.DB2NodeFactory" />
 </extension>
 </plugin>
  <plugin id="com.apatar.db2" version="0.0.1">
 <requires>
 <import plugin-id="com.apatar.core" match="compatible" exported="false" optional="false" />
 <import plugin-id="com.apatar.ui" match="compatible" exported="false" optional="false" />
 </requires>
 <runtime>
 <library id="sybase" path="bin/" type="code">
 <export prefix="*" />
 </library>
 <library id="lib_driver" path="lib/db2jcc.jar" type="code">
 <export prefix="*" />
 </library>
 </runtime>
 <extension plugin-id="com.apatar.core" point-id="Node" id="DB2Node">
 <parameter id="class" value="com.apatar.db2.DB2NodeFactory" />
 </extension>
 </plugin>
 {code}
 
 5. Add the following lines:
 {code:xml}
<library id="license_qwe" path="lib/license/db2jcc_license_PUT_YOUR_DB2_DRIVER_NAME_HERE.jar " type="code">
 <export prefix="*" />
  <library id="license_qwe" path="lib/license/db2jcc_license_PUT_YOUR_DB2_DRIVER_NAME_HERE.jar " type="code">
 <export prefix="*" />
  </library>
 {code}
 
 6. Now the file should look like this:
 {code:xml}
<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in Manifest 0.4" "http://jpf.sourceforge.net/plugin_0_4.dtd">
 <plugin id="com.apatar.db2" version="0.0.1">
 <requires>
 <import plugin-id="com.apatar.core" match="compatible" exported="false" optional="false" />
 <import plugin-id="com.apatar.ui" match="compatible" exported="false" optional="false" />
 </requires>
 <runtime>
 <library id="sybase" path="bin/" type="code">
 <export prefix="*" />
 </library>
 <library id="lib_driver" path="lib/db2jcc.jar" type="code">
 <export prefix="*" />
 </library>
 <library id="license_qwe" path="lib/license/ db2jcc_license_PUT_YOUR_DB2_DRIVER_NAME_HERE.jar" type="code">
 <export prefix="*" />
 </library>
 </runtime>
 <extension plugin-id="com.apatar.core" point-id="Node" id="DB2Node">
 <parameter id="class" value="com.apatar.db2.DB2NodeFactory" />
 </extension>
  <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in Manifest 0.4" "http://jpf.sourceforge.net/plugin_0_4.dtd">
 <plugin id="com.apatar.db2" version="0.0.1">
 <requires>
 <import plugin-id="com.apatar.core" match="compatible" exported="false" optional="false" />
 <import plugin-id="com.apatar.ui" match="compatible" exported="false" optional="false" />
 </requires>
 <runtime>
 <library id="sybase" path="bin/" type="code">
 <export prefix="*" />
 </library>
 <library id="lib_driver" path="lib/db2jcc.jar" type="code">
 <export prefix="*" />
 </library>
 <library id="license_qwe" path="lib/license/ db2jcc_license_PUT_YOUR_DB2_DRIVER_NAME_HERE.jar" type="code">
 <export prefix="*" />
 </library>
 </runtime>
 <extension plugin-id="com.apatar.core" point-id="Node" id="DB2Node">
 <parameter id="class" value="com.apatar.db2.DB2NodeFactory" />
 </extension>
 </plugin>
 {code}
  
 7. Save this file and launch Apatar.
  
 h4. Preview
  
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If necessary, you can preview data. To do so, right-click on the connector and choose "Preview Results".
Site running on a free Atlassian Confluence Open Source Project License granted to Apatar Data Integration (ETL). Evaluate Confluence today.
Contact Administrators