Skip Headers

Oracle® Procedural Gateway and Tools for IBM MQSeries Installation and User's Guide
Release 9.2.0.1.0 for UNIX
Part No. A96196-01
Go To Table Of Contents
Contents
Go To Index
Index

Previous Next

7
Configuration

After installing the gateway, follow the instructions in this chapter to configure the gateway.  Gateway software configuration tasks and other administrative topics include:

Configuration Overview

The gateway works with several components and products to communicate between the OracleÒ server and MQSeries queues:

Figure 7-1 Gateway Communication

Description of 07_01.gif is contained in the surrounding text

Configuring the Gateway

The gateway is installed and pre-configured using default values for the gateway SID, directory names, filenames, and gateway parameter settings.  The default SID values are:

A basic gateway boot file and a gateway initialization file are also installed, and values are set in these files based on information entered during the installation phase.

Using the Gateway with the Default Values

If you are configuring one gateway instance, and if you have no need to change any of the default values, then much of the gateway configuration process is completed by the Oracle Universal Installer.  In this case, perform the following actions:

Using the Gateway without the Default Values

If multiple instances of the gateway are being configured, or to modify the default values set during the installation phases, then begin with the steps under "Changing Default Values"and continue to the end of the chapter.

Changing Default Values

When changing default values, choose a gateway SID and customize the gateway boot file and the Gateway Initialization File.

Step 1: Choose a system ID for the gateway

The gateway SID is a string of 1 to 64 alphanumeric characters that identifies a gateway instance.  The SID is used in the gateway boot file and as part of the file name for the gateway parameter file.  Choose a SID different from the default SID and different from pg4mqs92 and pg4mqc92.

You need one gateway instance, and therefore one gateway SID, for each queue manager you want to access.  If you want to access two different queue managers, then you need two gateway SIDs, one for each instance of the gateway.  Or, if you have one queue manager and want to access it sometimes with one set of gateway parameter settings and at other times with different gateway parameter settings, then you can do so by having multiple gateway SIDs for the one queue manager.

Step 2: Customize the gateway boot file

The gateway boot file initializes environment variables.  The boot file is required, and a default boot file is installed by the Oracle Universal Installer:

Gateway Running Mode Boot File Path
As MQSeries server ORACLE_HOME/pg4mqseries/admin/initsid.gtwboot
As MQSeries client ORACLE_HOME/pg4mqseries/admin/initsid.gtwboot

where sid is the default SID of pg4mqs92 or pg4mqc92.  If you chose a SID other than the default, then rename this file using the SID you chose in Step 1.  If you have multiple gateway instances, then copy the default boot file as necessary, and rename each gateway instance using the SID of each instance.

The default boot files contain the following required entries:


Gateway Running in MQSeries Server Configuration
GATEWAY_SID=gateway_sid
SERVER_PATH=gateway
LOG_DESTINATION=log_file
LD_LIBRARY_PATH=mqseries_directory

where:

gateway_sid specifies the SID of the gateway and matches the SID specified in the connect descriptor for the gateway in the tnsnames.ora file.  Refer to "Configuring Oracle Net for the Oracle Integrating Server" for more information about tnsnames.ora.
gateway specifies the full path name of the gateway executable file.
log_file specifies the full path name of the gateway bootstrap program log file. 
mqseries_directory specifies the directory where the MQSeries libraries (provided by IBM) are installed.  If the libraries were not installed under the default directory of /usr/lib, then use mqseries_directory to specify the correct directory name.

Gateway Running in MQSeries Client Configuration
GATEWAY_SID=gateway_sid
SERVER_PATH=gateway
LOG_DESTINATION=log_file
LD_LIBRARY_PATH=mqseries_directory
MQSERVER=channel
MQCCSID=character_set

where:

gateway_sid specifies the SID of the gateway and matches the SID specified in the connect descriptor for the gateway in the tnsnames.ora file.  Refer to "Configuring Oracle Net for the Oracle Integrating Server" for more information about tnsnames.ora.
gateway specifies the full path name of the gateway executable file.
log_file specifies the full path name of the gateway bootstrap program log file. 
mqseries_directory specifies the directory where the MQSeries libraries (provided by IBM) are installed.  If the libraries were not installed under the default directory of /usr/lib, then use  mqseries_directory to specify the correct directory name.
channel specifies the location of the MQSeries server and the communication method to use.  The channel format is: channel_name/connection_type/hostname [(port_number)].

