Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

Error to set LISTENER password Oracle 9

OM IT Services
Occasional Contributor

Error to set LISTENER password Oracle 9

Hi all,
dba implements hardening oracle and give me listener password crypted.
Under serviceguard I have the standard toolkit (/opt/cmcluster/toolkit/oracle). I set the variable "LISTENER_PASS=" in haoracle.conf with the password dba give me.
In cntl file I set:

function customer_defined_halt_cmds
{
# ADD customer defined halt commands.
: # do nothing instruction, because a function must contain some command.
su - oracle -c ". .profileAGENT_IPRS; /usr/bin/nohup emctl stop agent &"
/etc/cmcluster/dVMS01IPRS/db_IPRS.sh shutdown
test_return 52
}

---

Function shutdown in haoracle_sql.sh is:

function shutdown_oracle
{

option=$1;

# To stop Oracle the following code will be executed after becoming oracle
# administrator.

su - ${ORACLE_ADMIN} <
export ORACLE_HOME=${ORACLE_HOME}
export ORACLE_SID=${SID_NAME}

echo "shutdown $option" | ${ORACLE_HOME}/bin/sqlplus '/ as sysdba';

if [ $LISTENER = "yes" ]; then
password=""
if [ ! -z "${LISTENER_PASS}" ]
then
password="set password ${LISTENER_PASS}"
fi
${ORACLE_HOME}/bin/lsnrctl <set current_listener ${LISTENER_NAME}
${password}
stop
exit
LSN
fi
EOF

oracle_stop=$?
return $oracle_stop

}


---
When halt package for testing I have this error:


LSNRCTL> LSNRCTL> Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.213.38.196)(PORT=1521)))
TNS-01169: The listener has not recognized the password
LSNRCTL> logout
Dec 6 04:05:26 - Node "h3mih275" Oracle shutdown failed.
Dec 6 04:05:26 - Node "h3mih275" ERROR: Function oracle_shutdown_cmds: Failed to stop Oracle instance
ERROR: Function customer_defined_halt_cmds
ERROR: Failed to HALT customer commands


?????????HELP??????????????
2 REPLIES
Volker Borowski
Honored Contributor

Re: Error to set LISTENER password Oracle 9

Hmm,

when you do the

su - ...

your environment is completely erased, so LISTENER_PASS is empty in my opinion, when your script reaches the point in charge.

By the way, although the password "looks" encrypted in the listener.ora, it is in fact not!
When the config is stored, the password is simplified to garbage looking Hex-Stuff, which can indeed be clipped from sqlnet.ora to be used as a cleartext input to the password command in the listener (yes, really! :-)
So do not store the password in a diffrent locatation with the need to adjust, when the password is changed, but read and parse sqlnet.ora to get it.

Better, upgrade to 10g. Even if configured the password is not needed any more, because dba-authentication is verified for the listener on local connect as in
"/ as sysdba" connect in sqlplus.

Volker
Eric Antunes
Honored Contributor

Re: Error to set LISTENER password Oracle 9

Hi,

Why are you stoping the listener? If it is for backup purposes, you don't need to stop the listener, just the database...

Best Regards,

Eric Antunes
Each and every day is a good day to learn.