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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Archive log-switch after on-line backup

RE: Archive log-switch after on-line backup

From: David Barbour <DBarbour_at_connectsouth.com>
Date: Thu, 26 Oct 2000 09:31:57 -0500
Message-Id: <10661.120286@fatcity.com>


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.arc
SVRMGR> alter system switch logfile;
Statement processed.
SVRMGR> !ls -l
total 609204
-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

=20

Anyone on this?
=20
=20

Met vriendelijke groeten / With regards / Yst=E4v=E4llisin terveisin, Sonera Plaza Nederland B.V.
=20

ERIC LANSU, RED-IT via Consense
Oracle DBA / UNIX system manager=20

------_=_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>

<BODY bgColor=#ffffff>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=165191714-26102000>Eric,</SPAN></FONT></DIV> <DIV>&nbsp;</DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=165191714-26102000>I also use an archive log switch.&nbsp; 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.&nbsp; 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.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=165191714-26102000></SPAN></FONT>&nbsp;</DIV>
<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><SPAN 
class=165191714-26102000></SPAN></FONT>&nbsp;</DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=165191714-26102000>ls /oracle/leads/redo/arch/*.ARC &gt;logfile.lst<BR>sleep 10<BR>cat logfile.lst |<BR>sed "s/\(.*\/\)\([^\/].*\)/mv \1\2 \/home1\/orabackup\/`date +%b%dleads`\/\2/" &gt;logfile.shl<BR>sh logfile.shl</SPAN></FONT></DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=165191714-26102000></SPAN></FONT>&nbsp;</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>&nbsp;</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.&nbsp; 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>&nbsp;</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>&nbsp;</DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=165191714-26102000>Hope this helps.<BR></DIV></SPAN></FONT>
<DIV>&nbsp;</DIV>
<P><FONT face=Arial size=2>David A. Barbour</FONT> <BR><FONT face=Arial
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 align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma   size=2>-----Original Message-----<BR><B>From:</B> Eric Lansu   [mailto:eric.lansu_at_quicknet.nl]<BR><B>Sent:</B> Thursday, October 26, 2000   5:25 AM<BR><B>To:</B> Multiple recipients of list ORACLE-L<BR><B>Subject:</B>   Archive log-switch after on-line backup<BR><BR></DIV></FONT>
  <DIV><FONT face=Courier size=2>Dear listers,</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Courier size=2>I have a problem in one of my 8.1.6 
  databases;</FONT></DIV>
  <DIV><FONT face=Courier size=2></FONT>&nbsp;</DIV>   <DIV><FONT face=Courier size=2>After&nbsp;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...</FONT></DIV>   <DIV><FONT face=Courier size=2>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.</FONT></DIV>   <DIV>&nbsp;</DIV>
  <DIV><FONT face=Courier size=2>I don't like this. Shouldn't Oracle write the   .arc-file after a 'archive log stop'?</FONT></DIV>   <DIV>&nbsp;</DIV>
  <DIV><FONT face=Courier size=2>I know I can solve it by querying the database   for the active log number, but it doesn't make things too   easy.....</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Courier size=2>Here is what happens;</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Courier size=2>-rw-r-----&nbsp;&nbsp; 1 oracle&nbsp;&nbsp; 
  oinstall&nbsp; 536064 Oct 26 11:00 arch_1_31913.arc<BR>-rw-r-----&nbsp;&nbsp;   1 oracle&nbsp;&nbsp; oinstall&nbsp;&nbsp; 24064 Oct 26 11:02   arch_1_31914.arc<BR>SVRMGR&gt; archive log stop<BR>Statement   processed.<BR>SVRMGR&gt; !ls -l<BR>total 608896<BR>-rw-r-----&nbsp;&nbsp; 1   oracle&nbsp;&nbsp; oinstall&nbsp; 536064 Oct 26 11:00   arch_1_31913.arc<BR>-rw-r-----&nbsp;&nbsp; 1 oracle&nbsp;&nbsp;   oinstall&nbsp;&nbsp; 24064 Oct 26 11:02 arch_1_31914.arc<BR>SVRMGR&gt; alter   system switch logfile;<BR>Statement processed.<BR>SVRMGR&gt; !ls -l<BR>total   608896<BR>-rw-r-----&nbsp;&nbsp; 1 oracle&nbsp;&nbsp; oinstall&nbsp; 536064   Oct 26 11:00 arch_1_31913.arc<BR>-rw-r-----&nbsp;&nbsp; 1 oracle&nbsp;&nbsp;   oinstall&nbsp;&nbsp; 24064 Oct 26 11:02 arch_1_31914.arc<BR>SVRMGR&gt; archive   log start<BR>Statement processed.<BR>SVRMGR&gt; !ls -l<BR>total   609200<BR>-rw-r-----&nbsp;&nbsp; 1 oracle&nbsp;&nbsp; oinstall&nbsp; 536064   Oct 26 11:00 arch_1_31913.arc<BR>-rw-r-----&nbsp;&nbsp; 1 oracle&nbsp;&nbsp;   oinstall&nbsp;&nbsp; 24064 Oct 26 11:02   arch_1_31914.arc<BR>-rw-r-----&nbsp;&nbsp; 1 oracle&nbsp;&nbsp; oinstall&nbsp;   143872 Oct 26 11:12 arch_1_31915.arc<BR>SVRMGR&gt; alter system switch   logfile;<BR>Statement processed.<BR>SVRMGR&gt; !ls -l<BR>total   609204<BR>-rw-r-----&nbsp;&nbsp; 1 oracle&nbsp;&nbsp; oinstall&nbsp; 536064   Oct 26 11:00 arch_1_31913.arc<BR>-rw-r-----&nbsp;&nbsp; 1 oracle&nbsp;&nbsp;   oinstall&nbsp;&nbsp; 24064 Oct 26 11:02   arch_1_31914.arc<BR>-rw-r-----&nbsp;&nbsp; 1 oracle&nbsp;&nbsp; oinstall&nbsp;   143872 Oct 26 11:12 arch_1_31915.arc<BR>-rw-r-----&nbsp;&nbsp; 1   oracle&nbsp;&nbsp; oinstall&nbsp;&nbsp;&nbsp; 2048 Oct 26 11:12   arch_1_31916.arc<BR></FONT>&nbsp;</DIV>
  <DIV><FONT face=Courier size=2>Anyone on this?</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV>&nbsp;</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

Original text of this message

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