For example:

MQSERVER=CHAN9/TCP/dolphin(1425)

Refer to IBM publications for more information about the MQSERVER environment variable.

Note: The channel name and connection type must entered in CAPITAL LETTERS.

character_set specifies the coded character set number used by the gateway when communicating with the MQSeries queue manager.  This is an optional parameter. 

This parameter is set only if the computer that is running the MQSeries queue manager uses a different encoding scheme than the computer that runs the gateway.  When set, the value of character_set is used by the MQSeries client software on the gateway's computer to convert the data.

The value specified for character_set affects communication only between the gateway and the MQSeries queue manager.  The message data sent or received by your application is not affected.

Refer to IBM publications for more information.

Step 3: Customize the Gateway Initialization File 

The Gateway Initialization File (sid{{/emphasis}}{{emphasis role='Bold'}}.ora{{/emphasis}}"inittalic>sid.ora) supports all procedural gateway initialization parameters described in the Oracle Open Gateway Guide for SQL-Based and Procedural Gateways and in Appendix C, " Gateway Initialization Parameters".  The initialization file must be available when the gateway is started. 

During installation, a default initialization file is created in $ORACLE_HOME/pg4mqseries/admin/initsid.ora, where sid is the default SID of pg4mqs92 or pg4mqc92.  If you chose a SID other than the default, then rename this file using the SID you chose in Step 1: Choose a system ID for the gateway.  Customize the default initialization file as necessary.

The following entries might appear in an initialization file:

SET LOG_DESTINATION=log_file
SET HS_DB_NAME=database_name
SET HS_DB_DOMAIN=domain_name
SET QUEUE_MANAGER=manager_name
SET AUTHORIZATION_MODEL=auth_model
SET TRANSACTION_MODEL=tx_model
SET TRANSACTION_LOG_QUEUE=tx_queue_name
SET TRANSACTION_RECOVERY_USER=rec_user
SET TRANSACTION_RECOVERY_PASSWORD=rec_password
SET TRACE_LEVEL=0


Note:

Refer to Oracle9i Net Services Administrator's Guide and Oracle9i Net Services Reference Guide for additional information.

where:

log_file specifies the full path name of the gateway log file.
database_name is only used when the Oracle integrating server initialization parameter GLOBAL_NAMES is set to TRUE.  In this case, the value of database_name is the name of the database link that was created in the Oracle integrating server to connect to the gateway.  It is 1 to 8 characters long.
domain_name is only used when the Oracle integrating server initialization parameter GLOBAL_NAMES is set to TRUE.  In this case, the value of domain_name is the domain name of the database link that was created in the Oracle integrating server to connect to the queue manager.
manager_name is the name of the MQSeries queue manager to access.
auth_model is the authorization model to use.  The default is RELAXED.  Refer to Chapter 8, " Gateway Running Environment" for more information about security models.
tx_model is the transaction model to use.  The default is SINGLE_SITE.  Refer to Chapter 8, " Gateway Running Environment" for more information about transaction models.
tx_queue_name is the name of the queue for logging transaction IDs for distributed transactions.  This is only used when tx_model is set to COMMIT_CONFIRM.  Refer to Chapter 8, " Gateway Running Environment" for more information about transaction models.
rec_user specifies the user name that the gateway uses to start recovery of a distributed transaction.  This is only used when auth_model is set to STRICT and tx_model is set to COMMIT_CONFIRM.  Refer to Chapter 8, " Gateway Running Environment" for more information about security models.
rec_password specifies the password of the user name that the gateway uses to start recovery of a distributed transaction.  Refer to "TRANSACTION_RECOVERY_PASSWORD" on page C-8 for more password information and to Chapter 8, " Gateway Running Environment" for more information about security models.

Configuring Oracle Net for the Gateway

The gateway requires Oracle Net to provide transparent data access to and from the Oracle integrating server.  Oracle Net uses the TNS listener to receive incoming connections from a Oracle Net client.  In the case of the gateway, the TNS listener listens for incoming requests from the Oracle integrating server.  For the TNS listener to listen for the gateway, information about the gateway must be added to the TNS listener configuration file (listener.ora).  This file, by default, is located in the directory ORACLE_HOME/network/admin, where ORACLE_HOME is the directory under which the gateway is installed.  The default values in this file are set for you during the installation process by the Oracle Universal Installer.

Using Oracle Net with Gateway Default Values

If you are configuring one gateway instance, and if you have no need to change any of the default values, then no further configuration is necessary for Oracle Net regarding the gateway.  Perform only "Step 2: Stop and start the TNS listener for the gateway".

Using Oracle Net When Changing the Gateway Default Values

If you intend to use the Oracle Net listener for multiple gateway instances, or if you need to modify some of the default values set during the installation phase, then perform Step 1 and Step 2 in this section. 

In Step 1, you add gateway information or change default information in the listener.ora file in the gateway directory ORACLE_HOME/network/admin.

Step 1: Configure the Oracle Net TNS listener for the gateway

Two entries must be added to the listener.ora file:

  • a list of Oracle Net addresses for the TNS listener to listen on

  • the gateway process that the TNS listener should start in response to incoming connection requests


    Note:

    The TNS listener and the gateway must reside on the same node.  If you already have a TNS listener up and running on the node, then you may want to make the following changes (in Steps 1 and 2) to your existing listener.ora and tnsnames.ora files.

    After making the changes, you can reload the changes by running the "reload" subcommand in the "lsnrctl" utility without shutting down the TNS listener. 



Entry of Oracle Net Addresses for the TNS Listener

If you are using Oracle Net and the TCP/IP protocol adapter, then the syntax of the entry in the listener.ora file is:

LISTENER=
  (ADDRESS_LIST=
      (ADDRESS= 
          (PROTOCOL=TCP)
          (HOST=host_name)
          (PORT=port_number)
       )
  )

where:

host_name is the name of the computer where the gateway is installed.
port_number specifies the IP port number used by the TNS listener.  If you have other listeners running on host_name, such as the listener of an Oracle integrating server on the same computer, then the value of port_number must be different from the other listeners' port numbers.

If you are using Oracle Net and the interprocess socket call (IPC) protocol adapter, the syntax of the entry in listener.ora file is:

LISTENER=
  (ADDRESS_LIST=
     (ADDRESS= 
         (PROTOCOL=IPC)
         (KEY=key_name)
     )
   )

where:

IPC specifies that the protocol used for connections is IPC.
key_name is the unique user-defined service name.

Entry for the Gateway

To direct the TNS listener to listen for a gateway instance in response to incoming connection requests, add an entry to the listener.ora file using the following syntax:

SID_LIST_LISTENER=
   (SID_LIST=
      (SID_DESC=
          (SID_NAME=gateway_sid)
          (ORACLE_HOME=gateway_directory)
          (PROGRAM=driver)
       )
    )

where:

gateway_sid specifies the SID of the gateway and matches the gateway SID specified in the connect descriptor entry in the tnsnames.ora file.  Refer to "Configuring Oracle Net for the Oracle Integrating Server".
gateway_directory specifies the gateway directory where the gateway software resides.
driver this is the name of the executable file that initializes the gateway environment using the boot file and that starts the gateway.  If the gateway uses a local MQSeries server, then the file name is pg4mqs92drv; the file name is pg4mqc92drv if the gateway is run as an MQSeries client to access a remote MQSeries server.

When adding an entry for multiple gateway instances, add the entry to the existing SID_LIST syntax:

SID_LIST_LISTENER=
 (SID_LIST=
      (SID_DESC=.
                .
                .
      )
      (SID_DESC=.
                .
                .
      )
      (SID_DESC= 
          (SID_NAME=gateway_sid)
          (ORACLE_HOME=gateway_directory)
          (PROGRAM=driver)
       )
  )

The following is an example of an entry made to the listener.ora file:

(SID_DESC =
         (SID_NAME=pg4mqs92)
         (ORACLE_HOME=/oracle/app/oracle/product/pg4mqs92)
         (PROGRAM=pg4mqs92drv)
)

Refer to Oracle9i Net Services Administrator's Guide and Oracle9i Net Services Reference Guide for more information about changing listener.ora

Step 2: Stop and start the TNS listener for the gateway

The TNS listener must be started or reloaded to initiate the new settings.


Note:

If you already have a TNS listener up and running on the Oracle integrating server where the gateway is installed, then you may want to make changes to your existing listener.ora and tnsnames.ora files.  After making the changes, you can reload the changes by running the "reload" subcommand in the "lsnrctl" utility without shutting down the TNS listener.

Refer to the Entry of Oracle Net Addresses for the TNS Listener after "Step 1: Configure the Oracle Net TNS listener for the gateway"


  • Set the gateway directory name:

    If you are using the Bourne or Korn shell, then enter:

    $ ORACLE_HOME=gateway_directory;export ORACLE_HOME
    
    

    If you have the C shell, then enter:

    $ setenv ORACLE_HOME gateway_directory
    
    

    where gateway_directory specifies the directory where the gateway software is installed.

  • If the listener is already running, then use the lsnrctl command to reload the listener with the new settings:

    $ cd $ORACLE_HOME/bin
    $ ./lsnrctl reload your_listener_name
    
    

    where ORACLE_HOME specifies the directory where the gateway software is installed.

  • Check the status of the listener with the new settings:

    $ ./lsnrctl status your_listener_name
    
    

    The following is an example of output from a lsnrctl status check:

Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=ORAIPC))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Solaris: version 9.2.0.1.0 - Production
Start Date                21-AUG-99 18:16:10
Uptime                    0 days 0 hr. 2 min. 19 sec
Trace Level               off
Security                  OFF
SNMP                      OFF
Listener Parameter File   /oracle/app/oracle/product/pg4mqs901/network/admin/listener.ora
Listener Log File         /oracle/app/oracle/product/pg4mqs901/network/log/listener.log
Services Summary...
  pg4mqs90            has 1 service handler(s)
