Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: host command in sql*plus

Re: host command in sql*plus

From: Jaap W. van Dijk <j.w.vandijk.removethis_at_hetnet.nl>
Date: Wed, 10 Apr 2002 09:11:05 GMT
Message-ID: <3cb40177.3839856@news.jaapwvandijk.myweb.nl>


What happens if you do a

host cp ... (for each datafile) > backup.log 2>&1

Jaap.

On 9 Apr 2002 02:20:47 -0700, gdas1_at_yahoo.com (gdas) wrote:

>Hi,
>
>Does anyone know if there is a way to gather feedback from a "host"
>command in sqplus? (Running 8.1.7 on Solaris).
>
>I have a hot backup shell script that invokes sqlplus and does
>something like this:
>
>set echo on;
>set feedback on;
>
>spool backup.log
>alter tablespace ... begin backup
> host cp ... (for each datafile)
>alter tablespace ... end backup
>
>the above loops for each tablespace...
>followed by some other things like backing up the control file and
>some administrative cleanup, moving and copying of archived redo log
>files...
>
>In the end, backup.log contains a full log of the backup actions
>performed.
>this works great except that there is no feedback on any of the host
>commands.
>
>I want to schedule this to run nightly and then email me backup.log.
>The host commands show up in the log file, but I have no idea if they
>actually worked. If the target disk was full or if it failed for any
>reason, the os error does not show up in the spool file. I tested
>this by modifying one of my copy commands to copy to a non-existent
>directory. At run time, the console showed the error, however it was
>not captured in the log.
>
>Instead of issueing a straight copy command I'm thinking about
>issueing a copy with redirection to a file (host cp source target >>
>os.log) and then at the very end of the shell script combine it all
>into one file (more os.log >> backup.log)...but I was wondering if
>anyone has a more elegant way of capturing os level feedback from
>sqlplus host commands?
>
>Thanks in advance,
>Gavin
Received on Wed Apr 10 2002 - 04:11:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US