SlideShare a Scribd company logo
Oracle Connection Manager
Deploying the Oracle Connection
Manager
Connection Manager
What is Oracle Connection Manager
Installation
Setup
What does it
Architecture
What is Oracle Connection Manager
• Oracle Connection Manager is a proxy-server.
that forwards connection requests to
databases or other proxy servers
The primary functions of Oracle Connection
Manager are:
• Access control: To use rule-based configuration to filter out
user-specified client requests and accept others.
• Session multiplexing: To funnel multiple client sessions
through a network connection to a shared server destination.
Installation of Oracle Connection Manager
The total space of the installation is round 1.5 gyg.
We used client version 11.2.0.4
Choose custom installation.
Installation of Oracle Connection Manager
Setup Connection Manager
• Edit cman.ora
• Installation directory
/u01/app/oracle/product/11.2.0/client11204/network/admin
• Runs on the test1020.oracle.sometest.nl
• Port 20050. Don’t forget to asked the network/firewall
department to open port 20050. This port will be used by the
connection manager.
Setup Connection Manager
You must edit the following file
$ cd $ORACLE_HOME/network/admin
$ cp $ORACLE_HOME/network/admin/samples/cman.ora .
$ vi cman.ora
You must change the following lines
# CMAN Alias
cman_<fqhost> =
IN
# CMAN Alias
cman_test1020.oracle.sometest.nl
test1020.oracle.sometest.nl is the server where connection manager is
running.
Setup Connection Manager
• You must change the following lines
• # Listening address of the cman
• (address=(protocol=tcp)(host=<fqhost>)(port=<lsnport>))
• IN
• # Listening address of the cman
• (address=(protocol=tcp)(host=test1020.oracle.sometest.nl)(port=20050))
• test1020.oracle.sometest.nl is the server where connection manager is
running.
• 20050 is port number for the connection manager
Setup Connection Manager
• You must change the following lines
• # Log files would be created in the directory specified here
• (log_directory=<logdir>)
• IN
• # Log files would be created in the directory specified here
• (log_directory=/u01/app/oracle/product/11.2.0/client11204/
network/log)
That’s is all you have to do to setup connection manager
How to use Oracle Connection Manager
The connection manager has a command line interface. You can
start it with : cmctl
$ cmctl
CMCTL for Linux: Version 11.2.0.4.0 - Production on 20-MAY-2016 12:05:24
Copyright (c) 1996, 2013, Oracle. All rights reserved.
Welcome to CMCTL, type "help" for information.
CMCTL>
This will show a prompt "CMCTL>". Here you will enter different admin
commands for the CM processes, much like LSNRCTL command line
interpreter.
How to use Oracle Connection Manager
Start the administration process by typing "administer"
CMCTL> administer
Current instance CMAN_test1020.oracle.sometest.nl is not yet started
Connections refer to
(address=(protocol=tcp)(host=test1020.oracle.rabobank.nl)(port=20050)).
The command completed successfully.
CMCTL:CMAN_test1020.oracle.sometest.nl>
How to use Oracle Connection Manager
Start the connection manager processes by issuing "startup"
CMCTL:CMAN_test1020.oracle.sometest.nl> start
Starting Oracle Connection Manager instance
CMAN_test1020.oracle.sometest.nl. Please wait...
TNS-04077: WARNING: No password set for the Oracle Connection Manager
instance.
CMAN for Linux: Version 11.2.0.4.0 - Production
Status of the Instance
----------------------
Instance name cman_test1020.oracle.sometest.nl
Version CMAN for Linux: Version 11.2.0.4.0 - Production
Start date 20-MAY-2016 12:10:03
Uptime 0 days 0 hr. 0 min. 9 sec
Num of gateways started 2
How to use Oracle Connection Manager
Average Load level 0
Log Level USER
Trace Level OFF
Instance Config file
/u01/app/oracle/product/11.2.0/client11204/network/admin/cman.ora
Instance Log directory
/u01/app/oracle/product/11.2.0/client11204/network/log
Instance Trace directory <trcdir>
The command completed successfully.
CMCTL:CMAN_test1020.oracle.sometest.nl>
How to use Oracle Connection Manager
If everything goes well, you should see the CM status
CMCTL:CMAN_test1020.oracle.sometest.nl> show status
Status of the Instance
----------------------
Instance name cman_test1020.oracle.sometest.nl
Version CMAN for Linux: Version 11.2.0.4.0 - Production
Start date 20-MAY-2016 12:10:03
Uptime 0 days 0 hr. 2 min. 42 sec
Num of gateways started 2
Average Load level 0
Log Level USER
Trace Level OFF
Instance Config file
/u01/app/oracle/product/11.2.0/client11204/network/admin/cman.ora
Instance Log directory /u01/app/oracle/product/11.2.0/client11204/network/log
Instance Trace directory <trcdir>
The command completed successfully.
CMCTL:CMAN_test1020.oracle.rsometest.nl>
How to use Oracle Connection Manager
From this moment on connection can be made from the client
site. You can check the number of connections using CMCTL tool
CMCTL:CMAN_test1020.oracle.rabobank.nl> show connections
Number of connections: 1.
The command completed successfully.
The output shows there is one connection through the CM
listener. As you connect more, you will see the number next to
"Number of connections:" increasing.
That's it. You have successfully configured Connection Manager
interface.
Monitoring connection manager
We have choosing to monitor the Oracle Connection Manager if is
up and running through crs resource
Connection manager is now installed on3 nodes. The test1020, acc3020 and
prod3520. For monitoring purpose a CRS resource is made for both 3. The crs
resource is create on our OMS cluster(xxxx7001, xxxx7002, xxxx8001 and
xxxx8002).
Create crs resource
crsctl add resource eco.obs_cman_o -type application -attr
"ACTION_SCRIPT=/u01/app/oracle/admin/general/observer/scripts/cman.sh“
crsctl modify res "eco.obs_cman" -attr "AUTO_START=always"
crsctl modify res "eco.obs_cman" -attr "STOP_TIMEOUT=60"
crsctl modify res "eco.obs_cman" -attr "SCRIPT_TIMEOUT=120"
Monitoring connection manager
Start CRS resource
crsctl start res eco.obs_cman_o -n xxxx7001
$ crsstat| grep obs
NAME TARGET STATE SERVER
------------------------- ---------- ---------- ----------
eco.obs_cman_o ONLINE ONLINE xxxx7001
Monitoring connection manager
The crs resource will check every 30 seconds if the connection managers are
still running. If not it will start it(or them) up. If it fails to start it up an incident
is created in em12c.
The resource uses a script that is located at”
/u01/app/oracle/admin/general/observer/scripts
$ ls –al
drwxrwx--- 3 oracle oinstall 4096 May 17 13:32 ..
-rwxrwx--- 1 oracle oinstall 1428 May 17 13:32 cman.sh
The script checks , start and stop the connection manager.
Monitoring connection manager
The logfile can be found at:
/u01/app/11.2.0.4/gi_000/log/peco7001/agent/crsd/application_oracle
$ tailf application_oracle.log
2016-05-20 12:31:39.495: [eco.obs_cman_o][1484364096]{1:16137:59620} [check] Check action
called..
2016-05-20 12:31:39.495: [eco.obs_cman_o][1484364096]{1:16137:59620} [check] CHECK action
called.
2016-05-20 12:31:39.495: [eco.obs_cman_o][1484364096]{1:16137:59620} [check] Executing
action script: /u01/app/oracle/admin/general/observer/scripts/cman.sh[check]
2016-05-20 12:31:39.897: [eco.obs_cman_o][1484364096]{1:16137:59620} [check] Cman process
for connect manager is running
2016-05-20 12:31:40.006: [ AGFW][1482262848]{1:16137:59620} Agent received the message:
AGENT_HB[Engine] ID 12293:16822016
2016-05-20 12:31:52.006: [eco.obs_cman_g][1484364096]{1:16137:60942} [check] Check action
called..
2016-05-20 12:31:52.006: [eco.obs_cman_g][1484364096]{1:16137:60942} [check] CHECK action
called.
2016-05-20 12:31:52.006: [eco.obs_cman_g][1484364096]{1:16137:60942} [check] Executing
action script: /u01/app/oracle/admin/general/observer/scripts/cmang.sh[check]
2016-05-20 12:31:52.358: [eco.obs_cman_g][1484364096]{1:16137:60942} [check] Cman process
for connect manager is running
2016-05-20 12:32:10.010: [ AGFW][1482262848]{1:16137:59620} Agent received the message:
AGENT_HB[Engine] ID 12293:16822032
• 2016-05-20 12:32:30.121: [eco.obs_cman_p][1490667840]{1:16137:60951} [check] Check
action called..
Architecture of Oracle Connection Manager
Let's quickly go through the architecture of the tool. Assume there are three
hosts:
client1(Secret) - the machine where the client runs and wants to connect to the
database
dbhost1(test004) - the machine where the database instance runs
cmhost1 (test1020) - the machine where the Connection Manager process runs
Here is a rough network diagram of the three machine
Architecture of Oracle Connection Manager
Architecture of Oracle Connection Manager
From client1 you can reach cmhost1 but not dbhost1:
However, you can ping the dbhost1 from cmhost1 and cmhost1 from
client1.
Normally the TNS entry at the client machine(In our case Secret) would
have looked like this:
ODBA1_CM =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)(HOST = 10.xxx.xxx.19)(PORT = 1550)
)
(CONNECT_DATA =
(SERVICE_NAME=SRV0ODBA101)
)
)
Architecture of Oracle Connection Manager
However, this will not work since the client does not even know the routing for dbhost1.
Instead the client connects to the CM host. The connection manager has two processes
The Connection Manager Admin Process (cmadmin). One or more Connection Manager
Gateway Processes (cmgw)
The CMGW processes allows the client connections to come in through them. The admin
process manages the gateways. We will cover more on that later.
After setting up the CM processes, you will need to rewrite the TNSNAMES.ORA in the
following way:
ODBA1_CM =
(DESCRIPTION =
(SOURCE_ROUTE = YES)
(ADDRESS =
(PROTOCOL = TCP)(HOST = 10.xxx.xxxx.43 )(PORT = 20050)
)
(ADDRESS =
(PROTOCOL = TCP)(HOST = 10.xxx.xxx.19)(PORT = 1550)
)
(CONNECT_DATA =
(SERVICE_NAME=SRV0ODBA101)
)
)
Architecture of Oracle Connection Manager
Note the special parameter:
SOURCE_ROUTE = YES
This tells the client connection request to attempt the first address listed first and only then
attempt the next one. This is different from load balance setups where you would expect the
client tool to pick one of the addresses at random. So the client attempts this address first:
(PROTOCOL = TCP)(HOST = 10.xxx.xxx.43 )(PORT = 20050)
This is the listener for Connection Manager. The clients are allowed to connect to the port
20050 (the port where CM listener listens on) on the cmhost1 (in our case test1020).
After that the connection attempts the second address
(PROTOCOL = TCP)(HOST = 10.xxx.xxx.19)(PORT = 1550)
However, it will fail since the client does not have access to the port 1550 of the host
dbhost1(in our case the test004). This is where CM comes in. The client does not make the
request; CM does on behalf of the client connection that just came in. The connection
manager (running on cmhost1: test1020) makes the request with that address. Since the host
cmhost1(test1020) can access dbhost1(test004-adm) on port 1550, that connection request
goes through successfully.
Connection Manager
• Extra reading matarial
• https://pmdba.files.wordpress.com/2013/03/
deploying-an-oracle-11gr2-connection-
manager.pdf

