Oracle DBMS_FLASHBACK_ARCHIVE
Version 11.2.0.3
 
General Information
Purpose Support user applications' schema evolution during application upgrade and other table maintenance tasks beyond DDL statements supported by Flashback Data Archive.
Source {ORACLE_HOME}/rdbms/admin/dbmstran.sql
First Available 11.2.0.1
Dependencies
DBMS_FDA_LIB
Exceptions
Error Code Description
ORA-06512 Unable to disassociate or re-associate Flashback Data Archive table <schema_name>.<table_name>
ORA-55634 Flashback Data Archive enabled table "string"."string" has different definition from its history table
ORA-55636 Flashback Data Archive enabled table "string"."string" has different definition from its history table
ORA-55637 Flashback Data Archive enabled table <schema_name>.<table_name> is not in the correct compliance
Security Model Execute is granted to the DBA role
 
DISASSOCIATE_FBA
Disassociates the given table from the flashback data archive dbms_flashback_archive.open_fba(owner_name IN VARCHAR2, table_name IN VARCHAR2);
See REASSOCIATE_FBA Demo Below
 
REASSOCIATE_FBA
Reassociates the history table with the base table which will fail if the user has not performed corresponding structural modifications (through DDL statements) to the history table. dbms_flashback_archive.reassociate_fba(owner_name IN VARCHAR2, table_name IN VARCHAR2);
ALTER SYSTEM SET undo_retention = 1 SCOPE=MEMORY;

CREATE FLASHBACK ARCHIVE uw_archive
TABLESPACE uwdata
QUOTA 10M
RETENTION 30 DAY;

ALTER TABLE servers FLASHBACK ARCHIVE uw_archive;

-- perform DML on the servers table until flashback archive tables are created
SELECT table_name
FROM user_tables
WHERE table_name LIKE 'SYS_FBA%';

DELETE FROM SYS_FBA_HIST_73776
WHERE srvr_id = 515;

exec dbms_flashback_archive.disassociate_fba('UWCLASS', 'SERVERS');

DELETE FROM SYS_FBA_HIST_73776
WHERE srvr_id = 515;

exec dbms_flashback_archive.reassociate_fba('UWCLASS', 'SERVERS');

-- make the corresponding change to the fba table
exec dbms_flashback_archive.reassociate_fba('UWCLASS', 'SERVERS');
 
 
Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: © 2012 Daniel A. Morgan All Rights Reserved