Please enable JavaScript to view this site.

R:BASE 11 Beginners Tutorial

Navigation: Lesson 10 - Maintaining a Database

Using the Pack In Place Option

Scroll Prev Top Next More

If you have not added, changed, or deleted many rows in your database, use the Pack In Place option. Pack In Place eliminates the space occupied by deleted rows, columns, or tables within the existing database. This option cannot reorganize rows on the disk. Pack In Place also has options that allow you to restructure indexes or compress the database structure.

 

Before you compress your database, make sure you have a current backup of it. If your database is large, the compression can take a considerable amount of time, even several hours. If the operation is interrupted for any reason, your database will be damaged or destroyed.

 

Pack In Place has three options:

 

Schema - eliminates unused space from the database structure only

Keys - packed the entire index file (File 3) and rebuilds indexed columns

All - eliminates unused space from both database structure and database data and rebuilds indexed columns

Passwords - eliminates unused space from the SYS_PASSWORDS System Table

Index - packs all indices for the currently connected database, and is supported in multi-user environments.

 

In the following exercise, you'll compress the database using the "Pack in Place" menu option.

 

To compress the SkyWrite database files using Pack in Place:

 

First the database must be connected in single-user mode, which must be set when you are disconnected from the database files.

 

1.In the Database Explorer, select "Databases" from the Group Bar.
2.Select "SkyWrite".
3.Choose "Disconnect Database" to disconnect from the database.
4.From the R:BASE menu bar, select Settings: Configuration Settings
5.In the dialog window, choose the "Multi-User" tab, and remove the check from the "MULTI" check box.
6.Click the OK button, and confirm the changes were saved.
7.From the R:BASE menu bar, select Database: Connection history:  (Your sample SkyWrite database)
8.From the R:BASE menu bar, choose Utilities: Pack in Place: All

 

R:BASE displays the following warning message: "You should back up this database before you PACK it." and a confirmation dialog window prompting, "Continue with an in-place PACK of your database?"

 

9.Click the Yes button to continue with the process because you already have a backup copy of the database.

 

R:BASE displays all the tables, columns, and indexes as it packs them. Pack In Place rebuilds the indexes for all indexed columns. If messages are set off in this database, you will not see these messages.

 

Once you are complete, disconnect from the database and set R:BASE back to "multi-user" mode.