Skip Headers
Oracle® COM Automation Feature Developer's Guide
11g Release 1 (11.1)

B31223-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

2 Installing and Configuring Oracle COM Automation Feature

This chapter provides an overview of the Oracle COM Automation Feature installation and postinstallation configuration tasks.

This chapter contains these topics:

Oracle COM Automation Feature Components

The Oracle COM Automation Feature package is included as part of the Oracle installation. It contains the features and demos that illustrate how to use this product to solve real-world problems.

See Also:

Oracle Database Installation Guide for Microsoft Windows for installation instructions

The COM Automation package includes the following PL/SQL and Java components:

PL/SQL Components

The PL/SQL components for Oracle COM Automation Feature are:

  • Oracle COM Automation Feature PL/SQL (orawpcomVER.dll)

  • PL/SQL installation and definition script (comwrap.sql)

  • Oracle COM Automation demonstration programs

  • Message files (such as comus.msb)

Oracle COM Automation PL/SQL feature orawpcomVER.dll is located in the ORACLE_BASE\ORACLE_HOME\bin directory.

All other components are located in the ORACLE_BASE\ORACLE_HOME\com directory.

Java Components

The Java components for Oracle COM Automation Feature are:

  • The JAR file, orawcom.jar

  • Oracle COM Automation Feature Java (orawcomVER.dll)

  • Oracle COM Automation demonstration programs

  • The grant.sql script file

Oracle COM Automation Java feature orawcomVER.dll is located in the ORACLE_BASE\ORACLE_HOME\bin directory. All other components are located in the ORACLE_BASE\ORACLE_HOME\com\java directory.

System Requirements

Oracle COM Automation Feature requires:

Note that you need to have a COM Automation server in the system to use Oracle COM Automation Feature. For example, the COM Automation Feature demos require that you first install the applications that are used in the demonstration programs:

The demonstrations and installations are discussed in "Overview of Oracle COM Automation Feature for PL/SQL Demos" and "Overview of Oracle COM Automation Feature for Java Demos".

Upgrading from Oracle Database 10g to Oracle Database 11g Release 1

To upgrade Oracle COM Automation Feature from Oracle Database 10g Release 1 to Oracle Database 11g Release 1, do the following:

  1. Rerun the comwrap.sql script.

  2. Reinstall Java classes.

  3. Run the grant.sql script.

  4. Reinstall demos.

Upgrading from Oracle9i to Oracle Database 10g

For this release, the right to execute orawcom.dll to PUBLIC, which was granted for Oracle9i must be revoked.

Note:

In Oracle Database 10g, orawcom.dll is renamed to orawcomVER.dll where VER is the release version.

To upgrade Oracle COM Automation Feature from Oracle9i to Oracle Database 10g, do the following:

  1. Rerun the comwrap.sql script.

  2. Reinstall Java classes.

  3. Revoke the right to execute orawcom.dll from PUBLIC.

  4. Run the grant.sql script.

  5. Reinstall demos.

    See Also:

    "Configuring Oracle COM Automation Feature for PL/SQL" for information about rerunning the comwrap.sql script

Configurations for Oracle COM Automation Feature

Configuration procedures differ for PL/SQL and Java asexplained in the following sections:

Configuring Oracle COM Automation Feature for PL/SQL

To configure Oracle COM Automation Feature for PL/SQL:

  1. Start SQL*Plus.

  2. Connect to the database as SYSTEM.

    SQL> CONNECT SYSTEM@net_service_name
    Enter password: password
    
    
  3. Grant the CREATE LIBRARY privilege to the database users who will use Oracle COM Automation Feature. For example:

    SQL> GRANT CREATE LIBRARY TO hr;
    
    
  4. Connect to the user who will use Oracle COM Automation Feature, and run the comwrap.sql script at the SQL*Plus prompt:

    SQL> CONNECT hr;
    Enter password: password
    SQL> @ORACLE_BASE\ORACLE_HOME\com\comwrap.sql
    
    

    In the preceding command, ORACLE_BASE\ORACLE_HOME represents the Oracle home directory where Oracle COM Automation Feature is installed.

    You will receive several ORA-04043: object XXXX does not exist messages when you run this script for the first time. These messages are usual.

Configuring Oracle COM Automation Feature for Java

Perform the following to configure Oracle COM Automation Feature for Java:

  1. Connect to the database as SYSTEM using SQL*Plus. For example:

    SQL> CONNECT SYSTEM@net_service_name
    Enter password: password
    
    
  2. Run the grant.sql script with the name of the user who will be using Oracle COM Automation Feature. You may need to capitalize all letters in the user's name. For example:

    SQL> @ORACLE_BASE\ORACLE_HOME\com\java\grant.sql HR
    
    
  3. Run the loadjava tool at the command prompt as follows:

    loadjava -force -resolve -user hr         ORACLE_BASE\ORACLE_HOME\com\java\orawcom.jar
    Password: password
    
    

    In the preceding command, hr is the user who uses Oracle COM Automation Feature.

    See Also:

    Oracle Database Java Developer's Guide for further information about the loadjava tool

