Archiving History

Previous TopicNext TopicContents

To archive history, you need to take the history partition and move the data out of the database into a file.

To archive history:

Note: The commands below represent the first history partition.

  1. Drop security on the W_ACTIVITY_HISTORY_F so you can exchange the partition to a table. Run this command to drop security:

    begin

    dbms_rls.drop_policy('STARUSER', 'W_ACTIVITY_HISTORY_F', 'W_ACTIVITY_HISTORY_F_P_POLICY');

    dbms_rls.drop_policy('STARUSER', 'W_ACTIVITY_HISTORY_F', 'W_ACTIVITY_HISTORY_F_PC_POLICY');

    commit;

    end;

    /

  2. Exchange the partition into a new table by running this command:

    create table r1_p1 as select * from staruser.w_activity_history_f where 0=1;

    alter table staruser.w_activity_history_f exchange subpartition r1_p1 with table r1_p1;

  3. Export the table or move it to another database. See http://docs.oracle.com/cd/B19306_01/server.102/b14215/dp_export.htm for more information.
  4. Remove the table from the database:

    drop table r1_p1;

  5. Restore security by running the staretl process for your operating system.

Related Topics

Archiving and Restoring History

Restoring Archived History



Legal Notices
Copyright © 1999, 2014, Oracle and/or its affiliates. All rights reserved.

Last Published Friday, January 31, 2014