Oracle flashback query and flashback database
Oracle flashback query and flashback database
Difference:
For a data flashback query, you only need to enable the undo tablespace to automatically manage the rollback information.
Using flashback delete technology and flashback database technology, you need to start the Recycle Bin and flashback the recovery area. (used in archiving mode)
Specific settings:
-cmd sqlplus nolog sys as sysdba hanatech
Specific settings-settings for data flashback query:
View the revocation table information undo:
Show parameter undo
Set the undo table information:
Alter system set undo_managerment=auto; is set to auto before you can use flashback queries
Maximum alter system set undo_retention=900; retention time (in seconds)
Alter system set undo_tablespace=undotbs1
View Archive Mod
Archive log list
View the document location of the flashback area (the flashback area has been set by default)
Show parameter db_recovery_file
Set the archive mode (undo may be enabled by default in the archive mode, and the above setting undo can be omitted)
Alter system archive log start
Flashback query based on as of timestamp
Select * from t_car_carstate as of timestamp to_timestamp ('2012-5-29 18-18-30-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-14-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-
-
-
Specific settings-flashback database technology settings:
View archive mode archive log list
Set the archive mode:
Shutdown immediate
Startup mount
Alter database archivelog
Alter database open
Alter system archive log start
Archive log list
View the document location of the flashback area (the flashback area has been set by default)
Show parameter db_recovery_file
Start the database flashback feature
Shutdown immediate
Startup mount
Alter database flashback on
Alter database on
Alter system set db_flashback_retention_target=2880; sets archiving time: (default is 1440 minutes a day)