Documente Academic
Documente Profesional
Documente Cultură
Flashback / Snapshot
Sumit Sengupta
EDS, an HP Company
Basic Properties
Restrictions
AQ
Materialized Views
Dictionary Table (except DDL definition
like User_Constraints
Object/Nested/Remote Table
DDLs often invalidate Flashbacks
Not suited for packaged applications
Types of Flashback
Version query
Transaction query
Table drop ( Recyclebin >= 10G )
Database ( Flashback Mode >= 10G )
Transaction ( 11G )
Data Archive ( Total Recall, 11G )
VERSIONS_STARTTIME
VERSIONS_STARTSCN
VERSIONS_ENDTIME
VERSIONS_ENDSCN
VERSIONS_XID
VERSIONS_OPERATION
ORA_ROWSCN
Results
FIRST
SALARY STARTTIME
STARTSCN ENDTIME
ENDSCN
VERSIONS_XID
DML
------- ------- --------------------- -------- --------------------- ----------------------- ----Diana
4500
06-JAN-09 12.44.26 AM
1192643
#
#
0200250051020000 U
Diana
4200
#
#
06-JAN-09 12.44.26 AM 1192643 #
#
Pseudo Column
ORA_ROWSCN
DML_TIME
----- ------------------------------189
28-NOV-08 02.46.31.000000000 PM
190
28-NOV-08 02.46.31.000000000 PM
DML_TIME
------- -----------------------------189
28-NOV-08 02.51.18.000000000 PM
190
28-NOV-08 02.51.28.000000000 PM
Types of Flashback
Version query
Transaction query
Table drop ( Recyclebin >= 10G )
Database ( Flashback Mode >= 10G )
Transaction ( 11G )
Data Archive ( Total Recall, 11G )
Types of Flashback
Version query
Transaction query
Table drop ( Recyclebin >= 10G )
Database ( Flashback Mode >= 10G )
Transaction ( >= 11G )
Data Archive ( Total Recall >= 11G )
More on Recyclebin
Sessions have it enabled by default
Purge Recyclebin removes it
permanently
Dropping user purges all its objects.
Indexes cannot be flashed back
independently
Types of Flashback
Version query
Transaction query
Table drop ( Recyclebin >= 10G )
Database ( Flashback Mode >=
10G )
Transaction ( 11G )
Data Archive ( Total Recall, 11G )
Flashback Database
Restore Point SCN/Timestamp
Can be Normal or Guaranteed
Flashback Log Stored in FRA
Database Must be in Archive Mode
DB needs to be in Mount State to
Convert to Flashback Mode
Flashback Mode is not necessary
Flashback DB Issues
Logs not always deleted. Bug#5106952
Not deleted during auto-backupbug#7390954
Guaranteed RP delete on Linux cleaned
up space as expected
Upon Flashback and resetlogs, all prior
logs and backups need to be deleted
manually from FRA
Types of Flashback
Version query
Transaction query
Table drop ( Recyclebin >= 10G )
Database ( Flashback Mode >= 10G )
Transaction ( 11G )
Data Archive ( Total Recall, 11G )
Flashback Transaction
DBMS_FLASHBACK.TRANSACTION_BACKOUT
procedure
NOCASCADE (def) Assumes no dependency
CASCADE Backs out dependent txns
NOCASCADE_FORCE Ignores dependencies
NONCONFLICT_ONLY Only non-conflicting
rows rolled back, txn atomicity is lost.
RAID-DP
Storage Hierarchy
Snapshot
Lessons Learned
A lot of overhead storage in RAID,
Snapshot
Snap Manager not supported on all
OS/ASM
Easy integration with RMAN
Thank You !
40