Chapter 4 Database Administration Utilities
85
The Compression utility
With the Compression utility you can compress a database file. The
Compression utility reads the given database file and creates a compressed
database file. Compressed databases are usually 40 to 60 per cent of their
original size. The database server cannot update compressed database files:
they must be used as read-only files, in conjunction with write files.
The Compression utility does not compress files other than the main database
file. The database to be compressed must not be running.
You can access the Compression utility in the following ways:
♦ From Sybase Central
♦ From the system command line, using the
dbshrink
command-line
utility. This is useful for incorporating into batch or command files.
Compressing a database in Sybase Central
v To compress a database file:
1 Open the Utilities folder in the left panel.
2 Double-click Compress Database in the right panel. The Compress
Database wizard appears.
3 Follow the instructions in the wizard.
Tip
You can also access this wizard by clicking Tools➤Adaptive Server
Anywhere➤Compress Database.
The dbshrink command-line utility
dbshrink [
switches
]
database-file
[
compressed-database-file
]
Switch Description
–o filename Log output messages to a file
–q
Quiet mode—do not print messages
–y
Replace an existing output file without confirmation
Syntax