Run Pre-Migration while Preserving Audit Data in a Live Production System

This pre-migration must be run before running the standard 5.0 to 5.1 migration. Please perform the following steps exactly. Failure to do so will result in an invalid pre-migration.

  1. Enter the correct database information into the define.audit_migration sql file.
  2. Add the following parameters to the oracle initialization file.
    • parallel_degree_policy=AUTO
    • parallel_threads_per_cpu=2
    • #parallel_automatic_tuning=TRUE
    • parallel_degree_limit=160
    • parallel_max_servers=160
    • parallel_min_percent=0
    • parallel_min_servers=0
    • parallel_min_time_threshold=AUTO
    • fast_start_parallel_rollback=HIGH
    • parallel_adaptive_multi_user=FALSE
  3. Edit all scripts and make changes regarding the oracle SID, passwords, start_date and end_date. Please note that this pre-migration can be run in parts, so make sure the start and end dates are specified correctly in ALL the scripts.
  4. Test: The format of the start_date and end_date is 'MM/DD/YYYY'.
    • For example, in the first run the start_date is 02/21/2007 and the end_date is 05/18/2008 in all scripts. Then in the second run the dates MUST be ...start_date as 05/19/2008 and the end_date can be any date after 05/19/2008.
    • Please note that the start_date of the next run cannot be the same as the end_date of the previous run. If overlapping dates are used, then duplicate data will be entered in the aud tables resulting in data errors and rendering the pre-migration useless. Also, if date ranges are skipped then not all audit data will get migrated.
    • The easiest thing is to run this pre-migration for the entire audit data and not split into date ranges. The date ranges are provided as a convenience for long running migrations.  Splitting dates can make the migration faster as long as the disk I/O can support it.
  5. To determine the first start_date run the following sql: SELECT MIN(BEG_DATE) AS START_DATE FROM AUD.CNTNT;
  6. To determine the last end_date run the following sql: SELECT MAX(BEG_DATE) AS END_DATE FROM AUD.CNTNT;
    • You can use the system date (i.e. today) as the end_date to run the migration for entire data. Add the dates into all the pre-migration scripts to run the audit data pre-migration for entire audit data.
    • Please note that any dates specified will be for that specific entity. For example, dates specified when running 2-folders.sql will migrate only folders in the date range specified. Dates can be different for different entities (leafs, documents, etc.).
  7. Run the 0-prescript.sql script first. Do not run anything else until this script finishes without errors. If you encounter any errors, stop at this script and report the errors to Calyx.
  8. Scripts 1-assemblies.sql, 2-folders.sql, 3-leaves.sql, 4-docs.sql and 5-content.sql MUST be run in parallel by running each script simultaneously from a different DOS prompt. Doing this, the scripts will use all available memory, CPU, and SAN i/o and finish this pre-migration much faster.
  9. When you are satisfied that everything has migrated properly, the cntnt table can be dropped from the audit schema or saved, due to its potentially large size.
    • To drop the table entirely: Connect to the database as aud, then enter the sql command - drop table cntnt;
    • To save the old CNTNT table: Connect to the database as aud, then enter the sql command - rename cntnt to dep_cntnt;