| Lesson 8 |
Starting and stopping the Connection Manager |
| Objective |
Start and stop the Connection Manager |
Starting and Stopping Connection Manager
Starting and stopping CMAN in Oracle AI Database 26ai is done through CMCTL, the utility covered in detail in the previous lesson of this module. This lesson focuses specifically on the start and stop commands themselves, what they do, and the options that change their behavior.
Starting Connection Manager
From the operating system, in one line:
cmctl STARTUP -c instance_name
Or interactively:
cmctl
CMCTL> ADMINISTER instance_name
CMCTL> STARTUP
As covered in the previous lesson,
STARTUP brings up all of an instance's components together, the listener, CMADMIN, and the gateway processes, and fails if any of them is already running. A successful start reports the instance name, version, start time, and the number of gateways that came up, so you have immediate confirmation rather than a bare success message with no detail, roughly:
CMCTL> STARTUP
Starting Oracle Connection Manager instance cman1. Please wait...
Status of the Instance
-----------------------
Instance name cman1
Version CMAN for Linux: Version 26.0.0.0.0
Start date 01-OCT-2026 09:00:00
Uptime 0 days 0 hr. 0 min. 4 sec
Num of gateways started 4
The command completed successfully
If
STARTUP fails because the instance is already running, that is not actually a problem to fix. It is CMAN telling you there is nothing to start, and
SHOW STATUS or
ADMINISTER will confirm the existing instance is healthy rather than needing a second one layered on top of it.
Stopping Connection Manager
From the operating system:
cmctl SHUTDOWN -c instance_name
Or interactively:
CMCTL> ADMINISTER instance_name
CMCTL> SHUTDOWN
As covered in the previous lesson, plain
SHUTDOWN defaults to a graceful stop: CMAN rejects new connections and waits for the existing ones to close naturally before terminating.
SHUTDOWN ABORT skips that wait and closes every open connection immediately, and
SHUTDOWN NOTIFY tells connected clients CMAN is going down before cutting them off. A timeout can be added to any of these so CMAN does not wait indefinitely for stragglers:
CMCTL> SHUTDOWN NOTIFY TIMEOUT 60
In practice, a planned maintenance window calls for plain
SHUTDOWN or
SHUTDOWN NOTIFY with a reasonable timeout, giving active sessions a chance to finish cleanly without an open ended wait, while
ABORT is for situations where CMAN needs to come down immediately and the open connections are not worth waiting on, an unresponsive instance during an incident, for example.
It is also possible to stop just one gateway rather than the whole instance, which matters if you are troubleshooting a single misbehaving gateway process and want to leave the rest of CMAN running:
CMCTL> SHUTDOWN GATEWAYS 0
Verifying the Result
After either command,
SHOW STATUS confirms what actually happened:
CMCTL> SHOW STATUS
A running instance reports its uptime, the number of gateways currently started, and its current log and trace levels; a stopped instance simply will not respond to
SHOW STATUS at all, since CMCTL has nothing running to ask. This is the reliable way to confirm a start or stop actually took effect, rather than relying on command output alone.
In an environment running more than one CMAN instance, remember that
ADMINISTER determines which instance the following commands apply to. Checking status, starting, or stopping the wrong instance because an earlier
ADMINISTER command was never re-run is an easy mistake in a multi-instance environment, and
SHOW STATUS immediately after
ADMINISTER is a quick way to confirm you are about to act on the instance you intend to.
Every start and stop also leaves a record in CMADMIN's own log, using the log file structure covered in the fourth lesson of this module: a startup produces a parameter list entry and a successful listen event, while a shutdown produces its own logged event before the process exits. When
SHOW STATUS is not available because an instance never came up at all, that log is usually the next place to look, since a failed
STARTUP still writes an entry explaining why.
On Windows: Starting and Stopping via Services
On Windows, CMAN's components are also registered as services, visible under the Services console or the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services registry key: OracleHOMENAMECMan for the Connection Manager proxy listener and OracleHOMENAMECMAdmin for CMADMIN, alongside OracleHOMENAMETNSListener for the regular Oracle Net listener. Starting or stopping these services through Windows Services has the same effect as the equivalent CMCTL command, and is a convenient alternative in a Windows environment already managing other Oracle services that way; doing so requires the same administrative rights on the server as starting or stopping any other Windows service.
Administering in Oracle AI Database 26ai
As covered repeatedly earlier in this module, starting or stopping CMAN does not involve a password in Oracle AI Database 26ai. Administration uses Local Operating System Authentication (LOSA): whoever is allowed to administer the instance is determined by the operating system account running CMCTL, not by any separate credential or role.
When a Restart Is Actually Necessary
Not every change requires stopping and starting CMAN. As covered in the sixth and seventh lessons of this module, RELOAD picks up changed parameters and access control rules while CMAN keeps running, which covers most day to day configuration changes. A full SHUTDOWN/STARTUP cycle is for the smaller set of changes RELOAD cannot apply live, along with routine maintenance such as patching or restarting the host itself. Reaching for SHUTDOWN and STARTUP by default, when RELOAD would have done the job without dropping a single connection, is a common habit worth unlearning.
A Maintenance Window Scenario
Put together, a planned restart for host maintenance looks something like this: announce the window to anyone depending on the instance, then from CMCTL run ADMINISTER to confirm you have the right instance selected, SHOW STATUS to note how many gateways and connections are currently active, and SHUTDOWN NOTIFY with a reasonable timeout so existing clients are warned and given a chance to finish before CMAN actually stops. Once the host maintenance is done, STARTUP brings the instance back, and a final SHOW STATUS confirms it came up with the expected number of gateways before you tell anyone the maintenance window is over. The whole sequence is the same handful of commands covered on this page and the previous lesson, just run in a deliberate order with a verification step after each change rather than assumed to have worked.
Configure Network Access- Quiz