The command completed successfully

In the example above, pg4mqs90 is the default SID value that was assigned during installation.  You can use any valid ID for the SID, or keep the default.


Note:

You must use the same SID value in the tnsnames.ora file, the listener.ora file, and the GATEWAY_SID environment variable in the gateway boot file for each gateway instance being configured.

Configuring Oracle Net for the Oracle Integrating Server

Any Oracle application that has access to an Oracle integrating server can also access MQSeries through the gateway.  Before you use the gateway to access MQSeries, you must configure the Oracle integrating server so that it can communicate with the gateway over Oracle Net.  To configure the server, add connect descriptors to the tnsnames.ora file.

Any Oracle integrating server that accesses the gateway needs a service name entry or a connect descriptor name entry in its tnsnames.ora file to tell the Oracle integrating server how to make connections.  This file, by default, is located in the directory ORACLE_HOME/network/admin, where ORACLE_HOME is the directory in which the Oracle integrating server is installed.  The tnsnames.ora file is required by the Oracle integrating server that is accessing the gateway, not by the gateway itself.  Refer to Oracle9i Net Services Administrator's Guide and Oracle9i Net Services Reference Guide for more information about changing tnsnames.ora. Refer to "Configuration Overview" and Figure 7-1, "Gateway Communication" and to "Configuring the Gateway".

