Preparing for Table or Dbspace Reorganization with SAPDBA
Use
Before you reorganize a table, a group of tables, or a dbspace with SAPDBA for Informix, you must complete the preparations described here.
Prerequisites
The reorganizations for which you must prepare are the following:
- Reorganize Table by 'insert into select from …'
- Reorganize Table by 'Export/Import'
Refer to
Procedure
At the top of any menu screen in SAPDBA, you see 'sapr3' User(s): 1 when R/3 is down. SAPDBA requires a connection. If you have multiple SAPDBAs running, you see the number of SAPDBAs in this field, because each SAPDBA requires a
sapr3 user.
If you are reorganizing a table that is significantly smaller than the size of your logical log, you can perform the reorganization without switching database logging off. In this case, make an entry
SAPDBA_IGNORELOGGING 1 in the ONCONFIG file, but only for the duration of the reorganization. If you decide to do this, you can skip the next two steps.If data is lost during the reorganization, you can then
restore the database using this database backup or archive.You must switch the database server to no logging mode before you start the process. For more information, see Switching to "No Logging Mode" with SAPDBA.
In no logging mode, the database server does not log the reorganization. Logging uses up logical-log storage, possibly causing the logs to fill. You cannot start the process unless the database is in no logging mode.
If a lock has been set on a table by some other database process, you cannot reorganize the table. You have to wait for the lock to be released before proceeding with the reorganization. Make sure that no other database activity has placed a lock on the table. The best way to do this is to bring the R/3 System down (see first step above).
SAPDBA stops processing if there is less than 1 MB of space left in the directory $INFORMIXDIR/sapreorg (UNIX) or %INFORMIXDIR%\sapreorg (NT), used to store scripts and log files for the reorganization. Make sure that there is enough space in this directory before you start these actions. This does not apply to the actions under Reorganize Single Table.
If you are not using the "export/import" method, you have now finished the procedure, so see "Result".
SAPDBA displays the available space in a dialog box when you start the process. If there is not enough space left in the download path during processing, SAPDBA recognizes this and stops processing so that no data is lost.
You must be able to write to this directory. Prevent other users from accessing this directory. This is because any change to the downloaded file endangers the integrity of your data and should be avoided.
If there are existing unload files left over from a previous job, delete them before starting the process. SAPDBA prompts you to delete them if you forget.
Result
You are now ready to perform the reorganization. For more information, see: