SlideShare ist ein Scribd-Unternehmen logo
1 von 1
Downloaden Sie, um offline zu lesen
Nologging                                                                         Administration Tips




What does "NOLOGGING" do for me?

The words "sod" and "all" spring to mind as one possible answer, but that would be just a
little simplistic.

What I'm getting at is that people generally take it to mean that you can switch off ALL
redo generation for an entire table (or, even better, an entire tablespace), under all
circumstances. That is simply, 100%, not true.

The nologging attribute is never respected by ordinary inserts, updates and deletes.
Boring old DML will therefore always generate redo, however many times you might yell
'nologging!!!!' at it.

Only a very select class of database actions will notice the nologging attribute, and respect
it. These include:

    o       Create index
    o       Create table new_blah as select * from old_blah
    o       SQL Loader direct loads
    o       Insert /*+APPEND*/ into table select * from table (i.e., what are termed direct
            load inserts)

...and one or two other obscure bits of DDL that are mostly related to working with table
partitions.

The 'create index' is about the only one that you're likely to encounter on a fairly regular
basis (along with, possibly, the Direct Load run of SQL Loader).

Given that, when the "nologging" attribute is respected by one of these commands, no redo
is generated for that particular operation, you should consider taking a fresh backup of the
tables or indexes affected by the nologging operation immediately it has finished. Without
such a backup, the segment affected is at risk of being effectively unrecoverable. Backups
are not a free exercise (they induce I/O and can swamp the redo system) ...so what you
gain on the lack of redo, you tend to lose on the backup work afterwards.