More Related Content

PDF
Adobe Connect on-premise SSL Guide
PDF
Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise
PPTX
2018 Student360 - Beyond xp_cmdshell - Owning the Empire Through SQL Server
PDF
Configure proxy firewall on SuSE Linux Enterprise Server 11
PDF
How To Configure Nginx Load Balancer on CentOS 7
PDF
Configure DHCP Server and DHCP-Relay
PPTX
Secure360 - Beyond xp cmdshell - Owning the Empire through SQL Server
PDF
BMC Discovery (ADDM) Cheat Sheet by Traversys Limited
Adobe Connect on-premise SSL Guide
Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise
2018 Student360 - Beyond xp_cmdshell - Owning the Empire Through SQL Server
Configure proxy firewall on SuSE Linux Enterprise Server 11
How To Configure Nginx Load Balancer on CentOS 7
Configure DHCP Server and DHCP-Relay
Secure360 - Beyond xp cmdshell - Owning the Empire through SQL Server
BMC Discovery (ADDM) Cheat Sheet by Traversys Limited

What's hot (20)

PDF
How To Install and Configure Open SSH Server on Ubuntu
PPTX
Oracle SOA 12.2.1 Installation
TXT
Lab Network Settings And Testing
PDF
PowerUpSQL - 2018 Blackhat USA Arsenal Presentation
PPTX
Deleting a vserver in Netapp cluster mode
DOCX
Oracle Web logic 12c on docker
PDF
How To Configure Amazon EC2 Load Balancer
PPTX
How to enable efficiency (deduplication and compression in netapp cluster mod...
PDF
WebLogic, 12C SOA Standalone installation
PDF
How To Configure VNC Server on CentOS 7
ODT
How to configure IPA-Server & Client-Centos 7
PDF
How To Check IE Enhanced Security Is Enabled Windows PowerShell
PDF
How To Install and Configure Salt Master on Ubuntu
PPT
PowerPoint Presentation
DOCX
Unable to access the net app cluster mode 9.2 san through gui after power mai...
DOCX
How to shut down Netapp san 9.2 cluster mode version1
DOC
EMC Networker installation Document
PDF
How To View Login History and Logout History on RHEL 7
PDF
How to installation and configure apache2
PPTX
How to shutdown and power up of the netapp cluster mode storage system
How To Install and Configure Open SSH Server on Ubuntu
Oracle SOA 12.2.1 Installation
Lab Network Settings And Testing
PowerUpSQL - 2018 Blackhat USA Arsenal Presentation
Deleting a vserver in Netapp cluster mode
Oracle Web logic 12c on docker
How To Configure Amazon EC2 Load Balancer
How to enable efficiency (deduplication and compression in netapp cluster mod...
WebLogic, 12C SOA Standalone installation
How To Configure VNC Server on CentOS 7
How to configure IPA-Server & Client-Centos 7
How To Check IE Enhanced Security Is Enabled Windows PowerShell
How To Install and Configure Salt Master on Ubuntu
PowerPoint Presentation
Unable to access the net app cluster mode 9.2 san through gui after power mai...
How to shut down Netapp san 9.2 cluster mode version1
EMC Networker installation Document
How To View Login History and Logout History on RHEL 7
How to installation and configure apache2
How to shutdown and power up of the netapp cluster mode storage system
Ad

Similar to Oracle Connection Manager (20)

PDF
Long live to CMAN!
PDF
Enterprise managerclodcontrolinstallconfiguration emc12c
PDF
00.TEC.Scaling.CMAN_TDM_Oracle_DB_Connection_Proxy_for_scalable_apps.pdf
DOCX
How to install oracle ops center 12c
PPTX
C15LV: Ins and Outs of Concurrent Processing Configuration in Oracle e-Busine...
PPT
Less05 Network
PDF
Zero to Manageability in 60 Minutes: Building a Solid Foundation for Oracle E...
PPTX
Optimizing the Enterprise Manager 12c
PPTX
Oracle DBA Configuring network environment
PPT
ConfiguraciĂłn de la Red de DB Oracle 11g
 
PPTX
Database as a Service, Collaborate 2016
PPTX
Oracle EM12c Release 4 New Features!
PDF
Kscope Not Your Father's Enterprise Manager
PDF
🏗️Improve database performance with connection pooling and load balancing tec...
PPT
Less06 networking
PDF
Oracle Solaris 11.1 New Features
PPT
les_02.ppt of the Oracle course train_2 file
PDF
OSMC 2010 | NSClient++ - what's new? And what's coming! by Michael Medin
PPTX
Oracle Database: Checklist Connection Issues
DOCX
Cman
Long live to CMAN!
Enterprise managerclodcontrolinstallconfiguration emc12c
00.TEC.Scaling.CMAN_TDM_Oracle_DB_Connection_Proxy_for_scalable_apps.pdf
How to install oracle ops center 12c
C15LV: Ins and Outs of Concurrent Processing Configuration in Oracle e-Busine...
Less05 Network
Zero to Manageability in 60 Minutes: Building a Solid Foundation for Oracle E...
Optimizing the Enterprise Manager 12c
Oracle DBA Configuring network environment
ConfiguraciĂłn de la Red de DB Oracle 11g
 
Database as a Service, Collaborate 2016
Oracle EM12c Release 4 New Features!
Kscope Not Your Father's Enterprise Manager
🏗️Improve database performance with connection pooling and load balancing tec...
Less06 networking
Oracle Solaris 11.1 New Features
les_02.ppt of the Oracle course train_2 file
OSMC 2010 | NSClient++ - what's new? And what's coming! by Michael Medin
Oracle Database: Checklist Connection Issues
Cman
Ad

Recently uploaded (20)

PDF
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
PDF
The Advantages of Working With a Design-Build Studio
PPTX
building Planning Overview for step wise design.pptx
PPTX
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
PPT
UNIT I- Yarn, types, explanation, process
PPTX
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
PDF
Design Thinking - Module 1 - Introduction To Design Thinking - Dr. Rohan Dasg...
PDF
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
PPT
WHY_R12 Uaafafafpgradeaffafafafaffff.ppt
PPTX
joggers park landscape assignment bandra
DOCX
The story of the first moon landing.docx
 
PDF
Interior Structure and Construction A1 NGYANQI
PPTX
6- Architecture design complete (1).pptx
PPTX
Fundamental Principles of Visual Graphic Design.pptx
PDF
Urban Design Final Project-Site Analysis
PPT
pump pump is a mechanism that is used to transfer a liquid from one place to ...
PPTX
Wisp Textiles: Where Comfort Meets Everyday Style
PPTX
LITERATURE CASE STUDY DESIGN SEMESTER 5.pptx
PDF
Quality Control Management for RMG, Level- 4, Certificate
PDF
SEVA- Fashion designing-Presentation.pdf
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
The Advantages of Working With a Design-Build Studio
building Planning Overview for step wise design.pptx
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
UNIT I- Yarn, types, explanation, process
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
Design Thinking - Module 1 - Introduction To Design Thinking - Dr. Rohan Dasg...
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
WHY_R12 Uaafafafpgradeaffafafafaffff.ppt
joggers park landscape assignment bandra
The story of the first moon landing.docx
 
Interior Structure and Construction A1 NGYANQI
6- Architecture design complete (1).pptx
Fundamental Principles of Visual Graphic Design.pptx
Urban Design Final Project-Site Analysis
pump pump is a mechanism that is used to transfer a liquid from one place to ...
Wisp Textiles: Where Comfort Meets Everyday Style
LITERATURE CASE STUDY DESIGN SEMESTER 5.pptx
Quality Control Management for RMG, Level- 4, Certificate
SEVA- Fashion designing-Presentation.pdf

Oracle Connection Manager

  • 2. Deploying the Oracle Connection Manager
  • 3. Connection Manager What is Oracle Connection Manager Installation Setup What does it Architecture
  • 4. What is Oracle Connection Manager • Oracle Connection Manager is a proxy-server. that forwards connection requests to databases or other proxy servers The primary functions of Oracle Connection Manager are: • Access control: To use rule-based configuration to filter out user-specified client requests and accept others. • Session multiplexing: To funnel multiple client sessions through a network connection to a shared server destination.
  • 5. Installation of Oracle Connection Manager The total space of the installation is round 1.5 gyg. We used client version 11.2.0.4 Choose custom installation.
  • 6. Installation of Oracle Connection Manager
  • 7. Setup Connection Manager • Edit cman.ora • Installation directory /u01/app/oracle/product/11.2.0/client11204/network/admin • Runs on the test1020.oracle.sometest.nl • Port 20050. Don’t forget to asked the network/firewall department to open port 20050. This port will be used by the connection manager.
  • 8. Setup Connection Manager You must edit the following file $ cd $ORACLE_HOME/network/admin $ cp $ORACLE_HOME/network/admin/samples/cman.ora . $ vi cman.ora You must change the following lines # CMAN Alias cman_<fqhost> = IN # CMAN Alias cman_test1020.oracle.sometest.nl test1020.oracle.sometest.nl is the server where connection manager is running.
  • 9. Setup Connection Manager • You must change the following lines • # Listening address of the cman • (address=(protocol=tcp)(host=<fqhost>)(port=<lsnport>)) • IN • # Listening address of the cman • (address=(protocol=tcp)(host=test1020.oracle.sometest.nl)(port=20050)) • test1020.oracle.sometest.nl is the server where connection manager is running. • 20050 is port number for the connection manager
  • 10. Setup Connection Manager • You must change the following lines • # Log files would be created in the directory specified here • (log_directory=<logdir>) • IN • # Log files would be created in the directory specified here • (log_directory=/u01/app/oracle/product/11.2.0/client11204/ network/log) That’s is all you have to do to setup connection manager
  • 11. How to use Oracle Connection Manager The connection manager has a command line interface. You can start it with : cmctl $ cmctl CMCTL for Linux: Version 11.2.0.4.0 - Production on 20-MAY-2016 12:05:24 Copyright (c) 1996, 2013, Oracle. All rights reserved. Welcome to CMCTL, type "help" for information. CMCTL> This will show a prompt "CMCTL>". Here you will enter different admin commands for the CM processes, much like LSNRCTL command line interpreter.
  • 12. How to use Oracle Connection Manager Start the administration process by typing "administer" CMCTL> administer Current instance CMAN_test1020.oracle.sometest.nl is not yet started Connections refer to (address=(protocol=tcp)(host=test1020.oracle.rabobank.nl)(port=20050)). The command completed successfully. CMCTL:CMAN_test1020.oracle.sometest.nl>
  • 13. How to use Oracle Connection Manager Start the connection manager processes by issuing "startup" CMCTL:CMAN_test1020.oracle.sometest.nl> start Starting Oracle Connection Manager instance CMAN_test1020.oracle.sometest.nl. Please wait... TNS-04077: WARNING: No password set for the Oracle Connection Manager instance. CMAN for Linux: Version 11.2.0.4.0 - Production Status of the Instance ---------------------- Instance name cman_test1020.oracle.sometest.nl Version CMAN for Linux: Version 11.2.0.4.0 - Production Start date 20-MAY-2016 12:10:03 Uptime 0 days 0 hr. 0 min. 9 sec Num of gateways started 2
  • 14. How to use Oracle Connection Manager Average Load level 0 Log Level USER Trace Level OFF Instance Config file /u01/app/oracle/product/11.2.0/client11204/network/admin/cman.ora Instance Log directory /u01/app/oracle/product/11.2.0/client11204/network/log Instance Trace directory <trcdir> The command completed successfully. CMCTL:CMAN_test1020.oracle.sometest.nl>
  • 15. How to use Oracle Connection Manager If everything goes well, you should see the CM status CMCTL:CMAN_test1020.oracle.sometest.nl> show status Status of the Instance ---------------------- Instance name cman_test1020.oracle.sometest.nl Version CMAN for Linux: Version 11.2.0.4.0 - Production Start date 20-MAY-2016 12:10:03 Uptime 0 days 0 hr. 2 min. 42 sec Num of gateways started 2 Average Load level 0 Log Level USER Trace Level OFF Instance Config file /u01/app/oracle/product/11.2.0/client11204/network/admin/cman.ora Instance Log directory /u01/app/oracle/product/11.2.0/client11204/network/log Instance Trace directory <trcdir> The command completed successfully. CMCTL:CMAN_test1020.oracle.rsometest.nl>
  • 16. How to use Oracle Connection Manager From this moment on connection can be made from the client site. You can check the number of connections using CMCTL tool CMCTL:CMAN_test1020.oracle.rabobank.nl> show connections Number of connections: 1. The command completed successfully. The output shows there is one connection through the CM listener. As you connect more, you will see the number next to "Number of connections:" increasing. That's it. You have successfully configured Connection Manager interface.
  • 17. Monitoring connection manager We have choosing to monitor the Oracle Connection Manager if is up and running through crs resource Connection manager is now installed on3 nodes. The test1020, acc3020 and prod3520. For monitoring purpose a CRS resource is made for both 3. The crs resource is create on our OMS cluster(xxxx7001, xxxx7002, xxxx8001 and xxxx8002). Create crs resource crsctl add resource eco.obs_cman_o -type application -attr "ACTION_SCRIPT=/u01/app/oracle/admin/general/observer/scripts/cman.sh“ crsctl modify res "eco.obs_cman" -attr "AUTO_START=always" crsctl modify res "eco.obs_cman" -attr "STOP_TIMEOUT=60" crsctl modify res "eco.obs_cman" -attr "SCRIPT_TIMEOUT=120"
  • 18. Monitoring connection manager Start CRS resource crsctl start res eco.obs_cman_o -n xxxx7001 $ crsstat| grep obs NAME TARGET STATE SERVER ------------------------- ---------- ---------- ---------- eco.obs_cman_o ONLINE ONLINE xxxx7001
  • 19. Monitoring connection manager The crs resource will check every 30 seconds if the connection managers are still running. If not it will start it(or them) up. If it fails to start it up an incident is created in em12c. The resource uses a script that is located at” /u01/app/oracle/admin/general/observer/scripts $ ls –al drwxrwx--- 3 oracle oinstall 4096 May 17 13:32 .. -rwxrwx--- 1 oracle oinstall 1428 May 17 13:32 cman.sh The script checks , start and stop the connection manager.
  • 20. Monitoring connection manager The logfile can be found at: /u01/app/11.2.0.4/gi_000/log/peco7001/agent/crsd/application_oracle $ tailf application_oracle.log 2016-05-20 12:31:39.495: [eco.obs_cman_o][1484364096]{1:16137:59620} [check] Check action called.. 2016-05-20 12:31:39.495: [eco.obs_cman_o][1484364096]{1:16137:59620} [check] CHECK action called. 2016-05-20 12:31:39.495: [eco.obs_cman_o][1484364096]{1:16137:59620} [check] Executing action script: /u01/app/oracle/admin/general/observer/scripts/cman.sh[check] 2016-05-20 12:31:39.897: [eco.obs_cman_o][1484364096]{1:16137:59620} [check] Cman process for connect manager is running 2016-05-20 12:31:40.006: [ AGFW][1482262848]{1:16137:59620} Agent received the message: AGENT_HB[Engine] ID 12293:16822016 2016-05-20 12:31:52.006: [eco.obs_cman_g][1484364096]{1:16137:60942} [check] Check action called.. 2016-05-20 12:31:52.006: [eco.obs_cman_g][1484364096]{1:16137:60942} [check] CHECK action called. 2016-05-20 12:31:52.006: [eco.obs_cman_g][1484364096]{1:16137:60942} [check] Executing action script: /u01/app/oracle/admin/general/observer/scripts/cmang.sh[check] 2016-05-20 12:31:52.358: [eco.obs_cman_g][1484364096]{1:16137:60942} [check] Cman process for connect manager is running 2016-05-20 12:32:10.010: [ AGFW][1482262848]{1:16137:59620} Agent received the message: AGENT_HB[Engine] ID 12293:16822032 • 2016-05-20 12:32:30.121: [eco.obs_cman_p][1490667840]{1:16137:60951} [check] Check action called..
  • 21. Architecture of Oracle Connection Manager Let's quickly go through the architecture of the tool. Assume there are three hosts: client1(Secret) - the machine where the client runs and wants to connect to the database dbhost1(test004) - the machine where the database instance runs cmhost1 (test1020) - the machine where the Connection Manager process runs Here is a rough network diagram of the three machine
  • 22. Architecture of Oracle Connection Manager
  • 23. Architecture of Oracle Connection Manager From client1 you can reach cmhost1 but not dbhost1: However, you can ping the dbhost1 from cmhost1 and cmhost1 from client1. Normally the TNS entry at the client machine(In our case Secret) would have looked like this: ODBA1_CM = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.xxx.xxx.19)(PORT = 1550) ) (CONNECT_DATA = (SERVICE_NAME=SRV0ODBA101) ) )
  • 24. Architecture of Oracle Connection Manager However, this will not work since the client does not even know the routing for dbhost1. Instead the client connects to the CM host. The connection manager has two processes The Connection Manager Admin Process (cmadmin). One or more Connection Manager Gateway Processes (cmgw) The CMGW processes allows the client connections to come in through them. The admin process manages the gateways. We will cover more on that later. After setting up the CM processes, you will need to rewrite the TNSNAMES.ORA in the following way: ODBA1_CM = (DESCRIPTION = (SOURCE_ROUTE = YES) (ADDRESS = (PROTOCOL = TCP)(HOST = 10.xxx.xxxx.43 )(PORT = 20050) ) (ADDRESS = (PROTOCOL = TCP)(HOST = 10.xxx.xxx.19)(PORT = 1550) ) (CONNECT_DATA = (SERVICE_NAME=SRV0ODBA101) ) )
  • 25. Architecture of Oracle Connection Manager Note the special parameter: SOURCE_ROUTE = YES This tells the client connection request to attempt the first address listed first and only then attempt the next one. This is different from load balance setups where you would expect the client tool to pick one of the addresses at random. So the client attempts this address first: (PROTOCOL = TCP)(HOST = 10.xxx.xxx.43 )(PORT = 20050) This is the listener for Connection Manager. The clients are allowed to connect to the port 20050 (the port where CM listener listens on) on the cmhost1 (in our case test1020). After that the connection attempts the second address (PROTOCOL = TCP)(HOST = 10.xxx.xxx.19)(PORT = 1550) However, it will fail since the client does not have access to the port 1550 of the host dbhost1(in our case the test004). This is where CM comes in. The client does not make the request; CM does on behalf of the client connection that just came in. The connection manager (running on cmhost1: test1020) makes the request with that address. Since the host cmhost1(test1020) can access dbhost1(test004-adm) on port 1550, that connection request goes through successfully.
  • 26. Connection Manager • Extra reading matarial • https://pmdba.files.wordpress.com/2013/03/ deploying-an-oracle-11gr2-connection- manager.pdf