Advantage of FORCE LOGGING over NOLOGGING

Hi,
Can you please help me on the advantages of using force logging mode with a standby database and the effect of it in indexes etc. Also, it may help if you could also share ideas on difference between the two modes?
Thanks,
Jennah

<i>>>  Can you help me what factors would be sacrificed</i>
This really depends on your system, in most cases you will not be able to see a difference. However i did a small test:
- drop index, restart db
- create index with logging (measure time/redo size)
- drop index, restart db
- create index with logging (measure time/redo size)
Result:
logging - Elapsed: 00:02:40.68  / Redo size: 800mb
nologging - Elapsed: 00:02:20.29 / Redo size: 1.5mb
Here the full test:
[code]SQL> select a.name, b.value from v$statname a, v$mystat b where a.statistic# = b.statistic# and a.name = 'redo size';
NAME                                                                  VALUE
redo size                                                             28304
SQL> CREATE UNIQUE INDEX "SAPR3"."CDCLS~0" ON "SAPR3"."CDCLS"
("MANDANT", "OBJECTCLAS", "OBJECTID", "CHANGENR", "PAGENO")
  PCTFREE 10 INITRANS 2 MAXTRANS 255
  STORAGE(INITIAL 65536 NEXT 65536 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "PSAPCLUI" LOGGING;
Index created.
Elapsed: 00:02:40.68
SQL> select a.name, b.value from v$statname a, v$mystat b where a.statistic# = b.statistic# and a.name = 'redo size';
NAME                                                                  VALUE
redo size                                                         834714816
SQL> select segment_name, bytes/1024/1024 "Size_MB" from dba_segments where segment_name = 'CDCLS~0'
SEGMENT_NAME            Size_MB
CDCLS~0                     800
drop index / db restart here
SQL> select a.name, b.value from v$statname a, v$mystat b where a.statistic# = b.statistic# and a.name = 'redo size';
NAME                                                                  VALUE
redo size                                                             28992
SQL> CREATE UNIQUE INDEX "SAPR3"."CDCLS~0" ON "SAPR3"."CDCLS"
("MANDANT", "OBJECTCLAS", "OBJECTID", "CHANGENR", "PAGENO")
  PCTFREE 10 INITRANS 2 MAXTRANS 255
  STORAGE(INITIAL 65536 NEXT 65536 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "PSAPCLUI" NOLOGGING; 
Index created.
Elapsed: 00:02:20.29
SQL> select a.name, b.value from v$statname a, v$mystat b where a.statistic# = b.statistic# and a.name = 'redo size';
NAME                                                                  VALUE
redo size                                                           1520824
SQL> select segment_name, bytes/1024/1024 "Size_MB" from dba_segments where segment_name = 'CDCLS~0';
SEGMENT_NAME            Size_MB
CDCLS~0                     800[/code]

Similar Messages

  • Force logging for data guard

    It is my understanding new to version 11g force logging is not required on the database? So we could setup a tablespace for staging tables in no logging and not generate as much redo to be shipped over to the standby?
    Is this true or was that feature added in 10? I have hunted around on OTN for some info on the subject. could anyone provide a link?
    Thanks

    I've seen nothing that indicates "force logging is not required but the idea that somehow there is an advantage to no logging is grossly overstated.
    I'd suggest that you go to http://asktom.oracle.com and read Tom's comments about it.
    If your system is so close to falling over that a little bit of logging is going to tip it over you've huge problems you'd best deal with immediately.
    Consider, for example, setting up your staging tables as global temporary tables.

  • Force logging in archivelog mode

    Hi !!!
    What happen if I have "force_logging" parameter set to true when the database is in archivelog mode ?
    Thanks.

    rarain wrote:
    Hi Juamd,
    You should only use this option when it is really required because this option will forcibly generate redo for all Nologging operations that means you might find more archives and you need to setup more space for archive.
    Normally we use this option when we need to replicate data changes from one database to another database like in standby configuration, Golden Gate replication etc. I would suggest you to monitor Redo amount generated after enabling this option and accordingly estimate archive space and backup space for archive.
    Thanks...Ah, don't agree with that at all. You can compromise your recovery if you happen to want to restore to a point-in-time when there was a NOLOGGING operation going on. Fine, if it's an index, but if it happens to be on a table...
    (Yes, been there, done that - with a non-Production database, thankfully)
    This is one of the 'must haves', IMO, for Production - set it at the database-level and it overrides any tablespace or object setting.
    Archivelogs are generated for a reason. If you have a particular operation that really does massively benefit from NOLOGGING and is something you are sure that you simply re-run/re-create yourself, fine. If not, by default, you really should FORCE LOGGING.

  • Should we use LOGGING or NOLOGGING for table, lob segment, and indexes?

    We have some DML performance issue on cf contention over the tables that also include LOB segments. In this case, should we define LOGGING on tables, lob segments, and/or INDEXES?
    Based on the metalink note < Performance Degradation as a Result of 'enq: CF - contention' [ID 1072417.1]> It looks we need to turn on logging for at least table and lob segment. What about the indexes?
    Thanks!

    >
    These tables that have nologging are likely from the application team. Yes, we need to turn on the logging from nologging for tables and lob segments. What about the indexes?
    >
    Indexes only get modified when the underlying table is modified. When you need recovery you don't want to do things that can interfere with Oracle's ability to perform its normal recovery. For indexes there will never be loss of data that can't be recovered by rebuilding the index.
    But use of NOLOGGING means that NO RECOVERY is possible. For production objects you should ALWAYS use LOGGING. And even for those use cases where use of NOLOGGING is appropriate for a table (loading a large amount of data into a staging table) the indexes are typically dropped (or at least disabled) before the load and then rebuilt afterward. When they are rebuilt NOLOGGING is used during the rebuild. Normal index operations will be logged anyway so for these 'offline' staging tables the setting for the indexes doesn't really matter. Still, as a rule of thumb you only use NOLOGGING during the specific load (for a table) or rebuild (for an index) and then you would ALTER the setting to LOGGING again.
    This is from Tom Kyte in his AskTom blog from over 10 years ago and it still applies today.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5280714813869
    >
    NO NO NO -- it does not make sense to leave objects in NOLOGGING mode in a production
    instance!!!! it should be used CAREFULLY, and only in close coordination with the guys
    responsible for doing backups -- every non-logged operation performed makes media
    recovery for that segment IMPOSSIBLE until you back it up.
    >
    Use of NOLOGGING is a special-case operation. It is mainly used in Datawarehouse (OLAP systems) data processing during truncate-and-load operations on staging tables. Those are background or even offline operations and the tables are NOT accessible by end users; they are work tables used to prepare the data that will be merged to the production tables.
    1. TRUNCATE a table
    2. load the table with data
    3. process the data in the table
    In those operations the table load is seldom backed up and rarely needs recovery. So use of NOLOGGING enhances the performance of the data load and the data can be recovered, if necessary, from the source it was loaded from to begin with.
    Use of NOLOGGING is rarely, if ever, used for OLTP systems since that data needs to be recovered.

  • Physical standby without ALTER DATABASE FORCE LOGGING

    Hi,
    Is it possible to use physical standby database without executing ALTER DATABASE FORCE LOGGING on primary side?
    Can I use alter tablespace force logginng instead?
    I want to have one tablespace with nologging option turned on to reduce redo traffic for some operations.
    I can not check this because I don`t have enough servers to build standby configuration.

    YuriAP wrote:
    Hi,
    Is it possible to use physical standby database without executing ALTER DATABASE FORCE LOGGING on primary side?
    YES
    Can I use alter tablespace force logginng instead?
    YES
    ALTER TABLESPACE <tablespace name> FORCE LOGGING;
    I want to have one tablespace with nologging option turned on to reduce redo traffic for some operations.
    I can not check this because I don`t have enough servers to build standby configuration.http://download.oracle.com/docs/cd/B10500_01/server.920/a96521/create.htm#1022863

  • Force logging at tablespace level for standby database

    Hi
    Can we create a standby database by enabling force logging at tablespace level instead of enabling it at database level.I want to out the tablespace containing indexes in nologging mode so that when I rebuild the indexes no logs will be generated.

    Technically, you can create a Standby without having set FORCELOGGING at the Primary database.
    You can also then selectively FORCELOGGING for all your important tablespaces (beginning with SYSTEM, SYSAUX, UNDO ....)
    However, for a Physical Standby Redo Apply will mark the blocks (e.g. those populated by the CREATE INDEX .. NOLOGGING) as "corrupt". You will get Read Errors (ORA-1578 and ORA-26040) when you attempt to read the index (e.g. for a Table query).
    So you have to monitor your NOLOGGING operations and the datafiles where NOLOGGING is applied. You can take Incremental RMAN Backups of such datafiles and restore them to the Standby immediately after the NOLOGGING operations.
    Hemant K Chitale

  • Direct load with Force Logging enable

    Hi All,
    I have a dataguard environment with one physical standby database, I have to load a big flat file with close to 50Millions records using sqlldr. can i use direct=true in sqlldr,with force logging enabled on primary? or they is any other way to load this file
    FYI- ORACLE 11GR2
    Thanks

    Thanks for that information.
    The direct=true means what you think, Loaded data will not be replicated. However its make sense and your test proves that Data Guard overrides this.
    based on this you might as well go conventional path.
    Does this help?
    Its makes sense that Data Guard would override this, otherwise Data Guard would (or Forced logging) would not be doing its job.
    From Oracle doc A96524-01 Database Concepts 19 Direct-Path INSERT
    If the database or tablespace is in FORCE LOGGING mode, then direct path INSERT always logs, regardless of the logging or nologging setting.
    I know this an older doc, but its unlikely this would have changed

  • Which sys view has whether a mat. view is logging or nologging

    I am looking for the view that contains information about whether a materialized view is set as logging or nologging. I would like most replication to bypass redo logs.

    If you are on 9i onwards you can use DBMS_METADATA. Here an example :
    SCOTT@db102 SQL> select dbms_metadata.get_ddl('MATERIALIZED_VIEW','TEST_EMP','SCOTT') from dual;
    DBMS_METADATA.GET_DDL('MATERIALIZED_VIEW','TEST_EMP','SCOTT')
      CREATE MATERIALIZED VIEW "SCOTT"."TEST_EMP"
      ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOG
    GING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"
      BUILD IMMEDIATE
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"
      REFRESH FORCE ON DEMAND
      WITH ROWID USING DEFAULT LOCAL ROLLBACK SEGMENT
      DISABLE QUERY REWRITE
      AS SELECT "NEWEMP"."EMPNO" "EMPNO","NEWEMP"."ENAME" "ENAME","NEWEMP"."JOB" "JO
    B","NEWEMP"."MGR" "MGR","NEWEMP"."HIREDATE" "HIREDATE","NEWEMP"."SAL" "SAL","NEW
    EMP"."COMM" "COMM","NEWEMP"."DEPTNO" "DEPTNO" FROM "NEWEMP"@ORCL "NEWEMP"
    SCOTT@db102 SQL>                                                                                     

  • Advantages of using BO over tools provided in BEx

    Hi,
    I am wanting to know if there is any documentation enlisting the advantages of using BO over the tools provided in BEx.
    Also, what is the advantage of using BO analysing data from cubes in BI 7.0 than accessing data from SAP R/3 directly.
    Thank you.

    Hi
    Advantages of BO (as well as other Query/Reporting) are that they provide robust end users interfaces
    in terms of designing queries, reports and also run on a standalone desktop client. Their user interface is
    easy to use and much easier environment to design manus, drop-down boxes/lists and buttons and also provide wizards to help users guide. These tools can also work against several heterogenous data sources.
    There are several factors one needs to keep in mind when selecting 3rd Party tools for SAP BW. A few are listed below:
    BO uses OLEDB for OLAP API via BEX query. This causes extra overhead because here you have BEX resources and then you add up BO resources to manage infrmation to/from BEX query over the OLEDB interface. Some vendors, like arcplan, use OLAP BAPI to access BW data. This API has somewhat lower overhead because it bypasses the OLEDB for OLAP layer.
    As you know that BEX is MSExcel based. It is not easy to build sophisticatecd user interfaces without doing extensive VBA or Macro programming.
    Thanks & Regards
    Praveen Yagnamurthy

  • Advantages of using NWA over Visual J2EE Admin Tool

    Hello,
    can you please tell me What are the advantages of using NWA over Visual J2EE Admin Tool ?
    Thanks,
    Teja

    Hi
    Other then the previous reply,In simplest word we can say --now we have two way to admin the content in the landscape.
    1.If we want to do it off-line the we can do form Visual admin( works well because after modification we start the server for changes takes place)
    2. Form NWA we can do all administration with indicative navigation (quite frustrating in visual tool ) and no need to start /restart the surver
    Best Regards
    Satish Kumar

  • Advantages of using activities over outlook

    Hello, All
    Can any one explain me the advantages of using activities over outlook? In Outlook you can schedule the activities for the whole day, see if the period of an activity clashes with another activity so you can reschedule it etc.
    In short, can anyone explain why would anyone prefer using Activity Management over Outlook?
    If any documentation is available please mail me at [email protected]
    Regards
    Jacopo François

    Hi
    Other then the previous reply,In simplest word we can say --now we have two way to admin the content in the landscape.
    1.If we want to do it off-line the we can do form Visual admin( works well because after modification we start the server for changes takes place)
    2. Form NWA we can do all administration with indicative navigation (quite frustrating in visual tool ) and no need to start /restart the surver
    Best Regards
    Satish Kumar

  • Need advice about making a application log over every task succsessfully done to a target

    Hi!!!
    I need an advice about how to make an application log over every task succsessfully done to a target with an unique ID.
    I have developed an application with several tasks on the menu which have to be done in a certain order to program and test a target board,
    and the user want a log about which tasks are done to the target, so it is easy to know which step is next on the menu (It is a very routinebased  job).
    Do somebody have any good advice on how this can be done in a cleaver way ?
    Best regards,
    A

    Also, now that I have an ethernet cable, if I go ahead and use migration assistant to transfer the account from my old computer, will Logic only be available through the new account I have set up on my new computer? Would I have to log out of one account and into the other and back and forth to access the different files/programs? Any help would be much appreciated

  • FORCE LOGGING

    I want to create a physical standby database. The primary database is in archive log mode, and the 50% of the data belong to the staging area of datawarehouse. During ETL processes the database generates great amount of GBs of redologs. This tables contain temporary data that are only used for ETL process.
    Can I set the database like FORCE LOGGING=N and set FORCE LOGGING=Y only for the tablespace that contain the tables of data (production, not intermediate) ???

    If you are trying to run a physical standby, for any database larger and more important than a toy, across the internet you are doomed to failure.
    Databases do not fail on predictable schedules.
    A DR site means a DR site ... it does not mean someplace out there in the cloud. For all you know your redo is being shipped to the moon and
    back. Buy room in a data center no more than 500km away from your current location.
    DR is for serious people with serious issues. If you do not need it then don't build it. If you do need it build it correctly.

  • Wat is the advantage of force view?

    hello,
    only i know that it is created object in db and after tat we can create the table as per requirement.
    please tell me wat is the main advantage of Force View?
    Tks
    PM

    Hello PM,
    if you have mutual dependencies, e.g. between a package and a view, then you cannot create the view because of an invalid package and you cannot validate the package because the view does not exist.
    A workaround has been to create a dummy view, compile the package and create the actual view. Now you can force Oracle to create the view and then compile the package.
    Regards
    Marcus

  • Advantages in Webdynpro Java Over WD ABAP

    Hi All
    Can you please let me know what are the advantages in webdynpro java over WD ABAP??
    if anybody helps quickly then it would be great help to me
    Thanks
    Trisha Rani

    Hi,
      Both WDA and WDJ are almost same in designing and programming.
      In relation to the business packages SAP already provided allmost all of them in java and in the future all the Business packages also available in ABAP. It's all how you want to develop the application. In sap portal world some applciation which we can develop with ABAP Web Dynpro and some applications with JAVA Web Webdynpro as SAP Web AS available as dual stack.
    If someone already has a strong ABAP background and has WD for ABAP available they should probably use that. If they are a J2EE developer they should probably use WD for Java but it is likely they will also then need some ABAP support for the backend systems.
    I think more customers may be asking for WD for Java projects simply because it has been around longer and is more widely available to customers where as some cutomers prefer to develop their application using ABAP Web Dynpro because of SAP propritary. But ultimately it's again all our interest and customer.
    Check this blog,
    /people/oliver.mayer/blog/2006/06/14/web-dynpro-abap-or-java
    http://www.sapfrontend.com/webdynpro-for-java-or-webdynpro-for-abap/
    Hoe this helps you..
    Regards,
    Saleem

Maybe you are looking for

  • Problem backing up system on external hard drive

    Yesterday my Mac kept freezing, so I restarted the system. Since then when I try to boot up it gets stuck on the grey screen with the apple logo, saying it's loading but it sticks there forever. I wanted to save all my data before I reformated my com

  • Wht changes is to be done in XI while moving to ECC 5.0 to ECC 6.0

    Hi Experts, In my project client has implemented ECC 5.0 and now they are moving to ECC 6.0 ,so what are changes is to be done in XI in (DEV ,QA,PROD) when our ECC5.0 move to ECC 6.0.

  • How to display table field data using checkbox

    Dear sir,           I have created PR using ME51N.  Our PR datas in EKPO table.            I have created select-option with prdat and Checkbox for to view PR open or closed status.           I want check PR status details from date to date using che

  • Bulk file upload error: File to IDoc

    Dear all, I have a File -> XI -> IDoc scenario. The scenario is working fine for files with filesize 2 MB. But, when I upload a bulk file with filesize 23 MB, it is Struck in XI In the SXMB_MONI, I see the error flag in the "Outbound Status" The erro

  • HT5052 how to download ios 5.0.1 instead of ios 5.1?

    how to download ios 5.0.1 instead of ios 5.1?