When you create a connection profile in CCM, it updates the accounts.xml file in the agent home directory/cm/db/data
If two agents have different path ideally it should not reflect the account added
Thanks Kavi. You are right. I checked the 2nd ctm agent DB path and the CTMDB_accounts.xml is not there.
1st ctm agent DB path:
2nd ctm agent DB path:
The only difference between the 2 ctm agents is the Server-to-Agent port, which I set the 1st one as 7006 (default) and the other as 7776. The Instance name is different too (Default and ctmag2) . All other settings remains the same.
What could have gone wrong?
It works well in unix flavours. For Windows i guess the environment variable will have the default agent path as first and hence the db module of that agent is getting reflected.
You may open a case with BMC to check.
However could you say what is the need for two agent with db module on both.
Reason is because our environment has 2 control-m servers for active-active setup, hence we need 2 ctm agents for all our client servers.
I will log a case with BMC. Thanks for your help.
I am sure you are not going to like the reply from BMC. keep the forum updated on the resolution
Please verify from the CCM that the 2nd agent is configure correctly with the server to agent port set to 7776. I suspect it's configured to be the same as the 1st agent i.e. port 7006. On the agent side, the 2nd agent is configure correctly to listen on port 7776 but from the server side, you will have to specify port 7776 as well when communicating with this agent.
Hi Mun Keong! long time no see....
ctmagcfg from server:
Agent Name: ctmag2
1) Agent-to-Server Port Number . . . : 
2) Server-to-Agent Port Number . . . : 
I also confirmed on CCM, the 2nd ctm agent is updated with port 7776 for Server-to-agent.
FYI, I manually added the 2nd ctm agent into CCM. I was about to login to my ctm/server2 to run the ctmgetcm to force out the DB module entry in CCM, but it auto populated in CCM.
Should I delete the 2nd ctm/agent in CCM and redo?
No time no see indeed
Were you able to submit a job to ctmag2 from ctm/server2? If so, there should not be any port mix-up and it's very strange that the 2 agents share the same DB plugin connection profiles.
Yes, I submitted a job to run from the ctm/server2 and sysout appeared in the ctmag2 (2nd ctm agent) sysout folder.
2nd ctm agent sysout folder:
please note that the DB module also uses a special port (default 38080).
This port is only editable directly in the container conf xml -> CTMDB_container_conf.xml
We had a similiar issue ( on linux ) where we have 2 agent installations on the same server.
Hi Falko, That's right!
After I change the 2nd ctm agent DB module port to another one (ie. 38081), it worked.
But BMC doesn't consider this as a CAR (bug) but instead a KA. Meaning, every time I install DB module, I need to remember to manual change the 2nd ctm agent DB module port, because all my client servers are dual ctm agents.
Below is the response from BMC:
BMC Control-M for Databases
Profile Connection Management is opening the wrong set of profiles from
the Control-M Configuration Manager (CCM).
The ports are the same for 2 instances installed on the same Host.
The ports for accessing the BMC Control-M for Databases conainer need to be
unique when there are multiple instances of the plug-in installed on the
same host. To change the ports please do the following:
1. Navigate to the following directory on the Agent
-Windows: C:\Program Files\BMC Software\Control-M Agent\Default\CM\DB\data
-UNIX\Linux: <Agent Home>/ctm_agent/ctm/cm/DB/data
2. Edit the CTMDB_container_conf.xml file:
-Change the value for <Port>38080</Port>
-Save the changes
3. Stop the container:
-Navigate to the /DB/exe folder from a shell/cmd prompt
-Recycle the Control-M Agent
The Connection Profile Manager should now be presenting the correct
profiles from the Control-M Configuration Manager (CCM).