Can Sybase display size, db filename, etc from a compressed file without restoring the compressed db?

Posted on 2007-07-30
Last Modified: 2012-06-21
I am relative unfamilar with how Sybase uses compressed files.

can Sybase read the contents of a compressed file to show me the size of the database contained in the compressed files as well as table and column information? I would like to see such information without actually loading the database contained in the compressed files.

Here is a sample of the Sybase load statement
load database merrin
       from 'compress::6::/net/locki/export/dumps/support/clientDbs/mftp/BPI/merrin_01.zmp'
  stripe on 'compress::6::/net/locki/export/dumps/support/clientDbs/mftp/BPI/merrin_02.zmp'
  stripe on 'compress::6::/net/locki/export/dumps/support/clientDbs/mftp/BPI/merrin_03.zmp'
  stripe on 'compress::6::/net/locki/export/dumps/support/clientDbs/mftp/BPI/merrin_04.zmp'
  stripe on 'compress::6::/net/locki/export/dumps/support/clientDbs/mftp/BPI/merrin_05.zmp'

The system uses SQL Advantage/Sybase 12.5.3.

Basically, I would like to how the Sybase equivalent of MS-SQL Server's RESTORE FILELISTONLY FROM DISK.

Question by:ART_Mac03
    LVL 19

    Expert Comment

    I don't believe there is a way to do this.

    Sybase has a facility to allow you to mount and read database dumps without loading them but it explicitly does not work with compressed files.

    If this is something you want/need to do on a regular basis, you may want to change your backup scheme to dump without compression then use gzip or bzip2 (even more effective) to compress the dumps after the fact for archive.  You can then keep the latest un-compressed copy around or simply uncompress the dump files and them mount them as an external database.

    I am curious why you need to reverse engineer from a dump.  You can use PowerDesigner Physical Architect to reverse engineer your database(s) at regular intervals and then control just the data models.  PowerDesigner PA is available for free as part of the Sybase Windows Client installation.


    Author Comment

    Thanks Bill for the response;

    We need to reverse eng. the dump because the person who created the dump is not around & the db was created on a sys. that one seems to have access to (sad, but currently true).

    2ndly, the restored db causes a failure when accessed by the application under test.  The SQL transaction log is pointing to a problem with a missing col. in a table in the "restored" db. Thus, the rreason why I would like to check out the contents of the compressed db.

    Is there a way to uncompress a zmp file?
    LVL 19

    Expert Comment

    Well, that's a darn good question and something I have never tried before.

    You could see if guzip or unbzip2 can read and uncompress (a copy of course) of a file.  It will either do it without error or it will choke on it right away.  It won't take much to try it and you don't have anything to lose.

    On another front, the "system that no one seems to have access to"; is that at the O/S level or at the Sybase level?

    If you have simply lost the SA password, there is a way around it.  See a previous solution at

    If you have an O/S password problem, there are solutions to those as well which depend on which O/S you are using.


    Author Comment

    Hi Bill,

    Sorry for the slow response; I final found a way to rsolve the issue that started my query into how to read the contents of a 'compressed' Sybase dump.

    But, I am interested in knowing: what Sybase facility allows an user to mount and read database dumps?
    LVL 19

    Accepted Solution

    The feature is called "Archive Database Access"  It was introduced in version 12.5.4 and is documented in the New Features Guide, Chapter 2.  When I mentioned it, I was not sure which version introduced the feature.  Looks like you are a double-dot release behind.

    To make this work, you have to CREATE ARCHIVE DATABASE that creates an actual database for utility purposes but does not have to be big enough to hold the data from the dump.  The you do a LOAD with the NORECOVERY option which connects the dump to the database.  It does not load the data, it maps pages to locations in the dump file(s) so that the server can get to them as if they were part of the database.

    I don't know what your organizations upgrade plans are but if you are not going to move to 15.0.2 soon and or plan/have to stay with 12.5.x for an extended period, I would bite the bullet and go to 12.5.4.  It is the terminal release of 12.5 and is on ESD4 so it is pretty mature and bug-free.


    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Suggested Solutions

    I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
    For Sennheiser, comfort, quality and security are high priority areas. This paper addresses the security of Bluetooth technology and the supplementary security that Sennheiser’s Contact Center and Office (CC&O) headsets provide.  
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now