Contents IndexThe Collation utility The Erase utility

User's Guide
   Part VI. SQL Anywhere Reference
     Chapter 39. SQL Anywhere Components
      The Compression utility

With the Compression utility you can compress a database file. The Compression utility reads the given database file and create a compressed database file. Compressed database files are useful if disk space is limited. Compressed databases are usually 40 to 60 per cent of their original size. The database engine cannot update compressed database files: they must be used in conjunction with write files.

The Compression utility does not compress files other than the main database file.

You can access the Compression utility in the following ways:

Top of page


Compressing a database in Sybase Central

To compress a database file:

  1. Open the Database Utilities folder in the left panel.
  2. Double-click Compress Database in the right panel. The Compress Database Wizard is displayed.
  3. Follow the instructions in the Wizard.

For full information on compressing a database in Sybase Central, see the Sybase Central online Help.

Top of page


Compressing a database from the ISQL Database Tools window

To use the Compression utility from the ISQL Database Tools window:

  1. Select Database Tools from the Window menu.
  2. Click Compress Database on the Tools list.
  3. Enter the database filename (with path).
  4. Click Compress, and enter a filename to use for the uncompressed database.
  5. Click OK to compress the selected database file.

Top of page


Compressing a database using the DBTOOL statement

Syntax

The syntax for the Compression utility from the ISQL DBTOOL statement is as follows:

     DBTOOL COMPRESS DATABASE filenameTO filename ]

Top of page


The DBSHRINK command-line utility

Syntax

     dbshrink[switches] database-file [compressed-database-file]

Windows 3.x syntax

     dbshrinw [switches] database-file [compressed-database-file]

Switch Description
-q Quiet mode---do not print messages
-y Erase existing output file without confirmation

DBSHRINK reads the given database file and create a compressed database file. The compressed filename defaults to the same name as the first with an extension of CDB. The output filename (with extension) must not have the same name as the input filename (with extension).

  For more information about the command-line switches, see "Compression utility options".

Top of page


Compression utility options

Operate quietly (-q ) Do not display messages on a window. This option is available only from the command-line utility.

Operate without confirming actions (-y ) Without this option, you are prompted to confirm the replacement of an existing database file.

Top of page


Contents IndexThe Collation utility The Erase utility