Database Administration (MOSC)

MOSC Banner

not showing the output

edited Mar 29, 2016 5:01AM in Database Administration (MOSC) 2 commentsAnswered

Hi,

I am using below script to get tnsname of standby however this is not showing desired output

for i in `ps -ef|grep pmon|awk {' print $8 '}|cut -f3 -d'_'|grep -v '^grep'`

do

ORACLE_SID=$i

export ORACLE_SID;

dest=`sqlplus  "/ as sysdba" <<EOF

set heading off feedback on verify off

select DESTINATION from v\\$archive_dest where target in ('REMOTE','STANDBY');

exit

EOF`

echo $dest;

done

It's giving below output.I just want the output which is highlighted in red.

SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 21 06:23:01 2016 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> SQL> no rows selected SQL>

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center