From oracle-l-bounce@freelists.org Thu Apr 8 10:08:56 2004 Return-Path: Received: from air189.startdedicated.com (root@localhost) by orafaq.com (8.11.6/8.11.6) with ESMTP id i38F8uK14883 for ; Thu, 8 Apr 2004 10:08:56 -0500 X-ClientAddr: 206.53.239.180 Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180]) by air189.startdedicated.com (8.11.6/8.11.6) with ESMTP id i38F8uo14878 for ; Thu, 8 Apr 2004 10:08:56 -0500 Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 890FE6350A5; Thu, 8 Apr 2004 10:02:51 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26635-22; Thu, 8 Apr 2004 10:02:51 -0500 (EST) Received: from turing (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 0DB576350CA; Thu, 8 Apr 2004 10:02:44 -0500 (EST) Received: with ECARTIS (v1.0.0; list oracle-l); Thu, 08 Apr 2004 10:01:30 -0500 (EST) X-Original-To: oracle-l@freelists.org Delivered-To: oracle-l@freelists.org Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id CA140634F8F for ; Thu, 8 Apr 2004 10:01:29 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26344-16 for ; Thu, 8 Apr 2004 10:01:29 -0500 (EST) Received: from smtp-out4.xs4all.nl (smtp-out4.xs4all.nl [194.109.24.5]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id EF5146345FA for ; Thu, 8 Apr 2004 10:01:27 -0500 (EST) Received: from dbalert99a.xs4all.nl (dbalert.xs4all.nl [213.84.185.230]) by smtp-out4.xs4all.nl (8.12.10/8.12.10) with ESMTP id i38FAvCZ082595 for ; Thu, 8 Apr 2004 17:10:58 +0200 (CEST) Message-Id: <6.0.1.1.0.20040408164729.44572a00@pop.xs4all.nl> X-Sender: (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.0.1.1 Date: Thu, 08 Apr 2004 17:11:10 +0200 To: oracle-l@freelists.org From: Carel-Jan Engel Subject: Re: [Q] what differtent between logical standby database and physical standby DB? In-Reply-To: <20040408123201.12265.qmail@web60808.mail.yahoo.com> References: <20040408123201.12265.qmail@web60808.mail.yahoo.com> Mime-Version: 1.0 Content-type: text/plain X-Virus-Scanned: by amavisd-new at freelists.org Content-Transfer-Encoding: 8bit X-archive-position: 2778 X-ecartis-version: Ecartis v1.0.0 Sender: oracle-l-bounce@freelists.org Errors-To: oracle-l-bounce@freelists.org X-original-sender: cjpengel.dbalert@xs4all.nl Precedence: normal Reply-To: oracle-l@freelists.org X-list: oracle-l X-Virus-Scanned: by amavisd-new at freelists.org Dear dba1, I'm sorry I have to diappoint you, but redolog does _not_ contain SQL statements. Redo log just contains 'change vectors'. Simplified, these vectors hold an id of a datablock, an offset where the change should be made and the sequence of bytes that should be written to that block/offset. When redo lg would conatin SQL statements, they all had to be parsed, validated, optimized and executed during a recovery operation. Of course, that would make a recovery rather slow. So, physical standby (PSB) is a database that is in recovery mode. Due to that, it cannot be read, let alone changed, It just receives changes from the primary database, either send by the logwriter or the archiver. Of course, having the changes send by the logwriter will give you better results: (redo log) data will arrive earlier at the standby. The archiver will just send the redo log information at a log switch, either forced or whenever the logfile is full. That might take some time: today I was at a site where some ignorants implemented a High Available system. The database is 500 MB, the redologfiles 100MB. It might take some time before the logswitch will occur. In the meantime your transactions are not safe! You can open a PSB database in Read Only mode. Forwarding of redolog will continue while it is R/O, but the redo logs will not be applied until it is put back into managed recovery mode. Now to logical standby (LSB). Opposed to PSB, the standby in an LSB envrionment is not in recovery mode, it is opened for read/write. However, objects, involved in the LSB configuration cannot be changed. Now we will encounter some other software parts, where Oracle might have reused some of there previously developed features. First we have to enrich the redolog info with the so-called supplemental logging. This extra information is needed to be able to reverse engineer SQL statements from the redo log information, just change vectors will not be enough. Then we see streams. this can be used for forwarding messages/database changes to other databases. It all looks pretty similar to a streams-wise set-up, however, the redolog information gets forwarded to the standby site first. At the standby site, the redo log information is used to create SQL statements again. Thes SQL statements will be applied to the database by one or more SQL Apply processes. You can have other indexes on your tables at the standby as you have at the primary. These indexes can serve reporting purposes, where the indexes on the primary are optimized for OLTP. In 9iR2 the information in the redo log files doesn't get applied until a log switch is performed (PSB and LSB). So, you cannot enter an order in the primary, press the button and have the invoice printed immediately from the stanby: It will not be available at the standby (talking LSB now). Oracle claims that immediate apply is available in 10g. I've encountered LSB in 9iR2 to be pretty unstable, and at least not good enough for High Availability purposes. It comes with a lot of restrictions, too. PSB works very good. There are some nasty bugs in it in 9.2.0.2 and 3, so upgrade to 9.2.0.4 (or 5?) whenever possible. I have not been able to test the DG-stuff in 10g yet. Regards, and give my regards to dba2 as well, Carel-Jan === If you think education is expensive, try ignorance. (Derek Bok) === At 02:32 PM 4/8/2004, you wrote: >I read document it mention logical standby DB use "sql >statements apply" and physical standby use "redo log >apply". I got confuse. "redo log aplly" should same >like "sql statements apply", due to "redo log" >includes hundreds SQL statements. > >Can anyone give me a hint? > >Thanks. > >__________________________________ >Do you Yahoo!? >Yahoo! Small Business $15K Web Design Giveaway >http://promotions.yahoo.com/design_giveaway/ >---------------------------------------------------------------- >Please see the official ORACLE-L FAQ: http://www.orafaq.com >---------------------------------------------------------------- >To unsubscribe send email to: oracle-l-request@freelists.org >put 'unsubscribe' in the subject line. >-- >Archives are at http://www.freelists.org/archives/oracle-l/ >FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html >----------------------------------------------------------------- ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request@freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------