Home » Server Options » Data Guard » Archive Gap Script (redhat 5.5 )
Archive Gap Script [message #546313] Tue, 06 March 2012 02:34 Go to next message
ganesh_gvn
Messages: 26
Registered: February 2012
Location: PUNE
Junior Member

Dear All,

I am working on Data Guard concepts. I have configured Data Guard which is working fine.

Now I am trying to work on script which can give me output on OS prompt if there are any archive gaps..

I tried to use few commands on a script archgap.sh as


archgap.sh
sqlplus "/ as sysdba"
select * from v$archive_gap;

I am trying to run above script on OS prompt as

ABC:/home/oracle>sh archgap.sh

but I am not getting output ... I want it a way that this script should run within interval of 5 min and give output on OS prompt.

Can anyDear one pls suggest/guide me??


Thanks.
Ganesh
Re: Archive Gap Script [message #546318 is a reply to message #546313] Tue, 06 March 2012 02:40 Go to previous messageGo to next message
Michel Cadot
Messages: 57609
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Something like:
while :
do
  date
  sqlplus "/ as sysdba" <<EOF
select * from v$archive_gap;
exit;
EOF
  echo '----------------------'
  sleep 300
done

Regards
Michel
Re: Archive Gap Script [message #546337 is a reply to message #546318] Tue, 06 March 2012 03:52 Go to previous message
ganesh_gvn
Messages: 26
Registered: February 2012
Location: PUNE
Junior Member

Thanks Michel... I am trying to use above logic in my script...
Previous Topic: changing redo log folder on primary database
Next Topic: how to get sql plan in standby database
Goto Forum:
  


Current Time: Fri Apr 18 11:35:37 CDT 2014

Total time taken to generate the page: 0.11559 seconds