The sysaltusages table and the scratch database

sysaltusages is a data-only-locked table that is used to map page numbers in an archive database to the actual page within either the database dump and its stripes, or the modified pages section. However, unlike the sysusages table in a traditional database, sysaltusages does not map every logical page in the database, it maps only:

See the Reference Manual: Tables.

NoteBecause sysaltusages is a row-locked catalog, you may need to periodically use reorg to reclaim logically deleted space.

The scratch database stores the sysaltusages table. The scratch database is used to provide flexibility as to where the sysaltusages table is located.

The scratch database can be any database (with some exceptions like master and temporary databases). Sybase recommends that you use a dedicated database as the scratch database, because:

Apart from hosting the sysaltusages table, this database is like any other. You can use threshold procedures and other space management mechanisms to manage space within the database.

To specify a database that is a scratch database, enter:

sp_dboption <db name>, "scratch database", "true"

Each archive database can be assigned to only one scratch database at a time, but multiple archive databases can use the same scratch database. If you have a large number of archive databases, you may want to define multiple scratch databases.