Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Archive log-switch after on-line backup
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C03F59.7EA07CA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Eric,
=20
I also use an archive log switch. To avoid the situation you're
experiencing, I added a short "sleep" after the logfile switch to allow
(hopefully) my switched logfile to at least begin archiving. I then =
make a
quick list of the files in the archive directory and use this list to
determine which archive logs to copy and delete.
=20
The command I use for listing is:
=20
ls /oracle/leads/redo/arch/*.ARC >logfile.lst
sleep 10
cat logfile.lst |
sed "s/\(.*\/\)\([^\/].*\)/mv \1\2 \/home1\/orabackup\/`date
+%b%dleads`\/\2/" >logfile.shl
sh logfile.shl
=20
The second "sleep" in this puppy is to allow the archive log to finish
archiving (hopefully) before the copy (move) process begins.
=20
I got this command from a white paper I found on the web after a
conversation about this very problem last year. I think perhaps =
Rachael
Carmichael looked over my previous script and suggested an improvement.
=20
Sorry, I don't have the URL.
=20
Hope this helps.
=20
David A. Barbour=20
Oracle DBA - ConnectSouth=20
512-681-9438=20
dbarbour_at_connectsouth.com=20
-----Original Message-----
From: Eric Lansu [mailto:eric.lansu_at_quicknet.nl]
Sent: Thursday, October 26, 2000 5:25 AM
To: Multiple recipients of list ORACLE-L
Subject: Archive log-switch after on-line backup
Dear listers,
=20
I have a problem in one of my 8.1.6 databases;
=20
After completing the on-line backup (Begin/End backup) I do a 'archive =
log
stop', but the .arc-file is NOT written to disk, so my on-line backup =
is
useless...
To avoid this, I do an 'alter system switch logfile', and then stop the
archiver. I move the .arc-files to the backup-location. That's all? No,
sometimes the next archive-file has 512 bytes in it, so I move it too. =
Now I
start the archiver again, and I get an IO-error for Oracle can't find =
the
archive-file. After some errors in the alert.log Oracle creates a new
.arc-file with the same number.
=20
I don't like this. Shouldn't Oracle write the .arc-file after a =
'archive log
stop'?
=20
I know I can solve it by querying the database for the active log =
number,
but it doesn't make things too easy.....
=20
Here is what happens;
=20
-rw-r----- 1 oracle oinstall 536064 Oct 26 11:00 arch_1_31913.arc
-rw-r----- 1 oracle oinstall 24064 Oct 26 11:02 arch_1_31914.arc
SVRMGR> archive log stop
Statement processed.
SVRMGR> !ls -l
total 608896
-rw-r----- 1 oracle oinstall 536064 Oct 26 11:00 arch_1_31913.arc
-rw-r----- 1 oracle oinstall 24064 Oct 26 11:02 arch_1_31914.arc
SVRMGR> alter system switch logfile;
Statement processed.
SVRMGR> !ls -l
total 608896
-rw-r----- 1 oracle oinstall 536064 Oct 26 11:00 arch_1_31913.arc
-rw-r----- 1 oracle oinstall 24064 Oct 26 11:02 arch_1_31914.arc
SVRMGR> archive log start
Statement processed.
SVRMGR> !ls -l
total 609200
-rw-r----- 1 oracle oinstall 536064 Oct 26 11:00 arch_1_31913.arc -rw-r----- 1 oracle oinstall 24064 Oct 26 11:02 arch_1_31914.arc -rw-r----- 1 oracle oinstall 143872 Oct 26 11:12 arch_1_31915.arcSVRMGR> alter system switch logfile;
-rw-r----- 1 oracle oinstall 536064 Oct 26 11:00 arch_1_31913.arc -rw-r----- 1 oracle oinstall 24064 Oct 26 11:02 arch_1_31914.arc -rw-r----- 1 oracle oinstall 143872 Oct 26 11:12 arch_1_31915.arc -rw-r----- 1 oracle oinstall 2048 Oct 26 11:12 arch_1_31916.arc
------_=_NextPart_001_01C03F59.7EA07CA0
Content-Type: text/html;
charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META content="MSHTML 5.00.2314.1000" name=GENERATOR> <STYLE></STYLE> </HEAD>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=165191714-26102000>The command I use for listing is:</SPAN></FONT></DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPANclass=165191714-26102000></SPAN></FONT> </DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=165191714-26102000>ls /oracle/leads/redo/arch/*.ARC >logfile.lst<BR>sleep 10<BR>cat logfile.lst |<BR>sed "s/\(.*\/\)\([^\/].*\)/mv \1\2 \/home1\/orabackup\/`date +%b%dleads`\/\2/" >logfile.shl<BR>sh logfile.shl</SPAN></FONT></DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=165191714-26102000></SPAN></FONT> </DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=165191714-26102000>The second "sleep" in this puppy is to allow the archive log to finish archiving (hopefully) before the copy (move) process begins.</SPAN></FONT></DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=165191714-26102000></SPAN></FONT> </DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=165191714-26102000>I got this command from a white paper I found on the web after a conversation about this very problem last year. I think perhaps Rachael Carmichael looked over my previous script and suggested an improvement.</SPAN></FONT></DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=165191714-26102000></SPAN></FONT> </DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=165191714-26102000>Sorry, I don't have the URL.</SPAN></FONT></DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=165191714-26102000></SPAN></FONT> </DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=165191714-26102000>Hope this helps.<BR></DIV></SPAN></FONT>
size=2>Oracle DBA - ConnectSouth</FONT> <BR><FONT face=Arial size=2>512-681-9438</FONT> <BR><FONT face=Arial size=2>dbarbour_at_connectsouth.com</FONT> </P><BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV><FONT face=Courier size=2>Dear listers,</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Courier size=2>I have a problem in one of my 8.1.6databases;</FONT></DIV>
<DIV> </DIV> <DIV><FONT face=Courier size=2>Here is what happens;</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Courier size=2>-rw-r----- 1 oracle oinstall 536064 Oct 26 11:00 arch_1_31913.arc<BR>-rw-r----- 1 oracle oinstall 24064 Oct 26 11:02 arch_1_31914.arc<BR>SVRMGR> archive log stop<BR>Statement processed.<BR>SVRMGR> !ls -l<BR>total 608896<BR>-rw-r----- 1 oracle oinstall 536064 Oct 26 11:00 arch_1_31913.arc<BR>-rw-r----- 1 oracle oinstall 24064 Oct 26 11:02 arch_1_31914.arc<BR>SVRMGR> alter system switch logfile;<BR>Statement processed.<BR>SVRMGR> !ls -l<BR>total 608896<BR>-rw-r----- 1 oracle oinstall 536064 Oct 26 11:00 arch_1_31913.arc<BR>-rw-r----- 1 oracle oinstall 24064 Oct 26 11:02 arch_1_31914.arc<BR>SVRMGR> archive log start<BR>Statement processed.<BR>SVRMGR> !ls -l<BR>total 609200<BR>-rw-r----- 1 oracle oinstall 536064 Oct 26 11:00 arch_1_31913.arc<BR>-rw-r----- 1 oracle oinstall 24064 Oct 26 11:02 arch_1_31914.arc<BR>-rw-r----- 1 oracle oinstall 143872 Oct 26 11:12 arch_1_31915.arc<BR>SVRMGR> alter system switch logfile;<BR>Statement processed.<BR>SVRMGR> !ls -l<BR>total 609204<BR>-rw-r----- 1 oracle oinstall 536064 Oct 26 11:00 arch_1_31913.arc<BR>-rw-r----- 1 oracle oinstall 24064 Oct 26 11:02 arch_1_31914.arc<BR>-rw-r----- 1 oracle oinstall 143872 Oct 26 11:12 arch_1_31915.arc<BR>-rw-r----- 1 oracle oinstall 2048 Oct 26 11:12 arch_1_31916.arc<BR></FONT> </DIV>
<DIV><FONT face=Courier size=2>Anyone on this?</FONT></DIV> <DIV> </DIV> <DIV> </DIV> <DIV><FONT face=Courier size=2>Met vriendelijke groeten / With regards /Ystävällisin terveisin,<BR>Sonera Plaza Nederland B.V.</FONT></DIV> Received on Thu Oct 26 2000 - 09:31:57 CDT