[oracle@ocm11g 11.2.0]$ export ORACLE_HOME=/oracle/product/11.2.0/client
[oracle@ocm11g 11.2.0]$ export ORACLE_SID=CMAN11G
Nnow unzip the file you have downloaded and run the runInstaller.
[oracle@ocm11g ~]$ cd client
[oracle@ocm11g client]$ ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 80 MB. Actual 3483 MB Passed
Checking swap space: must be greater than 150 MB. Actual 1839 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-08-16_10-12-26AM. Please wait ...
[oracle@ocm11g client]$ cd /oracle/product/11.2.0/client/network/admin/samples/
[oracle@ocm11g samples]$ cp cman.ora ../
[oracle@ocm11g samples]$ cd ..
[oracle@ocm11g admin]$ vi cman.ora
Here is the sample cman.ora I have created:
cman_ocm11g =
(configuration=
(address=(protocol=tcp)(host=com11g.localdomain)(port=1630))
(parameter_list =
(aso_authentication_filter=off)
(connection_statistics=yes)
(log_directory=/oracle/log)
(log_level=off)
(max_connections=256)
(idle_timeout=0)
(inbound_connect_timeout=0)
(session_timeout=0)
(outbound_connect_timeout=0)
(max_gateway_processes=16)
(min_gateway_processes=2)
(remote_admin=on)
(trace_directory=/oracle/log)
(trace_level=off)
(trace_timestamp=off)
(trace_filelen=1000)
(trace_fileno=1)
(max_cmctl_sessions=4)
(event_group=init_and_term,memory_ops)
(adr_base=/oracle/log)
)
(rule_list=
(rule=
(src=*)(dst=*)(srv=*)(act=accept)
(action_list=(aut=off)(moct=0)(mct=0)(mit=0)(conn_stats=on))
)
)
)
[oracle@ocm11g admin]$ vi tnsnames.ora
Here is the sample tnsnames.ora:
cman_ocm11g=(ADDRESS=(HOST=ocm11g.localdomain)(PORT=1630)(PROTOCOL=tcp))
Now, we can start the cman:
[oracle@ocm11g admin]$ cmctl
CMCTL for Linux: Version 11.2.0.1.0 - Production on 16-AUG-2011 10:35:10
Copyright (c) 1996, 2009, Oracle. All rights reserved.
Welcome to CMCTL, type "help" for information.
CMCTL> administer cman_ocm11g
Current instance cman_ocm11g is not yet started
Connections refer to (ADDRESS=(HOST=ocm11g.localdomain)(PORT=1630)(PROTOCOL=tcp)).
The command completed successfully.
CMCTL:cman_ocm11g> startup
Starting Oracle Connection Manager instance cman_ocm11g. Please wait...
TNS-04077: WARNING: No password set for the Oracle Connection Manager instance.
CMAN for Linux: Version 11.2.0.1.0 - Production
Status of the Instance
----------------------
Instance name cman_ocm11g
Version CMAN for Linux: Version 11.2.0.1.0 - Production
Start date 16-AUG-2011 10:47:26
Uptime 0 days 0 hr. 0 min. 9 sec
Num of gateways started 2
Average Load level 0
Log Level OFF
Trace Level OFF
Instance Config file /oracle/product/11.2.0/client/network/admin/cman.ora
Instance Log directory /oracle/log/diag/netcman/ocm11g/cman_ocm11g/alert
Instance Trace directory /oracle/log/diag/netcman/ocm11g/cman_ocm11g/trace
The command completed successfully.
CMCTL:cman_ocm11g> show services
Services Summary...
Proxy service "cmgw" has 1 instance(s).
Instance "cman", status READY, has 2 handler(s) for this service...
Handler(s):
"cmgw001" established:0 refused:0 current:0 max:256 state:ready
<machine: ::1, pid: 17506>
(ADDRESS=(PROTOCOL=tcp)(HOST=::1)(PORT=44067))
"cmgw000" established:0 refused:0 current:0 max:256 state:ready
<machine: ::1, pid: 17504>
(ADDRESS=(PROTOCOL=tcp)(HOST=::1)(PORT=26444))
Service "cmon" has 1 instance(s).
Instance "cman", status READY, has 1 handler(s) for this service...
Handler(s):
"cmon" established:1 refused:0 current:1 max:4 state:ready
<machine: ::1, pid: 17496>
(ADDRESS=(PROTOCOL=tcp)(HOST=::1)(PORT=59151))
The command completed successfully.
New listener process was started:
[oracle@ocm11g admin]$ ps -aef|grep tns
oracle 17566 1 0 10:55 ? 00:00:00 /oracle/product/11.2.0/dbhome_1/bin/tnslsnr LISTENER -inherit
oracle 17664 1 0 11:09 ? 00:00:00 /oracle/product/11.2.0/client/bin/tnslsnr ifile=/oracle/product/11.2.0/client/network/admin/cman.ora cman_ocm11g -inherit -mode proxy
Now you should register the database with the cman:
SQL> alter system set remote_listener="(ADDRESS=(HOST=ocm11g.localdomain)(PORT=1630)(PROTOCOL=tcp))";
System altered.
Edit the tnsnames.ora on you client side:
ocm11g_cman=
(DESCRIPTIOn=
(ADDRESS = (HOST=ocm11g.localdomain)(PROTOCOL=tcp)(PORT=1630))
(ADDRESS = (HOST=ocm11g.localdomain)(PROTOCOL=tcp)(PORT=1521))
(CONNECT_DATA = (SERVICE_NAME=ocm11g))
)
Now you can test the connection:
[oracle@ocm11g admin]$ sqlplus system@ocm11g_cman
SQL*Plus: Release 11.2.0.2.0 Production on Tue Aug 16 10:56:53 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Now you will see that you have established connection via the cman:
CMCTL:cman_ocm11g> show services
Services Summary...
Proxy service "cmgw" has 1 instance(s).
Instance "cman", status READY, has 2 handler(s) for this service...
Handler(s):
"cmgw001" established:0 refused:0 current:0 max:256 state:ready
<machine: ::1, pid: 17506>
(ADDRESS=(PROTOCOL=tcp)(HOST=::1)(PORT=44067))
"cmgw000" established:1 refused:0 current:1 max:256 state:ready
<machine: ::1, pid: 17504>
(ADDRESS=(PROTOCOL=tcp)(HOST=::1)(PORT=26444))
Service "cmon" has 1 instance(s).
Instance "cman", status READY, has 1 handler(s) for this service...
Handler(s):
"cmon" established:1 refused:0 current:1 max:4 state:ready
<machine: ::1, pid: 17496>
(ADDRESS=(PROTOCOL=tcp)(HOST=::1)(PORT=59151))
Service "ocm11g" has 1 instance(s).
Instance "ocm11g", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:1 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=ocm11g.localdomain)(PORT=1521))
The command completed successfully.