If you genuinely wish to switch off ALL redo generation for the entire database, it is
possible -but not by using "nologgiing". Instead, there is a hidden init.ora parameter,
_DISABLE_LOGGING (yes, that's an underscore at the very beginning!), which will do just that.
On your own head be it, however: use of hidden parameters is entirely unsupported by
Oracle, and this particular one will render your database totally and utterly unrecoverable
the very first time the Instance crashes (or you inadvertently issue a 'shutdown abort',
which amounts to the same thing).



Copyright © Howard Rogers 2001                10/17/2001                                   Page 1 of 1

Weitere ähnliche Inhalte

Ähnlich wie Nologging

White Paper for OMG! Identifying and Refactoring Common SQL...
White Paper for OMG! Identifying and Refactoring Common SQL...White Paper for OMG! Identifying and Refactoring Common SQL...
White Paper for OMG! Identifying and Refactoring Common SQL...Jeff Jacobs
 
Part1 create sequence,dual table
Part1 create sequence,dual tablePart1 create sequence,dual table
Part1 create sequence,dual tableGirija Muscut
 
Do more than one thing at the same time, the Python way
Do more than one thing at the same time, the Python wayDo more than one thing at the same time, the Python way
Do more than one thing at the same time, the Python wayJaime Buelta
 
A MySQL Odyssey - A Blackhole Crossover
A MySQL Odyssey - A Blackhole CrossoverA MySQL Odyssey - A Blackhole Crossover
A MySQL Odyssey - A Blackhole CrossoverKeith Hollman
 
Porting Applications From Oracle To PostgreSQL
Porting Applications From Oracle To PostgreSQLPorting Applications From Oracle To PostgreSQL
Porting Applications From Oracle To PostgreSQLPeter Eisentraut
 
Joxean Koret - Database Security Paradise [Rooted CON 2011]
Joxean Koret - Database Security Paradise [Rooted CON 2011]Joxean Koret - Database Security Paradise [Rooted CON 2011]
Joxean Koret - Database Security Paradise [Rooted CON 2011]RootedCON
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...Alex Zaballa
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...Alex Zaballa
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 
Look inside the locking mechanism
Look inside the locking mechanismLook inside the locking mechanism
Look inside the locking mechanismLiron Amitzi
 

Ähnlich wie Nologging (20)

Oracle NOLOGGING
Oracle NOLOGGINGOracle NOLOGGING
Oracle NOLOGGING
 
White Paper for OMG! Identifying and Refactoring Common SQL...
White Paper for OMG! Identifying and Refactoring Common SQL...White Paper for OMG! Identifying and Refactoring Common SQL...
White Paper for OMG! Identifying and Refactoring Common SQL...
 
Loadblobs
LoadblobsLoadblobs
Loadblobs
 
Part1 create sequence,dual table
Part1 create sequence,dual tablePart1 create sequence,dual table
Part1 create sequence,dual table
 
Do more than one thing at the same time, the Python way
Do more than one thing at the same time, the Python wayDo more than one thing at the same time, the Python way
Do more than one thing at the same time, the Python way
 
Duplicaterows
DuplicaterowsDuplicaterows
Duplicaterows
 
A MySQL Odyssey - A Blackhole Crossover
A MySQL Odyssey - A Blackhole CrossoverA MySQL Odyssey - A Blackhole Crossover
A MySQL Odyssey - A Blackhole Crossover
 
Undo internals paper
Undo internals paperUndo internals paper
Undo internals paper
 
Tablespacelmt
TablespacelmtTablespacelmt
Tablespacelmt
 
Corruptbkp
CorruptbkpCorruptbkp
Corruptbkp
 
Porting Applications From Oracle To PostgreSQL
Porting Applications From Oracle To PostgreSQLPorting Applications From Oracle To PostgreSQL
Porting Applications From Oracle To PostgreSQL
 
Oracle11g notes
Oracle11g notesOracle11g notes
Oracle11g notes
 
ZODB Tips and Tricks
ZODB Tips and TricksZODB Tips and Tricks
ZODB Tips and Tricks
 
ZODB Tips and Tricks
ZODB Tips and TricksZODB Tips and Tricks
ZODB Tips and Tricks
 
Joxean Koret - Database Security Paradise [Rooted CON 2011]
Joxean Koret - Database Security Paradise [Rooted CON 2011]Joxean Koret - Database Security Paradise [Rooted CON 2011]
Joxean Koret - Database Security Paradise [Rooted CON 2011]
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Look inside the locking mechanism
Look inside the locking mechanismLook inside the locking mechanism
Look inside the locking mechanism
 

Mehr von oracle documents (20)

Applyinga blockcentricapproachtotuning
Applyinga blockcentricapproachtotuningApplyinga blockcentricapproachtotuning
Applyinga blockcentricapproachtotuning
 
Windowsosauthent
WindowsosauthentWindowsosauthent
Windowsosauthent
 
Whatistnsnames
WhatistnsnamesWhatistnsnames
Whatistnsnames
 
Whatisadatabaselink
WhatisadatabaselinkWhatisadatabaselink
Whatisadatabaselink
 
Varraysandnestedtables
VarraysandnestedtablesVarraysandnestedtables
Varraysandnestedtables
 
Usertracing
UsertracingUsertracing
Usertracing
 
Userpasswrd
UserpasswrdUserpasswrd
Userpasswrd
 
Userlimit
UserlimitUserlimit
Userlimit
 
Undo internalspresentation
Undo internalspresentationUndo internalspresentation
Undo internalspresentation
 
Tablerename
TablerenameTablerename
Tablerename
 
Sql scripting sorcerypresentation
Sql scripting sorcerypresentationSql scripting sorcerypresentation
Sql scripting sorcerypresentation
 
Sql scripting sorcerypaper
Sql scripting sorcerypaperSql scripting sorcerypaper
Sql scripting sorcerypaper
 
Sql for dbaspresentation
Sql for dbaspresentationSql for dbaspresentation
Sql for dbaspresentation
 
Sequencereset
SequenceresetSequencereset
Sequencereset
 
Rollbacksizes
RollbacksizesRollbacksizes
Rollbacksizes
 
Rollbackshrinks
RollbackshrinksRollbackshrinks
Rollbackshrinks
 
Rollbacklmt
RollbacklmtRollbacklmt
Rollbacklmt
 
Rollbackblocking
RollbackblockingRollbackblocking
Rollbackblocking
 
Rollback1555s
Rollback1555sRollback1555s
Rollback1555s
 
Redosize
RedosizeRedosize
Redosize
 

Nologging

  • 1. Nologging Administration Tips What does "NOLOGGING" do for me? The words "sod" and "all" spring to mind as one possible answer, but that would be just a little simplistic. What I'm getting at is that people generally take it to mean that you can switch off ALL redo generation for an entire table (or, even better, an entire tablespace), under all circumstances. That is simply, 100%, not true. The nologging attribute is never respected by ordinary inserts, updates and deletes. Boring old DML will therefore always generate redo, however many times you might yell 'nologging!!!!' at it. Only a very select class of database actions will notice the nologging attribute, and respect it. These include: o Create index o Create table new_blah as select * from old_blah o SQL Loader direct loads o Insert /*+APPEND*/ into table select * from table (i.e., what are termed direct load inserts) ...and one or two other obscure bits of DDL that are mostly related to working with table partitions. The 'create index' is about the only one that you're likely to encounter on a fairly regular basis (along with, possibly, the Direct Load run of SQL Loader). Given that, when the "nologging" attribute is respected by one of these commands, no redo is generated for that particular operation, you should consider taking a fresh backup of the tables or indexes affected by the nologging operation immediately it has finished. Without such a backup, the segment affected is at risk of being effectively unrecoverable. Backups are not a free exercise (they induce I/O and can swamp the redo system) ...so what you gain on the lack of redo, you tend to lose on the backup work afterwards. If you genuinely wish to switch off ALL redo generation for the entire database, it is possible -but not by using "nologgiing". Instead, there is a hidden init.ora parameter, _DISABLE_LOGGING (yes, that's an underscore at the very beginning!), which will do just that. On your own head be it, however: use of hidden parameters is entirely unsupported by Oracle, and this particular one will render your database totally and utterly unrecoverable the very first time the Instance crashes (or you inadvertently issue a 'shutdown abort', which amounts to the same thing). Copyright © Howard Rogers 2001 10/17/2001 Page 1 of 1