About this task
To migrate your history data from Release
8.0 (or later) to 9.4, perform the following:
Note: If you set the
yfs.apply.sql.manually property
to Y in the
<INSTALL_DIR>/Migration/9.3/buildmigration.properties file,
you must manually apply the following DDLs before running the alter-history-tables
target:
- <INSTALL_DIR>/Migration/<previous version directory>/database/scripts/<dbtype>/history/uniqueindexdrops.sql
- <INSTALL_DIR>/Migration/<previous version directory>/database/scripts/<dbtype>/history/indexdrops.sql
- <INSTALL_DIR>/Migration/<previous version directory>/database/scripts/<dbtype>/history/alters.sql
- <INSTALL_DIR>/Migration/<previous version directory>/database/scripts/<dbtype>/history/seq.sql
where
<previous version directory> corresponds
to the location of the previous version directory and
<dbtype> corresponds
to the database type (DB2 or Oracle).
When migrating from 8.0, 8.2, 8.5, 9.0, 9.1, 9.2, 9.2.1 or 9.3
to 9.4, run the following command: ${ANT_HOME}/bin/ant
-Druntime=<INSTALL_DIR> -Druntime.old=<INSTALL_DIR_OLD>
-f buildmigration.xml -logfile <logfile> -Dtarget=alter-history-tables
migrate
This command performs preparatory
tasks before performing a history upgrade. This includes getting the
size of tables to determine which tables will take a longer time to
upgrade. This information is used later when doing the actual upgrade
so as to minimize the time.
This command then
uses the size information available and performs all the alterations
to the history tables. After this, the history tables will have new
columns and data. Values in the history tables are trimmed for those
data types that have been changed in the newer version.
The *.done file created in the 9.3
status folder for the task alter-history-tables is history_ant_altertables.xml.done.
If you encounter an error when altering history tables,
fix the cause of the error and perform the previous task of altering
history tables once again. Before executing the task, change the value
of the onerror attribute from "abort" to "continue" in the <INSTALL_DIR>/Migration/9.3/history/ant_altertables.xml file.
The onerror attribute specifies how
to proceed when an error occurs during the execution of one of the
statements. The valid values are:
- Continue - Indicates that on encountering an error,
proceed with the task of altering other tables.
- Abort - Indicates that on encountering an error,
do not proceed with the task of altering other tables.
Note: If you
dropped an index in an earlier release and the index is changed in
the current release, an error occurs when altering history tables.
Analyze the index changes to determine whether or not you want the
index dropped. If you want the index dropped, drop the index after
the upgrade.
To install upgrade typechanges,
run the following sql script:
<INSTALL_DIR>/Migration/9.3/database/scripts/<DB_TYPE>/history/upgrade_typechanges.sql
If you are upgrading in sharded mode, you must run the
SQL script for the shard that corresponds to the respective TableType.
For example, if you are installing upgrade typechanges for the transaction
TableType, run the following sql script:
<INSTALL_DIR>/Migration/9.3/database/scripts/<DB_TYPE>/history/TRANSACTION/upgrade_typechanges.sql
Note: If you set the
yfs.apply.sql.manually property
to Y in the
<INSTALL_DIR>/Migration/9.3/buildmigration.properties file,
you must manually apply the following DDLs before running the install-history-indexes
target:
- <INSTALL_DIR>/Migration/<previous version directory>/database/scripts/<dbtype>/history/uniqueindexadds.sql
- <INSTALL_DIR>/Migration/<previous version directory>/database/scripts/<dbtype>/history/indexadds.sql
where
<previous version directory> corresponds
to the location of the previous version directory and
<dbtype> corresponds
to the database type (DB2 or Oracle).
When migrating from 8.0, 8.2, 8.5, 9.0, 9.1, 9.2, 9.2.1 or 9.3
to 9.4, run the following command: ${ANT_HOME}/bin/ant
-Druntime=<INSTALL_DIR> -Druntime.old=<INSTALL_DIR_OLD>
-f buildmigration.xml -logfile <logfile> -Dtarget=install-history-indexes
-Dnonuniqueindex=Y migrate
This command
adds all the unique indexes and nonunique indexes. If nonunique indexes
are not to be installed, then the argument -Dnonuniqueindex=Y should
not be passed.
Nonunique indexes are required
for performance improvement. On a large database, nonunique indexes
may take a significant amount of time to be installed. You must analyze
all the nonunique indexes and verify if all of them are required.
The *.done files created in the 9.3
status folder for the install-history-indexes task are:
- history_ant_installuniqueindexes.xml.done
- history_ant_installnonuniqueindexes.xml.done
- Refer to the logfile to ensure
that none of the index creations failed.
- Between the time that you run the upgrade history
tables and the upgrade transaction tables, do not purge or restore
any data.
- During history data migration, some table modification
activities may cause table chaining. Therefore, rebuilding these tables
is necessary.
- Altering maximum values for sequences is not allowed
on any servers.
- If you have performed extensions on history
tables in earlier releases, you must regenerate dbclasses. However,
if you ran the dbclassgen target as part of the transaction
migration you can skip this step.
When
migrating from 8.0, 8.2, 8.5, 9.0, 9.1, 9.2, 9.2.1 or 9.3 to 9.4,
run the following command:
${ANT_HOME}/bin/ant -Druntime=<INSTALL_DIR>
-Druntime.old=<INSTALL_DIR_OLD> -f buildmigration.xml -logfile <logfile>
-Dtarget=dbclassgen migrate
This command
regenerates the dbclasses and updates the entities JAR.
The *.done file created in the 9.3 status folder
for the dbclassgen task is ant_dbclassgen.xml.done.
Note: If you have not created the nonunique indexes as a part
of upgrade, you can create them at any point as a postmigration activity
by following the transaction migration steps.
Note: If you
receive an "Out of Resources" error when running the dbclassgen target,
increase the memory arguments for the ADDITIONAL_ANT_COMPILER_TASK_ARGS
property in the <INSTALL_DIR>/properties/sandbox.cfg file.
- When migrating from 8.0, 8.2, 8.5, 9.0, 9.1,
9.2, 9.2.1 or 9.3 to 9.4, run the following commands:
- ${ANT_HOME}/bin/ant -Druntime=<INSTALL_DIR> -Druntime.old=<INSTALL_DIR_OLD>
-f buildmigration.xml -logfile <logfile> -Dtarget=upgrade-history-tables
migrate
From the <INSTALL_DIR>/COM/Migration/9.3/COM_Add-in directory:
${ANT_HOME}/bin/ant
-f ycdmigration.xml -Druntime=<INSTALL_DIR> -Druntime.old=<INSTALL_DIR_OLD>
-DYANTRA_RUNTIME_NEW=<INSTALL_DIR> -Dtarget=upgrade-history-tables
migrate -logfile <logfile>
Note: Ensure that you update the unique history
indexes by running the
install-history-indexes target,
as shown in
2,
before updating tables with the
upgrade-history-tables migrate target.
The actual data migration is performed for all the archived
transaction data present in the history tables. All new indexes required
for performance are added. After migration of history data, history
tables will have new columns and data.
This command
performs the following tasks:
- pre-history-migration
- migrate-history-data
- history_ant_premigration.xml.done
The *.done files created in the 8.0
status folder for the upgrade-history-tables task are:
- history_ant_pca_migration.xml.done
- history_ant_migration.xml.done
- history_ant_postmigration.xml.done
- history_ant_premigration.xml.done
The *.done files created in the 8.2
status folder for the upgrade-history-tables task are:
- history_ant_pca_migration.xml.done
- history_ant_migration.xml.done
- history_ant_postmigration.xml.done
- history_ant_premigration.xml.done
The *.done files created in the 8.5
status folder for the upgrade-history-tables task are:
- history_ant_pca_migration.xml.done
- history_ant_migration.xml.done
- history_ant_postmigration.xml.done
- history_ant_premigration.xml.done
The *.done files created in the 9.0
status folder for the upgrade-history-tables task are:
- history_ant_pca_migration.xml.done
- history_ant_migration.xml.done
- history_ant_postmigration.xml.done
- history_ant_premigration.xml.done
- history_ant_premigration.xml.done
The *.done files
created in the 9.1 status folder for the upgrade-history-tables
task are:
- history_ant_pca_migration.xml.done
- history_ant_migration.xml.done
- history_ant_postmigration.xml.done
- history_ant_premigration.xml.done
The *.done files
created in the 9.2.0 status folder for the upgrade-history-tables
task are:
- history_ant_pca_migration.xml.done
- history_ant_migration.xml.done
- history_ant_postmigration.xml.done
- history_ant_premigration.xml.done
The *.done files
created in the 9.2.1 status folder for the upgrade-history-tables
task are:
- history_ant_pca_migration.xml.done
- history_ant_migration.xml.done
- history_ant_postmigration.xml.done
- history_ant_premigration.xml.done
The *.done files
created in the 9.3 status folder for the upgrade-history-tables
task are:
- history_ant_pca_migration.xml.done
- history_ant_migration.xml.done
- history_ant_postmigration.xml.done
- history_ant_premigration.xml.done
If you are upgrading from Release 8.0 to Release 9.4, the
following tasks are performed: