Kbase P124708: How to migrate a table from Type I storage area into a Type II storage area?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  31/10/2008 |
|
Status: Verified
GOAL:
How to move a table from a Type I to a Type II Storage Area online in 10.1A.
GOAL:
How to migrate a table from Type I storage area into a Type II storage area?
GOAL:
How to migrate to a Type II storage area using tablemove option to proutil?
GOAL:
How to migrate a table from Type I storage area to Type II using the Data Dictionary?
FACT(s) (Environment):
All Supported Operating Systems
Progress 9.1x
OpenEdge 10.x
FIX:
There are a couple of ways to migrate a table from a Type I storage area to a Type II storage area.
1. Dump .df for the table. (This can be done by going into the Data Dictionary, then select Admin ->Dump Data and Definitions -> Data Definitions (.df file) Select Some -> Select the table(s) you are going to move into a Type II storage area.)
2. Dump the data for the tables being migrated to a Type II storage area either using the Data Dictionary or via a binary dump (proutil dbname -C dump table directoryforfile).
*Caution*:
Truncation of data or index areas should only be performed when you confirm that the area being truncated does not contain any data that has not already been dumped. Should also confirm that the areas being truncated do not contain data or indexes for objects which are not being migrated. Once an area has been truncated, the high water mark for that area is reset and all data or indexes within the truncated area are no longer accessible.
3. Truncate the area which contained the table(s) being migrated to a Type II storage area. (proutil dbname -C truncate area areaname)
4. Truncate the area which contains the indexes for the table that you are migrating to a Type II storage area.
When you truncate an area it deactivates all indexes associated with the table. To delete a table you must have the primary index activated.
5. Rebuild primary index for the table you just truncated. The index rebuild will be quick as there is no chain manipulation to perform.
6. Create an add.st file that contains the new Type II storage areas you are adding to your database.
7. Then add those new areas to the database (prostrct add dbname add.st).
8. Once these areas have been added, you can now reload your data into the new areas using one of the methods below:
Using the dictionary to load the data:
a. Delete the table using the Data Dictionary. (Schema -> Delete Table(s) -> Select Table name and when prompted respond yes.)
b. Alter the .df you dumped earlier to point to the new Type II storage area(s) you added for the data and the indexes.
c. Reload the .df using the Data Dictionary. (Admin ->Load Data and Definitions -> Data Definitions (.df file) -> Enter the name of the .df file you just modified.)
d. Load the data back into the database either via the Dictionary, bulkload or binary load.
Using Tablemove to migrate the table from existing area to new Type II area:
a. Use the tablemove option to the proutil command to move the table(s) and indexes from the existing area to the new storage area. (proutil dbname -C tablemove tablename areaname indexareaname)
This option is very fast, safe and will maintain the same index and table numbers as the original table/index if that is important.
b. Load the data back into the database either via the Dictionary, bulkload or binary load.
Once all tables and indexes have been loaded or moved/migrated to the new Type II storage area(s), you can delete the original area(s) using the prostrct remove command. Syntax: prostrct remove dbname d areaname.
It is also a good idea to run a prostrct list to create an updated .st file. Syntax: prostrct list dbname