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: ideas?

Re: ideas?

From: Galen Boyer <galenboyer_at_hotpop.com>
Date: 30 May 2002 23:27:22 -0500
Message-ID: <uy9e07ox7.fsf@hotpop.com>


On Thu, 30 May 2002, bgt0990_at_trim.net wrote:

> I'm a little rusty with my scripting, can someone give me a push in
> the right direction. (I need to implement on an ver 8.1.5 NT4.0
> server). What I need to do is fairly simple IE remove log files after
> I know they have been applied in this manual standby server.
> Basically;
>
> select sequence# from v$log_history
>
> delete any 'arcSEQ.001' from the d:\oracle\archcopy directory
>
> where SEQ is the sequence found from the v$log_history query.
>
> We don't have any programming tools to work with here other than
> DOS/SHELL and SQL/PL/SQL

Download the cygwin toolset, www.cygwin.com and write a "#!/bin/sh" file.

#!/bin/sh
echo "#!/bin/ksh" > runthis.sh
sqlplus user/pass_at_instance <<EOF >> runthis.sh select 'rm d:\oracle\archcopy\arc' || sequence# || 'SEQ.001' from v$log_history; EOF chmod 777 runthis.sh
runthis.sh

-- 
Galen deForest Boyer
Sweet dreams and flying machines in pieces on the ground.
Received on Thu May 30 2002 - 23:27:22 CDT

Original text of this message

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