Re: Help wanted - How to export to tape directly by using cron under UNIX(NCR) with ORACLE V6 ?

From: Mike Dayton <mdayton_at_stpaul.ncr.com>
Date: Thu, 5 Aug 1993 14:04:00 GMT
Message-ID: <mdayton.22_at_stpaul.ncr.com>


In article <23p9bk$hj_at_usenet.mcs.kent.edu> yyin_at_mcs.kent.edu (Yu Yin) writes:

>Hi netters,
 

>I'm using Oracle V6 based on NCR Unix, and I want to backup the system by
>cron nightly. As part of it, I want to export Oracle database to tape
>directly. When I called Oracle Support, they let me put the device name
>after the equal sign of file, which is 'file=/dev/rmt/c0t1d0s0' at the
>command line after exp user/pass. And I did. But it still asked the volume
>size, which is 'volume size (<ret> for no restriction)>'. This means I still
>cannot export it automatically.
 

>QUESTION: Is there any way to have the <return>for Volume Size answered
>automatically, or as a parameter that I can feed to the procedure in a shell
>script.
 

>Thank you very much in advance!
>.

Yes. You can redirect standard input and then feed exp the size restriciton. For example:

#!/bin/sh
# PS. Don't forget to call oraenv
#

es_exp_dest=/dev/rmt/c0t1d0s0
es_exp_parms="export_parameter_file"

if [ -c "$es_exp_dest" ] ; then

   ${ORACLE_HOME}/bin/exp parfile=$es_exp_parms file=$es_exp_dest <<-EOD

	$es_exp_size
	EOD

else

   ${ORACLE_HOME}/bin/exp parfile=$es_exp_parms file=$es_exp_dest fi

exit 0

...............................................................................

Mike Dayton                                     | AT&T / NCR
Software Services Automation                    | 2700 Snelling Avenue North
email: Mike.Dayton_at_StPaul.NCR.COM               | St. Paul, MN. 55113
Received on Thu Aug 05 1993 - 16:04:00 CEST

Original text of this message