[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 647
  • Last Modified:

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

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'
go

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.

Thanks,
0
ART_Mac03
Asked:
ART_Mac03
  • 3
  • 2
1 Solution
 
grant300Commented:
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.

Regards,
Bill
0
 
ART_Mac03Author Commented:
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?
0
 
grant300Commented:
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
http://www.experts-exchange.com/Database/Sybase/Q_20094574.html

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

Regards,
Bill
0
 
ART_Mac03Author Commented:
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?
0
 
grant300Commented:
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.

Regards,
Bill
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now