Home » Databases » Sybase » ASE » Sybase ASE Backup Server ‘compress::X::’ vs ‘with compression = X’ syntax

Sybase ASE Backup Server ‘compress::X::’ vs ‘with compression = X’ syntax

Starting in ASE 12.5.2, Sybase added the with compression = X syntax, prior releases required the compress::X:: syntax. What is the difference?

In releases prior to 12.5.4 and 15.0.2, the two were functionally the same. Since 12.5.4 and 15.0.2, they are different:

dump database model to "compress::3::/tmp/model.dmp"

ASE tells the backup server to load the zlib library and dump the database model to the file /tmp/model.dmp through the compress filter. The entire data stream is compressed. If you look at the dump file in a hex editor, then you will see the entire file is compressed.

dump database model to “/tmp/model.dmp” with compression = 3

ASE tells the backup server to load the zlib library and dump database model to the file /tmp/model.dmp but only the data volume is actually compressed. If you look at the dump file in a hex editor, you will see the first two volumes are mostly empty data (binary 0’s) but the embedded third volume is compressed.

You need to understand that whenever you dump a database to a file using this syntax, there are three volumes that are dumped. Two are administrative and the third is the data of your database.

In ASE 12.5.4 and 15.0.2, the Archive Database functionality was added

ASE requires that the archive file, your database dump file, is dumped with the “with compression = X” format, if it is compressed, as it needs access to the administrative volumes.

So, how does this affect us as DBAs? If you dump a database with ‘with compression = X’ on 12.5.4 esd5, you will NOT be able to load it into 12.5.3 esd 5 without using the 12.5.4 backup server. This has bitten us in the past when we attempted to load the customers’ database dumps.

Don’t forget to look at Sybase’s manual from time to time ;-).

Share Button

Comments

  1. Hi i have seen your site its very informative & very helpfull for suffer from this my site is aboutInformation on the signs and symptoms of breast cancer, as well as frequently asked questions about the rare, but deadly inflammatory breast cancer.
    you did well keep it up.

  2. neishb says:

    Hi!

    Re:- “Starting in ASE 12.5.2, Sybase added the with compression = X syntax, prior releases required the compress::X:: syntax. What is the difference?

    In releases prior to 12.5.4 and 15.0.2, the two were functionally the same. Since 12.5.4 and 15.0.2, they are different:”

    Does this mean that using the “compress::” syntax in v12.5.1 and the “with compression” syntax in v12.5.2 is functionally the same?

    I thought that as of v12.5.2 using the “with compression” for dump and load would use the native backup server sybmultbuf process which was not the case for “compress::” in previous v12 releases.
    Can someone please confirm this?

    Regards,

    Bill Neish

  3. Jeff Brandt says:

    I have to admit I haven’t tried the new syntax yet. However there is one thing I’m afraid will not work with the new syntax.

    If you try to dump a database to an existing file that was created as a fifo backup server will complain saying the file is not a normal file.

    However if you dump the database with the ‘compress::x::/path’ syntax and the destination is a fifo it will write the file without question. I figure it is due to the handling of the compress filter through an intermediate library that doesn’t check the destination file.

    So what is wrong with losing this capability?

    I can stream a dump through ssh. For example I can dump a database in California to a fifo which has ssh listening to it and cat the contents to a fifo on another machine in New York.

    You would typically start the ssh between machines, then login to the destination backup server and load the database from the fifo on the destination machine.

    Then you would dump the database on the source machine and you could watch a simultaneous dump / load on opposite machines.

    This saves hours and hours and compresses the transmission as well!

    Sure beats a dump compressed, scp, load compressed. Think how many times that data is being read and written. The fifo accomplishes a single read and a single write.


    Jeff Brandt

  4. Onkar says:

    Hi All,

    Actually i want to know that i am using dump database db_name to “compress::/path”. i am not mentioning the level of compression. So which is the by default level in this case and one more thing whenever i tried to dump database with compression level=0to9 it is taking too much size and time as compared to “compress::”. So which is most preferdable method to use in ASE12.5. Right now m using dump database db to “compress::/path”

    1. The default compression level is “6”. You likely won’t see much difference in size of the dump files with a compression level of “9” or “6”.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

Facebook login by WP-FB-AutoConnect