Re: cannot spool the mounted standby database through cron job shell script. Any other suggestions?

From: Bill Zakrzewski <bill_at_intactus.com>
Date: Mon, 27 Jun 2011 14:48:54 -0400
Message-Id: <360A9417-C63A-4F5B-AFDF-86C3D814E551_at_intactus.com>



What is the exact error you are getting?

On Jun 27, 2011, at 2:10 PM, sundar mahadevan wrote:

> Hi All,
> Greetings. I have a standby in mount state. I would like to query the latest archive log applied on standby (in mount state) to apply the archive logs from primary with a cron job shell script. When i query "select max(sequence#) from v\$log_history;" from a shell script it works. But if i set it up as cron job as below, it does not work. I cannot assign the output to a shell variable since the database is not open and it would crap out. Any other suggestions? And the reason for this behaviour? Thanks a lot in advance.
>
> test.sh
> #!/bin/bash
> sqlplus -s /nolog << EOF
> set head off
> connect / as sysdba
> spool last_applied_on_standby.log
> select max(sequence#) from v\$log_history;
> spool off
> quit
> EOF

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jun 27 2011 - 13:48:54 CDT

Original text of this message