Configuring the Listener for PL/SQL

This section describes the specific configurations for the listener.ora and tnsnames.ora files when used with Oracle COM Automation Feature for PL/SQL.

Note:

Oracle COM Automation Feature for Java needs no special modifications to the listener.ora and tnsnames.ora files.

Because Oracle COM Automation Feature for PL/SQL relies on listener callouts, you must configure the listener and Oracle Net remote procedure call (RPC) mechanism for the feature to work.

The following are examples of listener.ora and tnsnames.ora files that can be used with interprocess communication (IPC) to invoke external stored procedures.

See Also:

Oracle Database Net Services Administrator's Guide for additional information about configuring the listener.ora and tnsnames.ora files for external procedures

listener.ora Configuration File

LISTENER =
        (ADDRESS_LIST =
        (ADDRESS=
          (PROTOCOL= IPC)
          (KEY= EXTPROC0)
        )
        )
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = off
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = ORCL)
    )
    (SID_DESC =
      (SID_NAME = plsextproc)
      (PROGRAM=extproc)
    )
  )
PASSWORDS_LISTENER = (oracle)

tnsnames.ora Configuration File

EXTPROC_CONNECTION_DATA=
  (DESCRIPTION=
    (ADDRESS=
        (PROTOCOL=IPC)
        (KEY=EXTPROC0)
    )
    (CONNECT_DATA=(SID=plsextproc))
    )
  )

Troubleshooting Listener Problems

An "ORA-28575: unable to open RPC connection to external procedure agent" error message indicates one of two possible listener problems.

Problem 1

Problem: The listener is not started.

Action: You must start the OracleHOME_NAMETNSListener service from the Control Panel or the command prompt.

To start Oracle services from the Control Panel:

  1. Choose Start, Settings, and then Control Panel.

    The Control Panel window appears.

  2. Double-click Services.

    The Services dialog box appears.

  3. Go to OracleHOME_NAMETNSListener in the list and verify that it has a status of Started. If it does not, select it and click Start.

To start Oracle services from the command prompt:

Enter the following command:

C:\> net start service

In the preceding command, service is a specific service name, such as OracleHOME_NAMETNSListener.

Problem 2

Problem: The listener is not configured correctly.

Action: You must modify the listener.ora and tnsnames.ora files.

See Also:

"Configuring the Listener for PL/SQL" for information about how to configure these files

Support for DCOM

Oracle COM Automation Feature supports the use of Distributed Component Object Model (DCOM) to access remote Component Object Model (COM) objects over a network.

To authenticate the client's access to the remote computer, DCOM passes the appropriate security credentials to the remote computer. The remote computer validates the security credentials and allows DCOM to proceed.

These security credentials are based on the domain user's privileges associated with either the client's listener service or database service. Table 2-1 indicates the determining service for COM Automation for PL/SQL and Java.

Table 2-1 Services That Determine Security Credentials

COM Automation Feature for... Is Determined by This Service

PL/SQL

Listener

Java

Oracle database service


Configuring the Computer for DCOM

To use DCOM, you must configure security settings on the following:

Configurations for the Computer Running the Database Instance

The configuration for the computer running the database instance requires setting the listener and the database service to the same domain user.

Setting Services to a Domain User

In this procedure for setting a service to a domain user, the service to be set is selected in Step 3.

You must follow this procedure twice, once to set the listener and once to set the database service. The order is unimportant.

To set a service to a domain user:

  1. Choose Start, Settings, and then Control Panel. The Control Panel window appears.

  2. Double-click Services. The Services dialog box appears.

  3. Select the service and click Startup. The service should be either OracleHOME_NAMETNSListener or the database service.

  4. Select the This Account option.

  5. Enter the name or browse for a domain user.

  6. Enter and confirm the password of the selected domain user.

  7. Click OK to save the changes.

Configuring the Computer Containing the Remote Object

Configuring the computer containing the remote object requires using the dcomcnfg.exe tool provided by Microsoft to configure the computer's DCOM security settings.

This tool enables you to set the access permissions, launch permissions, and configuration permissions for a specific COM object or all COM objects on a computer.

Using the dcomcnfg.exe tool, set the following:

  1. Set the DCOM security privileges so that the appropriate service (that is, listener for PL/SQL and database service for Java), operating as a domain user, has sufficient privileges to instantiate and manipulate the remote COM object.

  2. Set the remote COM object to execute with the same privileges as the service.

If the COM object attempts to perform an action for which it does not have permission, DCOM denies the operation and returns a security violation to Oracle COM Automation Feature. It is essential that you configure the DCOM security properly and provide the Oracle Database with the necessary permissions.

See Also:

Microsoft documentation for more information aboutv:
  • Using the dcomcnfg.exe tool and the implications of the related permissions

  • Setting up the client and server computers to use DCOM