You are on page 1of 15

Purpose

=======
Installation and configuration instructions for Oracle Connection Manager
v3.0.x.

V3.0.x is bundled with Oracle8 Enterprise Edition (formerly called


Oracle Universal Server). Connection Manager is not part of Oracle8,
our workgroup server.

Scope & Application


===================
Informational

How to Install
--------------

Three executables will be installed.

On Unix and VMS the executables are

CMGW, CMADMIN, and CMCTL.

On the desktop platforms the executables are named CMGW80, CMADM80, and,
CMCTL80
for Oracle8 and CMGW, CMADMIN, and CMCTL for Oracle 8i.

CMGW/CMGW80
This gateway process acts as the hub of the Connection Manager.

The function

of CMGW is to:
- register with CMADMIN
- listen for incoming SQL*Net 2.x or NET 8.x connection requests
By default it listens on port 1610.
- initiate connection requests to NET 8.x listeners for clients
- relay data between the client and server
- answer requests initiated by CMCTL/CMCTL80

CMADMIN/CMADM80
This is a multi-threaded process that is responsible for all administrative
issues of the Connection Manager.

Its primary function is to maintain address

information in the Oracle Names Server for the SQL*Net 2.x and NET 8.x
clients.

Other responsibilities include:

- processing the CMGW/CMGW80 registration


- locate the local Oracle Names Server
- identify all listeners serving at least one database instance
- register address information about the CMGW/CMGW80 and listeners
- monitor changes in the network and update the Names Server
- answer requests initiated by CMCTL/CMCTL80.

Communication between CMGW, CMADMIN/CMGW80, and CMADM80 is done via IPC.

The

CMAN periodically goes to the Names Server to update its cache of available
services.

CMCTL/CMCTL80
This utility provides administrative access to CMADM/CMADM80 and CMGW/CMGW80.

Commands currently supported are start, stop, status, and version.

CMCTL START [CMAN | CM | ADM]


This command starts up the Connection Manager, or one of its components.
- no argument or CMAN means both the gateway and administration process start
- CM means only the gateway process will be started.
- ADM means only the administration process will be started.

CMCTL STOP [CM]


This command stops the Connection Manager processes.
- no argument or CM means both the gateway and administration processes stop
NOTE: The administration process stops automatically when the gateway process
terminates.

CMAN cannot be stopped if there are connections currently going through it.

CMCTL STATUS [CMAN | CM | ADM]


This command provides the status of the Connection Manager components.
- no argument, CMAN, or CM provides the status of the gateway process.
- ADM provides the status of the administration process.

CMCTL VERSION
This command provides the version number of the control utility.

The version

of CMGW/CMGW80 and CMADM/CMADM80 are provided with the status command.

Configuration
------------The clients require tnsnames.ora or Oracle Names Server, the Connection
Manager requires a cman.ora, and the server requires MTS setup in the
init.ora.

Client Configuration
-------------------Example of a normal tnsnames.ora entry:

EXAMPLE=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=SERVER.US.ORACLE.COM)
(PORT=1521)
)
(CONNECT_DATA=
(SID=ORCL)
)
)

A tnsnames.ora entry set to use the Connection Manager with a single protocol:

EXAMPLE_CMAN=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=CMAN.US.ORACLE.COM)
(PORT=1610)
)
(ADDRESS=
(PROTOCOL=TCP)
(HOST=SERVER.US.ORACLE.COM)
(PORT=1521)
)
)
(CONNECT_DATA=
(SID=ORCL)
)
(SOURCE_ROUTE=YES)
)

The ADDRESS_LIST becomes the path.

The first address allows connection to the

CMAN, the second address is used by the CMAN to connect to the server.
can have multiple CMAN addresses in the ADDRESS_LIST if necessary.

You

The CMANs

basically act as routers, pointing the connection request to the next hop.

A tnsnames.ora entry setup to use the Connection Manager with multiple

protocols:

EXAMPLE_CMAN=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=
(PROTOCOL=SPX)
(SERVICE=CMAN)
(ADDRESS=
(PROTOCOL=TCP)
(HOST=SERVER.US.ORACLE.COM)
(PORT=1521)
)
)
(CONNECT_DATA=
(SID=ORCL)
)
(SOURCE_ROUTE=YES)
)

In this example, the client will use SPX to connect to the CMAN, then the CMAN
will use TCP/IP to connect to the server.

This is the same functionality that

was provided with the Oracle Multi-Protocol Interchange (MPI) of Oracle7.

If there is more than one route to the server, then use the DESCRIPTION_LIST
parameter introduced with SQL*Net 2.3.

An example tnsnames.ora using the

DESCRIPTION_LIST parameter:

EXAMPLE_ROUTES=
(DESCRIPTION_LIST=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=CMAN1.US.ORACLE.COM)
(PORT=1610)
)
(ADDRESS=
(PROTOCOL=TCP)
(HOST=SERVER.US.ORACLE.COM)
(PORT=1521)
)
)
(CONNECT_DATA=
(SID=ORCL)
)
(SOURCE_ROUTE=YES)
)
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=
(PROTOCOL=TCP)

(HOST=CMAN2.US.ORACLE.COM)
(PORT=1610)
)
(ADDRESS=
(PROTOCOL=TCP)
(HOST=SERVER.US.ORACLE.COM)
(PORT=1521)
)
)
(CONNECT_DATA=
(SID=ORCL)
)
(SOURCE_ROUTE=YES)
)

If using Oracle Names Server, the Connection Manager will automatically update
the addresses in the Names Server, inserting the address for the CMAN into the
existing address.

In the client SQLNET.ORA file the following parameter can be set:

USE_CMAN = [TRUE | FALSE]


