The following information is meant to supplement the AM Documentation and provide additional specific guidance especially when cloning the Oracle data from one AM installation and using it to install AM in another location.
Definition of terms used in this document:
Be sure you read the ‘Before You Begin’ section before you start the process and in addition to those items you should also disable auditing if you have it enabled.
When cloning an instance, we recommend that you purge all the historical data by executing the following SQL statements:
Something to keep in mind is that if you use the Oracle TRUNCATE command all rows from the table will be removed. The operation cannot be rolled back and no triggers will be fired. As such, TRUNCATE is faster and doesn't use as much undo space as a DELETE would. However, both the so_print_log and the so_job_history tables have delete triggers associated with them, so the cleanest way to purge the data in those tables is to use the DELETE command to allow the delete triggers to execute and purge associated data as well.
If there is a significant amount of data in the tables you are trying to delete you may want to consider using a WHERE clause and do incremental deletes from those tables. The following SQL statements can help you gather information about the data in those tables so you can determine how far back you should start.
select min(to_char(so_job_finished, 'yyyymmdd hh24:mi:ss')) from so_job_history;
Based on what is returned you can decide how many days back from today’s date you want to start deleting data from the history table.
This statement will delete all rows from the so_job_history table where the so_job_finished date is older than 120 days from today’s date.
Remember after performing a DELETE operation you need to COMMIT or ROLLBACK the transaction to make the change permanent or to undo it.
In addition, you can also purge the following data from the source data as it is not applicable to the target instance:
Contact support if you need help identifying any tables that are not AM default tables.