Consultor Eletrônico



Kbase 21961: Backing Up ai Extents and Reusing Space
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   12/04/2002
SUMMARY:

Confusion can arise as to what the sequence of events should be when ai extents are switched and have to be backed up. This Solution summarizes the steps that you should be going through when you are using ai, backing up the extents, and then setting out to reuse the space. The steps given here can be run manually or incorporated into a script.

NOTE: Consult the documentation for a broader description of the various steps for using ai, as well as details about the command syntax.

SOLUTION:

Notice that ai does not have to be, and shouldn't be, stopped before the ai extents are backed up. When you use:

rfutil <dbname> -C aimage end

the ai extents are immediately marked as empty. If ai is stopped before the extents are backed up, that data in the ai extents cannot be accessed. So ai doesn't need to be stopped before carrying out the steps below.

With ai running, here's what should happen:

1) Use multiple extents (at least 3 is recommended)
so that when an ai extent becomes full, the Database engine can
automatically switch over to the next ai extent.

2) After an ai extent switch, backup the full extent. This can only
be done using a system utility. As noted above, you should not
stop ai before you try to backup full extents.

3) Mark the full extent as empty:

rfutil <dbname> -C aimage extent empty [extent-path].

Later Progress will be able to reuse this extent when the other
extent(s) become full.

4) Monitor the ai extent size, and periodically truncate the ai,
because this isn't done automatically when the extent is marked as
empty:

rfutil <dbname> -C aimage truncate

It might be mistakenly thought that the truncate is also done by
command, rfutil aimage extent empty. This isn't the case.

When a variable extent is marked as empty, the system space is still allocated to it until the truncate is carried out -- this space can't be used by other applications. When an extent is marked as empty, the space is reused, that is, previous ai data is overwritten, but not truncated. So, in order to free up the space from the variable extents, they have to be truncated after they have been backed up and marked as empty, as in the steps above.

In Version 8.x the total ai size is restricted to 2GB, as is the total size of the bi. This is true regardless of the number of extents defined. So if there are 3 ai extents defined, then the total size of these files taken together can't be greater than 2GB. In Version 9.x each extent can itself be up to 2GB in size, thus giving a potential of 6GB of total ai if 3 extents are defined. Also, in Version 9 there is no limit to the number of variable ai extents you can define.


References to Written Documentation:

System Administration Guide, Version 8
System Administration Reference, Version 8
Database Administration Guide and Reference, Version 9