How Upgrade Tuner Modifies Files
When you save your changes, Upgrade Tuner modifies the upgrade files. These are the files the Upgrade Wizard uses to upgrade the database. These files are as follows:
The driver configuration file.
The schema.dll file.
SQL files.
Driver Configuration File
When you add or remove parallel
threads and save your changes, Upgrade Tuner modifies the driver configuration
file, for example driver_upgrep_version.ucf
. The driver configuration file is a text file that
contains a series of steps. The steps specify the commands that control
the production upgrep. When you run the Upgrade Wizard to upgrade
your database, it executes the steps in the driver configuration file.
The following actions are examples of steps that can appear in the driver configuration file:
Making schema changes using the ddlimp utility and schema.ddl
Making schema and data changes by executing SQL scripts
Upgrade Tuner manages the driver configuration file as follows:
When you save your changes after the first session, Upgrade Tuner makes a copy of the file and appends
.orig
to the file name. It then modifies the file. For example, Upgrade Tuner copiesdriver_upgrep_version.ucf
todriver_upgrep_version.ucf.orig
. It then makes changes todriver_upgrep_version.ucf
.When you save your changes after the second session, Upgrade Tuner makes a copy of the file and appends
.old
to the file name. It then modifies the driver file. For example, Upgrade Tuner copiesdriver_upgrep_version.ucf
todriver_upgrep_version.ucf.old
. It then makes changes todriver_upgrep_version.ucf
.When you save your changes after the third session and all following sessions, Upgrade Tuner saves the driver file to
.old
again and then updates the driver file.
This file management strategy preserves the previous set of revisions to the file. It also preserves the original version of the file.
Schema.ddl File
When you run the Upgrade Wizard after the production upgrep it reads the driver file. The driver file contains steps that call the ddlimp utility. This utility uses schema.ddl as input to upgrade your database schema.
In the Parallelize Table Creation and Parallelize Index Creation pages, Upgrade Tuner displays the creation times for the tables and indexes in the schema.ddl file.
When you create parallel threads, Upgrade Tuner creates thread-files that have the same format as schema.ddl but contain only the table or index creation steps in the thread. Upgrade Tuner then adds steps to the driver file. These steps call the ddlimp utility, and specify the thread-files as input.
Upgrade Tuner manages schema.ddl and thread-files as follows:
When you create a new thread and click Save and Exit, Upgrade Tuner creates a schema.ddl thread-file for the new thread.
For example, you do not have any parallel threads, and then create two new threads for table creation. When you exit, Upgrade Tuner creates a
schema_t1.ddl
and aschema_t2.ddl
file. Upgrade Tuner also inserts steps in the driver file to execute the thread-files.
The t1 thread-file contains the table creation information for the tables in Parallel Thread 1. Parallel thread 2 information is contained in the t2 thread-file, and so on.
When you create new threads in the Parallelize Index Creation page, the thread-files are named i1, i2, and so on. For example, the information for Parallel Thread 1 for index creation is contained in
schema_i1.ddl
.If you run Upgrade Tuner and change the tables or indexes assigned to a thread, then Upgrade Tuner updates the thread-file for that thread. Upgrade Tuner does not create .orig or .old files for thread-files. Also, Upgrade Tuner does not change the step that executes the thread-file in the driver file.
Upgrade Tuner does not revise the content of the main schema.ddl file (the serial thread) when you create thread-files. The thread-files duplicate the content in schema.ddl.
In the driver file, the order of execution of steps for schema.ddl and the thread-files is as follows:
Table thread files beginning with file t1 (ddlimp in table creation mode)
schema.ddl (ddlimp in table creation mode)
Index thread files beginning with i1 (ddlimp in index creation mode)
schema.ddl in index creation mode (ddlimp in index creation mode)
For both table and index creation, the parallel threads are executed first followed by the serial thread (schema.ddl).
driver_upgrep_prod_version.ucf
file, query for
"schema_"
.SQL Files
When you make changes in the Deactivate 0-Row SQLs page, Upgrade Tuner makes changes to the SQL file containing the SQL command. Because the SQL file is already a step in the driver file, Upgrade Tuner does not modify the driver file.
Upgrade Tuner manages the SQL files as follows:
When you first change an SQL file, Upgrade Tuner saves a copy of the SQL file and appends .orig to its file name. Upgrade Tuner then updates the SQL file.
The next time you change the SQL file in Upgrade Tuner, it saves a copy of the SQL file and appends .old to the file name. Upgrade Tuner then updates the SQL file.
Thereafter, when you modify the SQL file, Upgrade Tuner saves the SQL file to .old again and then updates the SQL file.
This file management strategy preserves the previous set of revisions to the file. It also preserves the original version of the file.