Oracle COM Automation Feature Developer's Guide Release 9.2 Part Number A95499-01 |
|
This chapter provides an overview of the Oracle COM Automation installation and post-installation configuration tasks.
This chapter contains these topics:
The Oracle COM Automation Feature package is included as part of your Oracle installation. It contains the features and demos that illustrate how to use this product to solve real-world problems.
See Also:
The Oracle9i Database Installation Guide for Windows for installation instructions |
The COM Automation package includes the following PL/SQL and Java components:
orawpcom.dll
)comwrap.sql
)comus.msb)
Oracle COM Automation PL/SQL feature orawpcom.dll
is located in the ORACLE_BASE\ORACLE_HOME
\bin
directory.
All other components are located in the ORACLE_BASE\ORACLE_HOME
\com
directory.
orawcom.jar
orawcom.dll
)Oracle COM Automation Java feature orawcom.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.
Note the following system requirements.
The demonstrations and installations are discussed in "Overview of PL/SQL Demos" and "Oracle COM Automation Feature Java Demos Overview".
For this release, Oracle has renamed com81.dll
to orawpcom.dll
. If you are migrating from Oracle 8i, you must re-run comwrap.sql
to continue using Oracle COM Automation Feature for PL/SQL.
See Also:
"Configuring Oracle COM Automation Feature for PL/SQL" for information on re-running |
Configuration procedures differ for PL/SQL and for Java.
To configure Oracle COM Automation Feature for PL/SQL:
SYSTEM
.SQL> CONNECT SYSTEM/password@net_service_name
CREATE LIBRARY
privilege to the database users that will use Oracle COM Automation Feature. For example:SQL> GRANT CREATE LIBRARY TO hr;
comwrap.sql
script at the SQL*Plus prompt:SQL> CONNECT hr/hr; SQL> @ORACLE_BASE\ORACLE_HOME\com\comwrap.sql
where 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 normal.
To configure Oracle COM Automation Feature for Java:
SQL> CONNECT SYSTEM/password@net_service_name
grant.sql
with the name of the user that will be using COM Automation. You may need to capitalize all the letters in the user's name. For example:SQL> @ORACLE_BASE\ORACLE_HOME\com\java\grant.sql HR
loadjava
on the command prompt as follows:loadjava -force -resolve -user hr/hr
ORACLE_BASE\ORACLE_HOME\com\java\orawcom.jar
where hr
is the user that uses Oracle COM Automation Feature.
See Also:
Oracle9i Java Developer's Guide for further information on the |
When using Oracle COM Automation Feature for PL/SQL, there are specific requirements for the listener.ora and tnsnames.ora files that are described in this section.
For Oracle COM Automation Feature for Java, no special modifications to these files are required.
Because Oracle COM Automation Feature for PL/SQL relies on external procedure 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 inter-process communication (IPC) to invoke external stored procedures.
See Also:
Oracle9i Net Services Administrator's Guide for additional information on configuring the |
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)
EXTPROC_CONNECTION_DATA=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=IPC)
(KEY=EXTPROC0)
)
(CONNECT_DATA=SID=plsextproc)
)
)
An "ORA-28575: unable to open RPC connection to external procedure agent" error message indicates one of two possible listener problems.
Problem: The listener is not started.
Action: You must start the Oracle
HOME_NAMETNS
Listener
service from the Control Panel or the command prompt.
To start Oracle services from the Control Panel:
The Control Panel window appears.
The Services dialog box appears.
Oracle
HOME_NAMETNS
Listener
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 to start an Oracle service at the command prompt:
C:\> net start service
where service is a specific service name, such as Oracle
HOME_NAMETNS
Listener
.
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 on how to configure these files |
Oracle COM Automation feature supports the use of Distributed Component Object Model (DCOM) to access remote COM objects over a network.
In order 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, "Services That Determine Security Credentials" indicates the determining service for COM Automation for PL/SQL and Java.
COM Automation Feature for... | Is Determined by This Service |
---|---|
PL/SQL |
listener |
Java |
Oracle database service |
In order to use DCOM, you must configure security settings on the following:
The configuration for the computer running the database instance requires setting the listener and the database service to the same 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:
Oracle
HOME_NAMETNS
Listener
or the database service.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:
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.
|
Copyright © 1999, 2002 Oracle Corporation. All Rights Reserved. |
|