Using Gateway Default Values

The Oracle Universal Installer creates and pre-configures a tnsnames.ora file in the directory ORACLE_HOME/network/admin, where ORACLE_HOME is the directory where the gateway software is installed.  If you use the default values configured for you, and if you do not need to configure for additional gateway instances, then the contents of this file can be appended to the tnsnames.ora file of each Oracle integrating server that accesses the gateway. 

Changing Gateway Default Values

If you need to change some of the default settings, use the examples in this section to guide you. 

TCP/IP Example

An Oracle integrating server accesses the gateway using Oracle Net and the TCP/IP protocol adapter.  The syntax of the connect descriptor entry in tnsnames.ora is:

tns_name_entry=
  (DESCRIPTION=
     (ADDRESS=
          (PROTOCOL=TCP)
          (HOST=host_name)
          (PORT=port_number)
     )
     (CONNECT_DATA=
     (SID=gateway_sid)
     )
     (HS=OK)
) 

where:

tns_name_entry is the tns_name_entry of the CREATE DATABASE LINK statement.  Refer to "Creating Database Links" for more information.
TCP specifies that the protocol used for connections is TCP/IP.
port_number matches the port number used by the Oracle Net TNS listener that is listening for the gateway.  The TNS listener's port number can be found in the listener.ora file that is used by the TNS listener.  Refer to "Entry of Oracle Net Addresses for the TNS Listener".
host_name specifies the computer on which the gateway is running.  The TNS listener's host name can be found in the listener.ora file used by the TNS listener that is listening for the gateway.  Refer to "Entry of Oracle Net Addresses for the TNS Listener".
gateway_sid specifies the SID of the gateway and matches the SID specified in the listener.ora file of the TNS listener that is listening for the gateway.

