Database Reference
In-Depth Information
Describe and Use Flashback Data Archive
The Flashback Data Archive allows you to retain and track all transactional changes to
a record over its lifetime. This eliminates the need to write custom programs to archive
all transactional changes to data. The uses of the Flashback Data Archive are many, but
auditing and compliance are two key areas where this technology can be useful.
To utilize the Flashback Data Archive capabilities, create one or more tablespaces as
an archive. You can create multiple archives in a tablespace. Each archive has a retention
time that determines how long data is retained within it. The DBA can designate a default
Flashback Data Archive for the database.
Once you have a created a Flashback Data Archive, you can enable flashback data
archiving on a per-table basis. By default, flashback archiving is turned off.
Configuring the Flashback Data Archive
Setting up the Flashback Data Archive is straightforward. Simply name the archive and
assign an existing tablespace, an optional space quota, and the retention time:
SQL> create flashback archive audit_flash_archive
tablespace audit_archive quota 20g retention 7 year;
SQL> create flashback archive audit_flash_archive_2
Tablespace audit_archive quota 10m retention 90 day;
To establish a default Flashback Data Archive, simply add the default keyword in the
create clause:
SQL> create flashback archive default default_flash_archive
Tablespace audit_archive quota 10m retention 90 day;
After you've created a Flashback Data Archive, you may want to alter it. As DBA, you
may alter the storage quota and retention time and add, drop, or modify tablespaces in a
data archive using the ALTER FLASHBACK ARCHIVE command. Here are a few examples:
SQL> alter flashback archive default_flash_archive
Modify tablespace audit_archive quota 100m;
SQL> alter flashback archive default_flash_archive
Modify retention 180 day;
SQL>
SQL> alter flashback archive default_flash_archive
Remove Tablespace audit_archive;
SQL>
Search WWH ::




Custom Search