Retrieve information from a dump file

July 23, 2009

ASE stores important information on databases as part of the backup procedure. This information can be retrieved starting with ASE v12.5.4 using the "with headeronly" feature of "load database".

This will not load the database, so it's safe to use.

 
1> LOAD DATABASE db_one FROM "/tmp/test_ce_0.bak.gz"
2> stripe ON "/tmp/test_ce_1.bak.gz"
3> WITH headeronly
4> go
 

Backup Server session id is: 67. Use this value when executing the 'sp_volchanged' system stored procedure after fulfilling any volume change request from the Backup Server.
Backup Server: 4.10.2.1: Label validation error: first label not VOL1.
Backup Server: 6.31.2.4: Volume rejected.
[...]

Probably the dump is compressed, so we modify the load database command a little and add the "compress::" option:

 
1> LOAD DATABASE db_one FROM "compress::/tmp/test_ce_0.bak.gz"
2> stripe ON "compress::/tmp/test_ce_1.bak.gz"
3> WITH headeronly
4> go
 

Backup Server session id is: 60. Use this value when executing the 'sp_volchanged' system stored procedure after fulfilling any volume change request from the Backup Server.
Backup Server: 4.132.1.1: Attempting to open byte stream device: 'compress::/tmp/test_ce_0.bak.gz::00'
Backup Server: 4.132.1.1: Attempting to open byte stream device: 'compress::/tmp/test_ce_1.bak.gz::01'
Backup Server: 6.28.1.1: Dumpfile name 'db_one09204099EA ' section number 1 mounted on byte stream 'compress::/tmp/test_ce_0.bak.gz::00'
Backup Server: 6.28.1.1: Dumpfile name 'db_one09204099EA ' section number 1 mounted on byte stream 'compress::/tmp/test_ce_1.bak.gz::01'
This is a database dump of database ID 5, name 'db_one', from Jul 23 2009 10:56AM. ASE version: Adaptive Server Enterprise/15.0.3/EBF 16548 ESD#1/P/Sun_svr4/OS 5.8/ase1503/2680/64-bit/FBO/Thu Mar . Backup Server version: Backup Server/15.0.3/EBF 16556 ESD#1/Sun_svr4/OS 5.8/ase1503/3093/32-bit/OPT/Wed Mar 4 21:05:57 20. Database page size is 4096.
Database contains 76800 pages; checkpoint RID=(Rid pageid = 0xcaf4; row num = 0x3); next object ID=44524161; sort order ID=50, status=0; charset ID=1.
Database log version=7; database upgrade version=35.
segmap: 0x00000003 lstart=0 vstart=[vpgdevno=51 vpvpn=0] lsize=51200 unrsvd=49885
segmap: 0x00000004 lstart=51200 vstart=[vpgdevno=21 vpvpn=0] lsize=25600 unrsvd=25101

The information of interest includes the following:

dbname : 'db_one'
pagesize: 4K
db size: 76800pages * 4096 Bytes = 300 MB
fragments: 3 (System & Default) = lsize 51200 = 200 MB
4 (Log) = lsize 25600 = 100 MB
ASE version: 15.0.3 ESD#1

tags: , , , ,
posted in ase by Frank

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org