IPC Example

An Oracle integrating server accesses the gateway using Oracle Net and the IPC protocol adapter.  The syntax of the connect descriptor entry in tnsnames.ora is:

tns_name_entry=
    (DESCRIPTION=
        (ADDRESS=
        (PROTOCOL=IPC)
        (KEY=key_name)
    )
    (CONNECT_DATA=
        (SID=gateway_sid)
    )
     (HS=OK)
  ) 

where:

tns_name_entry is the tns_name_entry of the CREATE DATABASE LINK statement.  Refer to "Creating Database Links" for more information.
IPC specifies that the protocol used for connections is IPC.
key_name is the service name.
gateway_sid specifies the SID of the gateway and matches the SID specified in the listener.ora file of the TNS listener that is listening for the gateway.

Creating a Transaction Log Queue

When the TRANSACTION_MODEL parameter in the gateway initialization file is set to COMMIT_CONFIRM to allow for distributed transactions, then an additional configuration step is required to:

Refer to "Commit-Confirm" for more information about the commit-confirm transaction model and Appendix C, " Gateway Initialization Parameters" for information about TRANSACTION_LOG_QUEUE, TRANSACTION_RECOVERY_USER, and TRANSACTION_RECOVERY_PASSWORD.  Refer to IBM publications for information about creating and configuring a queue.

For the gateway to recover distributed transactions, a recovery account and queue must be set up in the queue manager by the MQSeries system administrator.  The user name of the account must be a valid MQSeries user which has authorization to access the recovery queue.  Refer to "Authorization for MQSeries Objects" for more information about access privileges.

The gateway uses the recovery queue to check the status of failed transactions that were started at the queue manager by the gateway and were logged in this queue.  The information in this queue is vital to the recovery process and must not be used, accessed, or updated except by the gateway.

Administering Database Links

A connection to the gateway is established through a database link when it is first used in an Oracle session.  In this context, "connection" refers to the connection between the Oracle integrating server and the gateway.  The connection remains established until the Oracle session ends.  Another session or user can access the same database link and get a distinct connection to the gateway and the queue manager.

Database links are active for the duration of a gateway session.  To close a database link during a session, use the ALTER SESSION statement.  For more information about using database links, refer to the Oracle9i Database Administrator's Guide.

Creating Database Links

To create a database link, use the CREATE DATABASE LINK statement.  The USING clause points to a connect descriptor in the tnsnames.ora file.

The CONNECT TO clause specifies the MQSeries user ID and password when the security model is defined as STRICT with the AUTHORIZATION_MODEL parameter.  If you do not include the CONNECT TO clause, then the current user ID and password are used.

When the AUTHORIZATION_MODEL parameter is set to RELAXED, you do not specify a user ID and password because the Oracle integrating server uses the user ID and password of the user who started the TNS listener for the gateway.  If you attempt to specify a user ID and password with the CONNECT TO clause, then the Oracle integrating server and gateway ignore those values.  Refer to " Security Models" for more information.

The syntax of CREATE DATABASE LINK is:

CREATE [PUBLIC] DATABASE LINK dblink [CONNECT TO userid IDENTIFIED
              BY password] USING 'tns_name_entry';

where:

dblink is the database link name.
userid is the user ID used to establish a session at the queue manager.  It is only used when AUTHORIZATION_MODEL is set to STRICT in the initsid.ora file.  The user ID must be authorized:

to access all MQSeries objects referenced in the PL/SQL commands

to use any database object referenced in the PL/SQL commands. 

