Random notes on database features, code, practice, optimization and techniques.
11) Oracle Database 10g: Maximize Availability - Backup and Recovery EnhancementsA) Simplified Recovery -
No backup needed after RESETLOGS operation. Old backups still work. Earlier, old backup files could not be used again in the new incarnation of the database after resetting logs.
Earlier, following a resetlogs archived log files could be rewritten - not anymore. So LOG_ARCHIVE_FORMAT is changed to accomodate the resetlogs operation to avoid rewrite. New (%r) format looks like %t%s
%r.arc
V$LOG_HISTORY and V$OFFLINE_RANGE are not cleared after a resetlogs.
V$DATABASE_INCARNATION
B) Full Database BEGIN BACKUP -
ALTER DATABASE (BEGIN / END) BACKUP; -- earlier was done tablespace wise.
A very nice operational change.
Is not needed for RMAN backup since RMAN backups are self-consistent (no need to take files in backup 'mode' with RMAN)>
C) FLASH BACKUP -
Oracle is banking on disk to be widely accepted as the default backup area because of (a) ease of disk backup and more because of (b) decreasing price of disk. Thus 'flash backup area' has been designated as the default backup area for control files, archived logs, data files and everything else - particularly when using RMAN.
DB_RECOVERY_FILE_DEST ='' disables the flash recovery area.
Fast recovery - SWITCH DATABASE TO COPY;
No more copying from backup area - but then database runs against backup area.
New DROP DATABASE command - how useful!
Incremental Backup -
Fast Incremental Backup -
If 100M of a 10G file has changed - Oracle will read 10M and copy 10M only. Oracle keeps track of all data block changes in a new 'change tracking file' using the new background process CTWR (aptly called, Change Tracking Writer).
ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '...';
V$BLOCK_CHANGE_TRACKING
V$BACKUP_DATAFILE shows the effectiveness of block change tracking (% of blocks read / changed).
21) Oracle Database 10g: Maximize Availability - General EnhancementsTables with columns LONG and LONG RAW can be redefined online.
CREATE OR REPLACE SYNONYM doesn't invalidate PL/SQL program units if they were already valid.