Compressing a Dump

The dump command lets you compress databases and transaction logs using Backup Server, thereby reducing your space requirements for your archived databases.

The parameters are:

  • compression = compression_level – compresses to a remote server. Causes the Backup Server to use its own native compression method. SAP recommends this compression option.

  • compress::[compression_level::] – compresses to a local file. Causes the Backup Server to invoke a external filter, and is supported for backward compatibility.

compression_level is a number between 0 and 9, 100, or 101. For single-digit compression levels, 0 indicates no compression, and 9 provides the highest level of compression. Compression levels of 100 and 101 provide faster, more efficient compression, with 100 providing faster compression and 101 providing better compression.

Note: The compress:: parameter does not support compression levels 100 and 101.

See the Reference Manual: Commands.

The compression= parameter of the dump command allows you to reduce your space requirements for your archived databases. With SAP ASE 12.5.2 and later, the compression= parameter enables you to compress your dumps to a remote machine.

If you use the older compress:: option, you need not include the compression level when you load the database dump. However, you can issue load with listonly=full to determine the compression level at which the dump was made.

If you use the native compression= option, you need not include the compression= option when you load the database dump.

For example, to dump the pubs2 database into the file “compress_file”, enter:
dump database pubs2 to compress_file...compression=100

This shows the compression levels for the pubs2 database. These numbers are for reference only; the numbers for your site may differ depending on operating system level and configuration.

Compression Levels

Compressed File Size

Level 1

254K

Level 9

222K

Level 100

324K

Level 101

314K

Compression levels 100 and 101 are less CPU-intensive than levels 0 – 9, yet provide faster compression. However, using the 100 and 101 levels may result in larger dump files. Level 100 provides faster compression, while level 101 provides more complete compression. The actual compression result depends on the contents of your files.

SAP recommends that you choose a set of compression levels based on your performance requirements. For less CPU-intensive compression, use compression level 100 and switch to level 101 based on archive space requirement. For regular compression, use compression level 6, then increase or decrease the level based on your performance requirements.

This example dumps the pubs2 database to the remote machine called “remotemachine” and uses a compression level of 4:
dump database pubs2 to "/Syb_backup/mydb.db" at remotemachine 
with compression ="4"
This example dumps the pubs2 database to the remote machine called “remotemachine” and uses a compression level of 100:
dump database pubs2 to "/Syb_backup/mydb.db" at remotemachine 
with compression ="100"

See the Reference Manual: Commands.