Saturday, February 7, 2015

SET Remote_listener on Database in one HIT

Set Remote_listener on Database in one Hit. 


hostname1='hostname' 
export ORAENV_ASK=NO 

for db in 'srvctl config database'

do for inst in `srvctl status instance -d $db -n $hostname1 | awk '{print $2}'`

do
export ORACLE_SID=$inst 

echo $ORACLE_SID 
. oraenv 

sqlplus / as sysdba <<!!

sho parameter db_name 
show parameter remote_listener

alter system set remote_listener='(DESCRIPTION=(ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCPS)(HOST=HOST_IP)(PORT=1523)) (ADDRESS=(PROTOCOL=TCPS)(HOST=HOST_IP)(PORT=1523)) (ADDRESS=(PROTOCOL=TCPS)(HOST=Host_IP)(PORT=1523))))' scope=both sid='*';

and 

show parameter remote_listener !!

No comments:

Post a Comment