Oracle® Transparent Gateway for DRDA Installation and User's Guide 10g Release 2 (10.2) for UNIX Part Number B16217-02 |
|
|
View PDF |
After you have installed the gateway, configured your DRDA Server, and configured your SNA or TCP/IP software, then you must configure the gateway. Some of these tasks involve customizing the Gateway Initialization File.
This chapter includes the following sections:
The checklist for configuring gateway are:
Configuring the Gateway
Configuring the Host
Binding the DRDA Gateway Package
Step 2: Create a Database link.
Binding Packages on DB2/Universal Database (DB2/UDB)
Step 2: Copy files from $ORACLE_HOME/tg4drda/install/db2udb
.
Step 3: Connect to the database.
Step 4: Create the ORACLE2PC
table:
Step 5: Commit the transaction:
Step 7: Disconnect from the session:
Before Binding the DRDA Gateway Package
Sample SQL scripts
Step 1: If server is DB2/OS390, DB2/400, or DB2/UDB, then run data dictionary scripts
Step 2b: If server is not DB2/UDB, create the ORACLE2PC table
Configuring the Oracle Integrating Server
Accessing the Gateway from Other Oracle Databases
Step 1: Create a database link with which to access the gateway.
Step 2: If needed, define synonyms and views for tables accessed through the gateway.
Step 3: Perform GRANT
statements for the synonyms and views you create.
Accessing Other DRDA Servers
The Gateway System Identifier (SID) is a string of alphabetic and numeric characters that identifies a gateway instance. The SID is used in the filenames of gateway parameter files and in the connection information associated with the Oracle Database database links that access the gateway.
A separate SID is required for each DRDA Server to be accessed. You might also have multiple SIDs for one DRDA Server to use different gateway parameter settings with that server. Refer to "Accessing Other DRDA Servers" for information on configuring additional SIDs.
The information in this chapter describes the configuration process for the gateway. All gateway parameters are kept in the initsid.ora
Gateway Initialization file, which is stored in the gateway admin
/ directory.
To configure the host for the Oracle Transparent Gateway for DRDA, you tailor the parameter files for your installation.
Step 1: Choose the initsid.ora file
The initsid.ora
Gateway Initialization file defines the operating parameters for the gateway. Samples (tailored for each type of DRDA Server) are provided as a starting point for tailoring to your particular installation. The samples are stored in the $ORACLE_HOME/tg4drda/admin
directory. The following is a list of the initialization files for various DRDA Server platforms:
For DB2/OS390: initDB2.ora
For DB2/UDB: initDB2UDB.ora
For DB2/400: initAS400.ora
For DB2/VM: initDB2VM.ora
Choose a sample initialization file and copy it, within the same directory, to the name of the gateway SID, using the following naming convention:
initSID.ora
where SID
is the chosen gateway SID. For example, if the chosen gateway SID were DRDA, then the initialization file would be named initDRDA.ora.
Step 2: Tailor the initsid.ora file
After you have copied the sample initialization file, you will need to tailor it to your installation. While many parameters can be left to their defaults, some parameters must be changed for correct operation of the gateway. Attention should be given to the following DRDA and HS parameters. Attention should also be given to the security aspects of the initialization file. Chapter 14, "Security Considerations", contains details concerning encryption of passwords that would otherwise be embedded in the initialization file. See Appendix C, "DRDA-Specific Parameters", for a description of the following parameters:
DRDA_CONNECT_PARM
DRDA_PACKAGE_COLLID
DRDA_PACKAGE_NAME
DRDA_PACKAGE_OWNER
DRDA_REMOTE_DB_NAME
HS_DB_NAME
HS_DB_DOMAIN
FDS_CLASS
The product requires a package to be bound on the DRDA Server. The gateway has an internal, stored procedure that must be used to create this package. The internal, stored procedure is invoked from an Oracle integrating server. (Refer to "Configuring Oracle Net". Also refer to "Configuring the Oracle Integrating Server" in this chapter.) Before this package can be bound on the DRDA Server, the Gateway Initialization File must be correctly configured (refer to Appendix C, "DRDA-Specific Parameters").
Log on to an Oracle integrating server.
Use either SQL*Plus or Server Manager:
$ sqlplus system/manager
Create a Database link with a user ID and with a password that has proper authority on the DRDA Server to create packages.
SQL> CREATE PUBLIC DATABASE LINK dblink 2 CONNECT TO userid IDENTIFIED BY password 3 USING 'tns_name_entry'
Note: The user ID that is creating the public database link must have the "CREATE PUBLIC DATABASE LINK " privilege. |
Refer to "Configuring the Oracle Integrating Server" for more information.
Execute the stored procedure GTW$_BIND_PKG
:
SQL> exec GTW$_BIND_PKG@dblink; SQL> COMMIT;
This creates and commits the package. If any errors are reported, then correct the Gateway Initialization File parameters as needed and re-execute the bind procedure above.
If you are connecting to a DB2/UDB DRDA Server, then DB2/UDB requires that you create the ORACLE2PC
table before binding the DRDA package. Other DRDA Servers allow you to bind the package before the ORACLE2PC
table exists.
To create the ORACLE2PC
table:
Log into the machine where DB2/UDB is running.
Check that you have the ability to address the DB2/UDB instance where the ORACLE2PC
table will reside.
Copy files from $ORACLE_HOME/tg4drda/install/db2udb
.
Copy the following files from the $ORACLE_HOME/tg4drda/install/db2ud
b directory:
o2pc.sh
(Sample shell script for performing the table creation)
o2pc.sql
(SQL script for creating the table)
o2pcg.sql
(SQL script for granting package access to PUBLIC)
Connect to the database.
Connect to the database using the user ID that you will use for binding the package:
$ db2 'CONNECT TO database USER userid USING password'
Note: The user ID must haveCONNECT , CREATETAB , and BINDADD authority to be able to connect to the database, create the table, and create the package. |
For more information, refer to "DB2/UDB (Universal Database)".
Create the ORACLE2PC
table:
$ db2 -tf o2pc.sql
Commit the transaction:
$ db2 'COMMIT'
Verify that the table was created.
Optionally, verify the table was created under the correct user ID:
$ db2 'LIST TABLES FOR USER' $ db2 'COMMIT'
Disconnect from the session:
$ db2 'DISCONNECT CURRENT'
The DRDA package must be bound with the internal Stored Procedure GTW$_BIND_PKG
. You must perform this bind step if this release is the first time the gateway has been installed on this system. If you are upgrading from version 9 of the gateway, then a rebind is not necessary unless the initialization parameters have been changed.
The user ID used to bind or rebind the DRDA package must have the appropriate privileges on the remote database, as described in Chapter 5, "Configuring the DRDA Server".
Check DRDA parameter settings and create your ORACLE2PC
table before binding the DRDA gateway package.
Check all DRDA parameter settings to be sure that they are set correctly before you start the bind. For example, the default for DRDA_DISABLE_CALL
only works if your DRDA database supports stored procedures. If not, then you must change the setting. Also, the value for DRDA_PACKAGE_NAME
must be unique if you have any older versions of the gateway installed. New packages replace any old packages with the same name, causing versions of the gateway that use the old package to fail. Refer to Appendix C for information on the parameters and their settings.
If your DRDA Server is DB2/UDB, then create your ORACLE2PC
table. Refer to "Binding Packages on DB2/Universal Database (DB2/UDB)" for information on creating the table.
SQL scripts are provided to perform steps such as creating the ORACLE2PC
table, removing obsolete tables and views, using previous releases, and creating tables and views to provide Data Dictionary support.
Choose the appropriate subdirectory for your DRDA Server platform from the following list:
for DB2/OS390: choose tg4drda/install/db2
for DB2/400: choose tg4drda/install/as400
for DB2/VM: choose tg4drda/install/db2vm
for DB2/UDB: choose tg4drda/install/db2udb
These scripts must be run on the DRDA Server platform using a database native tool (such as SPUFI on DB2/OS390), because no tool is provided with the gateway to execute these scripts. Note that when running these scripts, the user ID used must be suitably authorized.
If your DRDA Server is DB2/OS390, DB2/400, or DB2/UDB, then run the following scripts to create the Data Dictionary tables and view.
Step 1a: Upgrading from a previous gateway version
If you are upgrading from a previous version of the gateway then run the dropold.sql
script to drop the old data dictionary definitions.
Step 1b: Creating the Data Dictionary tables and views
Run the g4ddtab.sql
and g4ddvwXX.sql
scripts to create the Data Dictionary tables and views.
g4ddvwr7.sql DB2/OS390 V7
(RACF security)
g4ddvws7.sql DB2/OS390 V7
(DB2 security)
g4ddvwr8.sql DB2/OS390 V8
(RACF security)
g4ddvws8.sql DB2/OS390 V8
(DB2 security)
g4ddvw51.sql DB2/400 V5.1
g4ddvw52.sql DB2/400 V5.2
g4ddvwu7.sql DB2/UDB V7
g4ddvwu8.sql DB2/UDB V8
Step 2: DB2/UDB or other server
Depending on your DRDA Server, perform one of the following steps:
Step 2a: If server is DB2/UDB, grant authority to package
If your DRDA Server is DB2/UDB, then the ORACLE2PC
table has already been created (see the previous sections). For all users to be able to use the table, run o2pcg.sql
granting authority to all users.
Step 2b: If server is not DB2/UDB, create the ORACLE2PC table
If your DRDA Server is not DB2/UDB, then the ORACLE2PC
table must be created. Run o2pc.sql
.
The configuration of the gateway is stored in the Gateway Initialization File. This file is stored in the $ORACLE_HOME/tg4drda/admin
directory. The Gateway Initialization File is a simple text file. You may back up this file by using an archiving tool of your choice.
Configure the Oracle integrating server, regardless of the platform on which it is installed. It can be on the host, but this is not required.
To access the DRDA Server, you must create a public database link. A public database link is the most common of database links. Refer to "Processing a Database Link" for information on creating database links. In the following example, Oracle Database and the gateway are on the same host.
CREATE PUBLIC DATABASE LINK DB2 USING 'tns_name_entry'
To facilitate accessing data using the gateway, define synonyms and views for the DRDA data tables. If needed, perform GRANT
statements to ensure that the synonyms and views are accessible to the appropriate groups of users. Refer to "Using the Synonym Feature" for information.
Perform the following steps for each of the Oracle Database servers from which you want to access the gateway:
Create a database link with which to access the gateway.
If needed, define synonyms and views for tables accessed through the gateway.
Perform GRANT
statements for the synonyms and views you create.
Provide local or Oracle Net access from the Oracle Database servers to the gateway.
To access other DRDA Servers from the Oracle integrating server, use the following steps:
Configure another SNA profile set for the DRDA Server.
Only Side Information and Partner LU Profiles must be new. You can point to existing configuration information for other profiles, unless you need to modify other aspects of the connection. For example, if you are using a different network adapter, then you must configure an entire SNA profile set. No additional profiles need to be configured for TCP/IP.
Configure additional DRDA Server instances.
To configure an additional instance, create new Gateway Initialization Files. If you are using Oracle Net, then add entries to the listener.ora
file and tnsnames.ora
file with the new SIDs.
Other components, including the gateway ORACLE_HOME
directory structure, can be shared among multiple gateway instances.
Bind the DRDA package to your DRDA Server.