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.
- Drop security on the W_ACTIVITY_HISTORY_F so you can exchange the partition to a table. Run the following 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;
/
- 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;
- Export the table or move it to another database. If you are using Oracle Database, see the Data Pump documentation for your version of Oracle for details.
- Remove the table from the database:
drop table r1_p1;
- Enter one of the following commands to restore security by running the STARETL process:
- With Windows:
setup.bat 44 44
- With UNIX or Linux:
setup.sh -from 44 -to 44