Configure and run the "Connection Manager" in Oracle 23 c
Explain how Oracle Network Services was a separate bundle in Oracle 11g in contrast with Oracle 23c,
where Network Services is part of the Oracle Cloud Infrastructure.
Oracle Connection Manager (CMAN) is a proxy server that enables network traffic filtering, multiplexing, and load balancing between clients and database servers.
1. Install and Configure Oracle Connection Manager
Oracle Connection Manager comes bundled with Oracle Database and needs to be configured using the CMAN.ORA file.
Step 1: Verify CMAN Installation
On Oracle 19c, CMAN is typically installed in the Oracle Home directory.
To check if CMAN is installed:
cd $ORACLE_HOME/bin
ls cmctl
If `cmctl` exists, CMAN is installed.
2. Configure CMAN in `cman.ora`
Edit or create the `cman.ora` file located at:
IDLE_TIMEOUT=300: Disconnects idle connections after 5 minutes.
LOG_LEVEL=1: Enables basic logging.
TRACING=YES: Enables debugging logs.
3. Start the Oracle Connection Manager
Once the configuration is in place, start CMAN using the `cmctl` utility.
Start CMAN
$ORACLE_HOME/bin/cmctl start
Check CMAN Status
$ORACLE_HOME/bin/cmctl status
Stop CMAN
$ORACLE_HOME/bin/cmctl stop
4. Configure Clients to Use CMAN
The client’s `tnsnames.ora` file must be updated to route connections through CMAN.
Example `tnsnames.ora` for CMAN Routing
Verify CMAN is installed (ls $ORACLE_HOME/bin/cmctl).
Configure cman.ora with the CMAN listener and rules.
Start CMAN (cmctl start).
Update tnsnames.ora to route traffic through CMAN.
Test the connection (tnsping and sqlplus).
(Optional) Enable multiplexing to optimize connections.
(Optional) Enable logging for debugging.
Connection Manager Overview
Oracle Connection Manager is a multipurpose networking solution that offers increased scalability, multiprotocol connectivity and secure network access control. It offers the following features to Oracle network:
Connection multiplexing
Access control
Source routing
Multiprotocol Support
Firewall Proxy Support
Oracle Connection Manager enables large numbers of users to connect to a single server by acting as a connection concentrator to funnel multiple client database sessions across a single network connection. This is done through multiplexed network connections, a networking feature included with Oracle Net. Oracle Connection Manager reduces operating system resource requirements by minimizing the number of network connections made to a server. Network bottlenecks are thus avoided and system scalability significantly increases so that thousands of users can now access a single database.
To configure Connection Manager
run the (CMAN) Connection Manager,
Oracle Net Manager or
CMAN utility (line commands).
Configuring the Connection Manager Oracle Connection Manager[1] is automatically installed when you install Oracle Enterprise Edition.
Its default configuration listens for TCP/IP connections on port 1630.
It also listens for administration commands (issued from Oracle Net Manager or CMAN) on the TCP/IP port 1830.
If you need to change these defaults (for example, if you must assign the Connection Manager to a different port), you must create a cman.ora file and locate it in the same directory as the tnsnames.ora file. An example of the cman.ora file (including good documentation of the parameters) is provided in the
We will discuss the parameters needed for features such as multiplexing later in this module.
Running the Connection Manager
You should use the CMAN utility to run the Connection Manager. You can view the status of the Connection Manager, start the service, and stop the service using this utility. Follow along with the SlideShow to see how to start, show status, and stop the Connection Manager.
Running Oracle Connection Manager
1) Begin by opening an operating system session
2) Issue the status command to see what the Connection Manager is currently doing
3) Issue the start cman command to start up the CMAN and ADMIN processes. The CMAN process is the one that actually runs the Connection Manager and the ADMIN process is the one that accepts commands to modify or monitor the Connection Manager
4) The setting will only take effect until the Connection Manager is shut down.
5) Issue the shutdown command to stop the Connection Manager
The Connection Manager can help you streamline the handling of multiple connections into your database.
The following section discusses more about starting and stopping the Connection Manager.
Start and stop the Connection Manager
Run the following commands from the MS-DOS prompt:
The Connection Manager configuration file (CMAN.ORA) contains the parameters that specify preferences for using Oracle Connection Manager.
cman = (address_list=
(address = (protocol=tcp)(host=anyhost)(port=1610))
(address = (protocol=tcp)(host=anyhost)(port=1620))
)
cman_profile = (parameter_list=
(maximum_relays=512)
(log_level=1)
(tracing=yes)
(trace_directory=/oracle/network/trace)
(relay_statistics=yes)
(show_tns_info=yes)
(use_async_call=yes)
(authentication_level=0)
)
# the following specifies a rule for single access control #
cman_rules = (rule_list=
(rule=(src=spcstn)(dst=x)(srv=x)(act=accept))
)
CMCTL (Connection Manager Control Utility) commands still valid in Oracle 19c
The CMCTL (Connection Manager Control Utility) commands are still valid in Oracle 19c, but there have been enhancements and some changes in behavior.
Changes in CMCTL for Oracle 19c:
Commands are still available:
The following commands remain supported in Oracle 19c:
C:> cmctl
CMCTL> status
CMCTL> start
CMCTL> show all
CMCTL> shutdown
These commands are used to start, stop, and check the status of the Oracle Connection Manager.
Enhanced Security Model:
CMCTL now requires authentication using the -user flag to specify an administrative user.
Example:
cmctl -user admin
This change aligns with tightened security policies in newer Oracle versions.
Changes in Configuration Files (cman.ora):
The format and parameters in cman.ora have been enhanced in Oracle 19c.
New features added:
Traffic Director Mode (CMAN-TDM)
Multiplexing improvements
IP rate limiting
Better logging and tracing options
New Way to Start CMAN in Oracle 19c:
The modern approach to starting Oracle Connection Manager in 19c is:
cmctl start
To check the status:
cmctl status
To shut down CMAN:
cmctl shutdown
Deprecation of CMAN with Oracle RAC:
CMAN in Traffic Director Mode (TDM) is recommended for load balancing.
Older static configurations are less favored, but they still work.
Conclusion:
CMCTL commands from Oracle 8i still work in Oracle 19c with minor security enhancements.
Authentication is now required when starting CMCTL.
Configuration files (cman.ora) have been improved.
Traffic Director Mode (CMAN-TDM) is recommended for better performance.
The next lesson covers multiplexing.
[1]Connection Manager: The Connection Manager in Oracle Cloud Infrastructure (OCI) refers to the Oracle Connection Manager (CMAN) feature, which acts as a network proxy server to manage and route connection requests between clients and Oracle databases. It provides capabilities like access control through rule-based filtering, session multiplexing to optimize network usage, and protocol conversion, enhancing security and connectivity options within OCI environments. By centralizing and controlling database connections, CMAN offers improved manageability and efficiency for accessing Oracle database services in the cloud.