Wednesday

Modifying the Listener Port for Database Control

A coworker was installing 10Gr2 on a windows server which already had an existing 9i environment. They wanted the database console to connect via the 10G listener (non-standard port 1522) and not the 9i (standard port 1521) to keep the environments separate.

I was able to find the following document which lists all of the default ports used by Enterprise Manager (10g).

Subject: Overview of Default Ports Used by EM 10g Grid Control, DB Control and AS Control
Doc ID: Note:235298.1


Search for "SQL*Net Listener for the 10g DB" and it will list the modifications required in order to change the listener port. The steps in this section assume you need to change the listener port as well. Since the listener was already created for me here are the steps I had to follow:

1. Stop DB Control by executing the command emctl stop dbconsole

2. Modify the agent to reflect the new port number. Edit $ORACLE_HOME/<hostname_sid>/sysman/emd/targets.xml

The instructions say you only need to modify the listener port value. However, I noticed that there are two entries in this file. One is for the database and another for the listener, each pointing to the default port of 1521. I'm not sure if I needed to change the database port but since the DBA wanted to keep both environments separate I changed it to be safe. I didn't test this procedure without making that change.

Here is a copy of the file (of course username and password values were modified. ;).


<Targets AGENT_SEED="39661000">
<Target TYPE="oracle_emd" NAME="myserver.mydomain:1830"/>
<Target TYPE="host" NAME="myserver.mydomain" DISPLAY_NAME="myserver.mydomain" VERSION="1.0"/>
<Target TYPE="oracle_database" NAME="mydb10g" VERSION="1.0">
<Property NAME="MachineName" VALUE="myserver"/>
<Property NAME="Port" VALUE="1522"/>
<Property NAME="SID" VALUE="mydb10g"/>
<Property NAME="OracleHome" VALUE="D:\oracle\ora10g"/>
<Property NAME="UserName" VALUE="1993cs3901f8d5af7" ENCRYPTED="TRUE"/>
<Property NAME="password" VALUE="8c35Da9iks4e07bab7b6c5906a837f4" ENCRYPTED="TRUE"/>
</Target>
<Target TYPE="oracle_listener" NAME="LISTENER_myserver" VERSION="1.0">
<Property NAME="Machine" VALUE="myserver"/>
<Property NAME="LsnrName" VALUE="LISTENER10g"/>
<Property NAME="Port" VALUE="1522"/>
<Property NAME="OracleHome" VALUE="D:\oracle\ora10g"/>
<Property NAME="ListenerOraDir" VALUE="D:\oracle\ora10g\network\admin"/>
</Target>
</Targets


3. Modify $ORACLE_HOME/<hostname_sid>/sysman/config/emoms.properties to reflect the new port. Two entries have to be modified here as well. emdRepPort and emdRepConnectDescriptor should reflect the new port number.

Here are the modified entries with 1522 replacing the standard port 1521.

oracle.sysman.eml.mntr.emdRepPort=1522
oracle.sysman.eml.mntr.emdRepConnectDescriptor=(DESCRIPTION\=(ADDRESS_LIST\=(ADDRESS\=(PROTOCOL\=TCP)(HOST\=myserver)(PORT\=1522)))(CONNECT_DATA\=(SERVICE_NAME\=mydb10g)))


4. Last but not least start up database console with emctl start dbconsole and verify that you can login successfully.

4 comments:

leesen said...

Hi,
oracle@visclone bin]$ perl adcfgclone.pl dbTier
Enter the APPS password [APPS]:


First Creating a new context file for the cloned system.
The program is going to ask you for information about the new system:

AC-00002: Error: Unable to create log file - CloneContext_11150221.log
RC-50004: Error occurred in CloneContext:
AC-00002: Unable to create log file - CloneContext_11150221.log
Raised by oracle.apps.ad.util.LogFile
AC-00002: Error: Unable to create log file - CloneContext_11150221.log
Exception while writing to logfile.
Check logfile CloneContext_11150221.log for details.
ERROR: context creation not completed successfully.
Please check /tmp/adcfgclone.err file for errors
I'm getting this error while running adcfgclone.pl. And error log file also empty.I have done all prerequisite properly.Can u help me in this issue???

Angus Day said...

Thank you, thank you, thank you!

I looked at various solutions around this (em console seemed to get screwed up by running XE on the same system), but none worked properly, and were overly complex.

This worked a treat!

Sridevi Koduru said...
This comment has been removed by the author.
Sridevi Koduru (Oracleappstechnical.com) said...

Regards
Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
LinkedIn profile - https://in.linkedin.com/in/sridevi-koduru-9b876a8b
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at training@oracleappstechnical.com | +91 - 9581017828.