Consultor Eletrônico



Kbase P54390: How to setup ODBC connection to DB2/400 Database in OpenEdge 10.0a or higher ODBC dataserver ?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/4/2008
Status: Verified

GOAL:

How to setup ODBC connection to DB2/400 Database?

GOAL:

How to setup ODBC Connection to AS/400 DB2 database?

GOAL:

How to connect AS/400's DB2 DB using ODBC?

FACT(s) (Environment):

ODBC DataServer
OpenEdge 10.x
Windows

FIX:

Steps to create a ODBC connection to the DB2/400 Database:

The following steps need to be performed on a Windows machine where the OpenEdge 10.x ODBC DataServer is installed unless otherwise specified:

-In the ODBC administrator, add a system DSN, choosing OpenEdge 10.x DB2 Wire Protocol driver.

-Specify the Data Source Name (DSN) which will be used as the physical name for the ODBC Data Source

-Specify AS/400 Server name or IP address in the IP Address attribute. Be sure that you can ping the AS/400 Server using the Name or IP address.

-Use port number that is associated with the DRDA(Distributed Relational Database Architecture) listener on the AS/400 machine.
On AS/400 find the name by entering NETSTAT command and select number 3. Look for DRDA. press F-14 to see the assigned port number for DRDA.

-Location Name is the name of the Relational Database(RDB) on the AS/400 machine.
On AS/400, use WRKRDBDIRE(Work With Relational Database Directory Entry) command to look at the local relational database directory entry.
There can only be one local relational database directory entry on AS/400. If one does not exists, you need to add one by select option 1.

-Collection name is the name of the collection on the AS/400 machine.
On AS/400, to create a collection on AS/400 use SQL "CREATE COLLECTION <collection name>".
The collection name must be unique as the command creates a library with all the necessary system tables and journals.

-Specify default user ID, this must be a valid AS/400 user ID. This is optional.

-Go to the Modify Bindings tab and click Modify Bindings. When finished you will receive a message stating that the package is created and bound. This process may take a while before the message is displayed

-Perform a test connection to verify the connection can be established.