The userid must be in the password file on the computer where MQSeries and the gateway are installed.  Or, the userid must be published in the UNIX Network Information Service (NIS) when MQSeries and the gateway are installed on different computers.  If userid contains lowercase letters or non-alphanumeric characters, then surround userid with double quote characters (").  Refer to your MQSeries documentation for more information about userid

password is the password used to establish a session at the queue manager.  It is only used when AUTHORIZATION_MODEL is set to STRICT in the initsid.oraora file.

The password must be in the password file on the computer where MQSeries and the gateway are installed.  Or, the password must be published in the UNIX Network Information Service (NIS) when MQSeries and the gateway are installed on different computers. 

If password contains lowercase letters or non-alphanumeric characters, then surround password with double quote characters (").

tns_name_entry is the Oracle Net TNS connect descriptor name specified in the tnsnames.ora file.

Dropping Database Links

You can drop a database link with the DROP DATABASE LINK statement.  For example, to drop the database link named dblink, enter:

DROP [PUBLIC] DATABASE LINK dblink;

A database link should not be dropped if it is still required to resolve an in-doubt distributed transaction.  Refer to the Oracle9i Database Administrator's Guide for more information about dropping database links.

Examining Available Database Links

The data dictionary of each database stores the definitions of all the database links in that database.  The USER_DB_LINKS view shows the database links that are defined for a user.  The ALL_DB_LINKS data dictionary views show all defined database links. 

Limiting the Number of Active Database Links

You can limit the number of connections from a user process to remote databases with the parameter OPEN_LINKS.  This parameter controls the number of remote connections that any single user process can use with a single user session.  Refer to the Oracle9i Database Administrator's Guide for more information about limiting the number of active database links.

Installing the Visual Workbench Repository

Install the Visual Workbench repository following the steps in this section.

You may skip installing the Visual Workbench Repository if you do not plan to use the Visual Workbench or if you are preparing your production Oracle server where you do not need a Visual Workbench Repository, but instead need a PG4MQ deployment.  Refer to the "Preparing the Production Oracle Server" for the details.

Preinstallation Tasks

Step 1: Choose a repository server

A repository server is an Oracle integrating server on which the Visual Workbench repository is installed. 

Step 2: Locate the installation scripts

The Visual Workbench repository installation scripts are installed with the Visual Workbench.  If the repository is to be installed on the same computer as Visual Workbench, then your repository server already has all the required installation scripts.  Proceed to step 3.

  1. Create a directory on the repository server that is to be the script directory.  For example:

    $ mkdir $ORACLE_HOME/pg4mqseries/admin/repo
    $ chmod 777 $ORACLE_HOME/pg4mqseries/admin/repo
    
    
  2. Use a file transfer program to transfer the repository zip file (reposXXX.zip, where XXX is the release number) or move all script files with the suffix .sql from the script file directory (NT=%ORACLE_HOME%\pg4mqvwb\server\admin) on the Visual Workbench computer to the script file directory on the repository server computer.

Step 3: Ensure the UTL_RAW package is installed

All data mapping packages generated by the Visual Workbench use the UTL_RAW package, which provides routines for manipulating raw data.

From SQL*Plus, as user SYS, issue the following statement:

SQL> DESCRIBE UTL_RAW

If the DESCRIBE statement is successful, then your repository server already has UTL_RAW installed, and you can proceed to step 4. 

If the DESCRIBE statement fails, then install UTL_RAW:

From SQL*Plus, as user SYS, run the utlraw.sql and prvtrawb.plb scripts that are in directory ORACLE_HOME/rdbms/admin.  You must run the utlraw.sql script first. 

SQL> @utlraw.sql
SQL> @prvtrawb.plb

Step 4: Ensure the DBMS_OUTPUT package is enabled

The sample programs and installation verification programs on the distribution CD-ROM use the standard DBMS_OUTPUT package.

From SQL*Plus, as user SYS, issue the following statement:

SQL> DESCRIBE DBMS_OUTPUT

If the DESCRIBE statement is successful, then your repository server has DBMS_OUTPUT installed, and you can proceed to Step 5.

If the DESCRIBE statement fails, then install DBMS_OUTPUT.  Refer to your Oracle server DBA.

Step 5: Create a database link

Create a database link on your Oracle Production System Server to access the Oracle Procedural GatewayÒ for IBM MQSeries

If you do not already have a database link, then refer to "Administering Database Links" for more information on creating database links.

Visual Workbench Repository Installation Tasks

Use pgvwbrepos9.sql to install the Visual Workbench Repository on Oracle9i.  To run pgvwbrepos9.sql, ensure you are currently in directory ORACLE_HOME/pg4mqseries/admin/repo, and then enter:

sqlplus /nolog @pgvwbrepos9.sql


Note:

If you are installing the Visual Workbench Repository on Oracle8i or prior, then you need to use pgvwbrepos8.sql. All of the examples in this section are provided with the assumption that you are installing on Oracle9i.

The script takes you through the following steps:

Step 1: Enter the database connection information

Use the default of LOCAL by pressing Return.

Next you are prompted to enter the passwords for the SYSTEM and SYS accounts of the Oracle integrating server.  Press Return after entering each password.

The script stops if any of the information is incorrect.  Verify the information before rerunning the script.

Step 2: Check for existing Workbench Repository

The script checks for an existing Visual Workbench repository and for the data dictionary.  If neither one is found, the script proceeds to Step 3 below.

If the data dictionary exists, then the script stops.  Choose another Oracle integrating server and rerun the script, starting at "Step 1: Choose a repository server ".

If a Visual Workbench repository exists, then the script gives you the following options:

A.  Upgrade the existing private repository to public status and proceed to Step 3 below.

B.  Replace the existing repository with the new private repository and proceed to Step 3 below.

C.  Stop the script.

Step 3: Check for required PL/SQL packages

The script checks for the existence of UTL_RAW, DBMS_OUTPUT, and DBMS_PIPE in the Oracle integrating server.  If this software exists, then the script proceeds to Step 4 below.

The script stops if this software does not exist.  Refer to your Oracle integrating server DBA about the missing software.  After the software is installed, rerun the script.

Step 4: Install the UTL_PG package

The script checks for the existence of the UTL_PG package.  If it does not exist, then the UTL_PG package is installed.  The script proceeds to Step 5 below.

If UTL_PG exists, then you are prompted to reinstall it.  Press Return to reinstall UTL_PG.

Step 5: Create the admin user and all repository tables

This step creates the administrative user for the Visual Workbench repository as PGMADMIN with an initial password of PGMADMIN.  This user owns all objects in the repository. 

After this step, a private Visual Workbench repository, which includes the PGM_SUPPGM_BQM, and PGM_UTL8 packages, is created in the Oracle integrating server, which only the user PGMADMIN can access.

Step 6: Create public synonyms and development roles

This is an optional step to change the private access privileges of the Visual Workbench repository.  The private status allows only the PGMADMIN user to have access to the repository.  If you enter N and press Return, then the repository retains its private status.

A public status allows the granting of access privileges to other users besides PGMADMIN.  If you want to give the repository public status, then enter Y and press Return.

After the Repository is Created

After creating the Visual Workbench repository, there is one optional step:

Grant development privileges for the Visual Workbench repository to users.

To allow users other than PGMADMIN to perform development operations on the Visual Workbench repository, PGMADMIN must grant them the necessary privileges.  To do this, perform the following:

  • Ensure the repository has a public status.  It has this status if you created it by using Steps 1 through 6 of the pgvwbrepos9.sql script.  If you did not use Step 6, then rerun the script.  When you get to Step 2 of the script, enter "A" to the prompt to upgrade the private repository to public status.

  • Use SQL*Plus to connect to the repository as user PGMADMIN and grant the PGMDEV role to each user.  For example:

    SQL> GRANT PGMDEV TO SCOTT;
    
    

Deinstall the Visual Workbench Repository

To deinstall a Visual Workbench repository on Oracle9i, use the repository script pgvwbremove9.sql.  To run this script, ensure that you are currently under the Oracle integrating server directory ORACLE_HOME/pg4mqseries/admin/repo (where you copied the scripts), and then enter:

sqlplus /nolog @pgvwbremove9.sql


Note:

If you are deinstalling the Visual Workbench Repository on Oracle8i or prior, then you need to use pgvwbremove8.sql. All of the examples in this section are provided with the assumption that you are installing on Oracle9i.

The script takes you through the following steps:

Step 1: Enter the database connection information

Use the default of LOCAL by pressing Return.

Next you are prompted to enter the passwords for the SYSTEM, SYS, and PGMADMIN accounts of the Oracle integrating server.  Press Return after entering each password.

The script stops if any of the information is incorrect.  Verify the information before rerunning the script.

Step 2: Check for existing Workbench repository

Enter "Y" and press Return for the prompt to remove public synonyms and development roles.  This returns the repository to private status.  You can exit the script now by entering "N" and pressing Return, or you can proceed to the next prompt under this step.

If you are certain you want to remove the private repository, then enter "Y" and press Return.  The script removes all repository tables and related packages.

Preparing the Production Oracle Server

These preparations include preparing, installing, and removing PL/SQL packages.

Introduction

Before you can compile MIPs on a production Oracle server, the following PL/SQL packages must be present on the production Oracle server:

  • DBMS_PIPE, DBMS_OUTPUT, and UTL_RAW

    These packages are shipped with each Oracle server and are usually already installed.

  • PGM8, PGM_BQM, PGM_SUP, and UTL_PG

    These packages are shipped with your Oracle Procedural Gateway for message queuing.  They are installed during the creation process of the Visual Workbench repository.  Do not execute deployment script on the Oracle server with an installed Visual Workbench repository.  If the Oracle server used for the repository is different  than the Oracle server used in the production environment, you must install these packages on the production Oracle server.

This section describes how to run:

  • pgmdeploy9.sql, a deployment script to verify the existence of the required PL/SQL packages and install some of them if they do not exist on the production Oracle server

  • pgmundeploy9.sql, a script to remove the PL/SQL packages from a production Oracle server


    Note:

    If your production Oracle server is Oracle8i or prior, you need to use pgmdeploy8.sql to install Oracle9i PG4MQ deployment packages, and you need to use pgmundeploy8.sql to remove Oracle9i PG4MQ deployment packages.

    All of the examples in this section are provided with the assumption that you are installing on Oracle9i.


Verifying and Installing PL/SQL Packages

  1. Locate the necessary scripts:

    • pgm8.sql

    • pgmbqm8.sql

    • pgmdeploy8.sql

    • pgmdeploy9.sql

    • pgmsup8.sql

    • pgmundeploy8.sql

    • pgmundeploy9.sql

    • prvtpg.sql

    • utlpg.sql


    Note:

    pgm8.sql and other script names contain numbers such as 8 and 9. These numbers are not product version numbers.

    These scripts are installed with the gateway, in the directory ORACLE_HOME/pg4mqseries/admin/deploy, where ORACLE_HOME is the gateway home directory. 

  2. If your production Oracle server is on a different computer than the gateway, you need to use a file transfer method, such as ftp, to transfer files in the directory ORACLE_HOME/pg4mqseries/admin/deploy, where ORACLE_HOME is the gateway home directory on your gateway computer.  On your production Oracle server computer, change directory to the directory containing the deployment scripts you just transferred and skip to step 4.

  3. If your production Oracle server is on the same computer as the gateway, then change directory to ORACLE_HOME/pg4mqseries/admin/deploy, where ORACLE_HOME is the gateway home directory.

  4. Run the deployment script by entering:

    $ sqlplus /nolog @pgmdeploy9.sql
    
    
  5. At the script prompt: Enter the connect string for the Oracle server... [LOCAL], press [Return] to use the default of LOCAL.

  6. At the script prompt Enter the following required Oracle server password, enter the password of the SYS account.

After the script verifies the SYS account password, it connects to the production Oracle server.  The script verifies and reports on which PL/SQL packages are installed there:

  • If any of the Oracle server packages DBMS_OUTPUT, DBMS_PIPE or UTL_RAW are missing, the script stops.  Have your DBA install the missing packages and re-run the deployment script.

  • If any of the Oracle packages PGM8, PGM_BQM, PGM_SUP, and UTL_PG are missing, the script installs them on the production Oracle server.

Removing the PL/SQL Packages

You can remove the PL/SQL packages that were installed by the pgmdeploy9.sql script if, for example, none of your applications in the production environment uses a MIP.  To remove these packages, perform the following steps:

  1. On your production Oracle server computer, change directory to the directory containing the deployment scripts by entering the following command:

    $ cd $ORACLE_HOME/pg4mqseries/admin/deploy 
    
    
  2. Run the script by entering:

    $ sqlplus /nolog @pgmundeploy9.sql
    
    
  3. At the script prompt: Enter the connect string for the Oracle server... [LOCAL], press [Return] to use the default of LOCAL.

  4. At the script prompt, enter the required Oracle server passwords, enter the password of the SYS account.

After the script verifies the SYS account password, it connects to the production Oracle server and removes the packages installed by the pgmdeploy9.sql script.

After the pgmundeploy9.sql script completes successfully, applications on the production Oracle server fail if they attempt to reference any of the MIPs that are compiled there.


Previous Next
Oracle Logo
Copyright © 2001, 2002 Oracle Corporation

All rights reserved
Go To Table Of Contents
Contents
Go To Index
Index