- TRUE forces the client to connect to the destination through the CMAN using
a randomly picked indirect path (address list with at least one CMAN address).
- TRUE and no indirect paths in the description, then a randomly picked path

is used.
- FALSE or not defined, then a path is picked at random.

Connection Manager configuration


-------------------------------Configuration of CMAN requires one file, CMAN.ORA.

The CMAN.ORA consists of

three sections:
1) CMAN - contains the listening address for the Connection Manager.
2) CMAN_PROFILE - contains CMAN configuration parameters.
3) CMAN_RULES - contains the rules for filtering incoming connection requests.

CMAN=
(ADDRESS_LIST=
(ADDRESS=
(PROTOCOL=SPX)
(SERVICE=CMAN)
)
(ADDRESS=
(PROTOCOL=TCP)
(HOST=CMAN.US.ORACLE.COM)
(PORT=1610)
)
)

In this example the CMAN is listening on two addresses, SPX and TCP/IP.

The

CMAN can listen on any protocol that Oracle supports on the platform the CMAN
is running on.

CMAN_PROFILE=
(PARAMETER_LIST=
(MAXIMUM_RELAYS=64)
(LOG_LEVEL=0)
(TRACING=YES)
(RELAY_STATISTICS=YES)
(SHOW_TNS_INFO=NO)
(USE_ASYNC_CALL=YES)
(AUTHENTICATION_LEVEL=0)
)

Definition for each parameter:

MAXIMUM_RELAYS = n
- determines the maximum number of concurrent connections allowed
- default is 8
- maximum value allowed is 1024

LOG_LEVEL = n
- determines the level of logging performed by the CMAN
- default is 0, which means no logging is performed
- value of n can range from 0 to 4

TRACING = [YES | NO]


- YES turns on CMAN tracing to a file
- default is NO
NOTE:

Oracle Trace must be used to read the trace file.

RELAY_STATISTICS = [YES | NO]


- YES instructs the CMAN to maintain statistics pertaining to relay I/O
activities such as:
- number of IN bytes
- number of OUT bytes
- number of IN packets
- number of out packets
- default is NO

SHOW_TNS_INFO = [YES | NO]


- Yes instructs the CMAN to include TNS events in the log file
- default is NO

USE_ASYNC_CALL = [YES | NO]


- YES instructs the CMAN to use all asynchronous functions while in the
answering, accepting, or calling phase of establishing a connection
- default is NO
NOTE:

CMAN supports out-of-band breaks, it will forward it on to the server.

AUTHENTICATION_LEVEL = [0 | 1]
- 1 instructs the CMAN to reject connect requests that are not using Secure

Network Services. Secure Network Services is part of the Advanced Networking


Option.
- 0 is the default, which means Secure Network Services is not required

CMAN_RULES=
(RULE_LIST=
(RULE=
(SRC = shost)
(DST = dhost)
(SRV = services)
(ACT = accept | reject)
)
)

Definition of parameter fields for CMAN_RULES:


- shost is the source hostname or IP address of session request (client)
- dhost is the destination hostname or IP address (server)
- services is the SID name
- ACT: accept or reject the incoming requests based on the above three
parameters.

NOTE:

The wild-card is the 'x'.

In the case of the IP address (d.d.d.d), the

individual 'd's may be replaced with wild-card character 'x'.

Multiple RULEs can be defined within the RULE_LIST.


matched RULE are applied to the request.

The rules in the first

When CMAN_RULES exist, the

Connection Manager adheres to the principle "that which is not expressly


permitted is prohibited".

If the CMAN_RULES are not defined, then everything

is permitted.

Connection Manager Limitations


-----------------------------If more than one Connection Manager is used in the connection path (more than
1 hop), you must manually configure the tnsnames.ora and cannot use the Oracle
Names Server.

The Connection Manager can apply access control (CMAN_RULES) only in an TCP/IP
network.

Compatibility with Oracle Multi-Protocol Interchange (MPI)


---------------------------------------------------------If there is only one MPI between the client and the server, replace the MPI
with the Connection Manager. If there is more than one MPI between the client
and the server, modify the tnsnames.ora and replace the MPIs with Connection
Managers.

Compatibility with SQL*Net V2.x clients

--------------------------------------To use the Connection Manager as a concentrator or as a connection filter


between SQL*Net 2.x clients and Oracle 8, you will need to:
1) Install and configure the Connection Manager.
2) Configure SQL*Net v2.x clients to use the Connection Manager like an MPI.

Server Configuration
====================

To use the new features of NET8, you are require to configure a Connection
Manager, as well as configure the server for Multi-Threaded Server (MTS).

MTS

parameters are set in the INIT.ORA for each instance.

The parameters for NET8 MTS themselves have not been changed from those of
SQL*Net 2, except the format of the MTS_DISPATCHERS parameter has changed when
using the Connection Pooling and/or the Multiplexing features of Oracle8.

MTS_DISPATCHERS parameter:

MTS_DISPATCHERS ="(PROTOCOL=TCP)(POOL=NO)(MULT=ON)"

This example sets up dispatchers for TCP/IP, disables Connection Pooling, and
enables Multiplexing.

If Connection Pooling and Multiplexing are not going to

be used, then the MTS parameters as defined for SQL*Net 2.x can be used.
more detailed information on MTS see the Oracle Server Concepts manual or

For

contact Oracle Worldwide Support and request technical bulletins on MTS.

When using the Connection Manager, a new parameter must be set in the
INIT.ORA. Since the Connection Manager makes one physical connection to the
instance, the instance's dispatcher needs to know the maximum number of client
sessions to allow.

The SESSIONS parameter sets this value. This can be seen

by issuing 'LSNRCTL SERVICES', which returns dispatcher information.

You might also like