Feedback
Did this article resolve your question/issue?

   

Article

How to restructure the database using TABLEMOVE and PROSTRCT REMOVE

Information

 
TitleHow to restructure the database using TABLEMOVE and PROSTRCT REMOVE
URL NameP76675
Article Number000148900
EnvironmentProduct: Progress
Version: 8.x, 9.x
Product: OpenEdge
Version: 10.x, 11.x
OS: All Supported Operating Systems
Other: RDBMS
Question/Problem Description
How to restructure the database using tablemove and prostrct remove?
How to remove tables and areas?
Steps to Reproduce
Clarifying Information
Error Message
Defect/Enhancement Number
Cause
Resolution
When only a specific area needs to be restructured, once database objects have been moved to a new Storage Area, area extents can be removed from the database structure.

The TABLEMOVE utility can be used with the database online. Refer to the following Articles for the performance considerations: Example:
  • The sports database tables Invoice, Customer, Item, Salesrep, State, Local-Default, and Ref-Call are moved from the "Info Area" into a new area. 
  • Their associated indexes are moved at the same time into a separate index area. 
  • Finally, the Info Area is removed from the database structure.
1. Create the example database:

$   prodb $DLC/sports sports

2.  Add new Storage Areas to the database structure:

$   prostrct add sports add.st

where 'add.st' file contains the following:
 
d "New Area":9,128;64 .
d "Index Area":10,1;1 .

3. Update the structure file and confirm that those areas have been added:

$   prostrct list sports 

4. Start the database:

$   proserve sports -B 3000 -i

5. Move those tables and indexes:

$   proutil sports -C tablemove Invoice "New Area" "Index Area"
$   
proutil sports -C tablemove Customer "New Area" "Index Area"
$   
proutil sports -C tablemove Item "New Area" "Index Area"
$   
proutil sports -C tablemove Salesrep "New Area" "Index Area"
$   
proutil sports -C tablemove State "New Area" "Index Area"
$   
proutil sports -C tablemove Local-Default "New Area" "Index Area"
$   
proutil sports -C tablemove Ref-Call "New Area" "Index Area"

6. There is now no data in the Info Area, so it can be removed offline:

$   proshut sports -by
$   
proutil sports -C truncate bi
$   
prostrct remove sports d "Info Area"

7. List the database structure to confirm that the area has been removed and also to update its 'sports.st' structure file:

$   prostrct list sports 

Workaround
Notes
Last Modified Date11/20/2020 7:35 AM
Attachment 
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.