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: Oracle Doc Error

Re: Oracle Doc Error

From: Yong Huang <yong321_at_yahoo.com>
Date: 25 Jan 2004 11:32:58 -0800
Message-ID: <b3cb12d6.0401251132.34e80adf@posting.google.com>


danielroy10junk_at_hotmail.com (Daniel Roy) wrote in message news:<3722db.0401211957.eb6c17d_at_posting.google.com>...
>
> I was going through the chapter 7 of the Admin guide 9.2 on
> tahiti.oracle.com, about the redo logs. On that page, Oracle states
> that "If you need to drop the current group, first force a log switch
> to occur.". This looked fishy to me, so I decided to test it:
...
> As you can see, it seems to me that before being able to drop a log
> group, a log switch must of course have occurred. But a checkpoint up
> to at least the end of the log group must also have occurred! Is my
> counter-example correct, or I'm missing something?
 

Hi, Daniel,

The documenation is indeed not detailed enough. Further, SQL Reference says "When you force a log switch, Oracle begins to perform a checkpoint but returns control to you immediately rather than when the checkpoint is complete."

The confusion is due to the special "log switch checkpoint". There're many types of checkpoints; incidentally, I believe Rama Velpuri's book talks about them all. Metalink Note:76713.1 explains that a log switch checkpoint is a zero priority "checkpoit" (quotes are mine), and in most cases doesn't really do the checkpoint as we understand. If you set log_checkpoints_to_alert = true, tail -f alert.log, and switch logfile, you'll see

Sun Jan 25 11:00:58 2004
Beginning log switch checkpoint up to RBA [0xe.2.10], SCN: 0x0000.002a5767
Thread 1 advanced to log sequence 14
  Current log# 1 seq# 14 mem# 0: C:\ORACLE\ORADATA\ORCL\REDO01.LOG

Note there's no Completed lines. Then alter system checkpoint, and you'll see

Sun Jan 25 11:01:47 2004
Beginning global checkpoint up to RBA [0xe.3e.10], SCN: 0x0000.002a57c6
Completed checkpoint up to RBA [0xe.3e.10], SCN: 0x0000.002a57c6 Completed checkpoint up to RBA [0xe.2.10], SCN: 0x0000.002a5767

Note the SCN on the last line is the log switch checkpoint SCN. The real checkpoint has a later SCN than the "fake" log switch checkpoint SCN. But for completeness, Oracle is nice enough to show the last line so we can have a match with its Beginning line.

Yong Huang Received on Sun Jan 25 2004 - 13:32:58 CST

Original text of this message

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