Sybase: Get information about a dumped database

In ASE 15, it is possible to get information from a dump file directly using the load database command with the "with headeronly" parameter:

1> load database master from '/db/dump1/master.201209170128' with headeronly
2> go
Backup Server session id is: 69. Use this value when executing the 'sp_volchanged' system stored procedure after fulfilling any volume change request from the Backup Server.
Backup Server: 6.28.1.1: Dumpfile name 'master12261014D2 ' section number 1 mounted on disk file '/db/dump1/master.201209170128'
This is a database dump of database ID 1, name 'master', from Sep 17 2012  1:28AM. ASE version: Adaptive Server Enterprise/15.5/EBF 18164 SMP ESD#2/P/x86_64/Enterprise Linux/asear155/2514/64-bit/F. Backup Server version: Backup Server/15.5/EBF 18164 ESD#2/P/Linux AMD Opteron/Enterprise Linux/asear155/3197/64-bit/OPT/We. Database page size is 4096.
Database contains 15360 pages; checkpoint RID=(Rid pageid = 0x30e5; row num = 0x20); next object ID=1929054877; sort order ID=50, status=0; charset ID=1.
Database log version=7; database upgrade version=35; database durability=UNDEFINED.
segmap: 0x00000007 lstart=0 vstart=[vpgdevno=0 vpvpn=4] lsize=6656 unrsvd=3461
segmap: 0x00000007 lstart=6656 vstart=[vpgdevno=0 vpvpn=22532] lsize=8704 unrsvd=8223

This will not really load the dump but just display information about the dump. In the example above, you can see the following:

  • which database was dumped: ID/name: 1/master
  • when was the dump performed: Sep 17 2012 1:28AM
  • which ASE version is running on the server where the dump was created: 15.5
  • the page size on that server: 4K
  • number of pages, next object ID, sort order, status, charset
  • the segmentation map

One thought on “Sybase: Get information about a dumped database

Leave a Reply

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