I had a bit of a scare a few days ago. I was checking the database backup of one of our customer’s systems, a SAP ERP 6.0 EHP5 running on Windows Server 2008 R2 and Sybase ASE 15.7.0.042. I wanted to check exactly what info about the source database are in the backup itself and what I’d need to extract separately as DDL. So I run a SQL command like this:
load database SID from ‘stripe.000’
stripe on ‘stripe.001’
stripe on ‘stripe.002’
with listonly= create_sql
This command was suggested to me in this thread http://scn.sap.com/thread/3294950 and it’s very useful, it will give you most of the SQL commands needed to rebuild the source database from scratch (not all of them though: you need to take a separate note of what options are set, more on this later).
The command this time gave me another message though, this one: “You cannot load this dump because it contains functionality that is available only on the server on which it was dumped.“
I’d already seen this message, it’s the main symptom in note 1864348, which I’d seen because it was listed as a SAP Topnote in the Support Portal Newsletter. But it shouldn’t have applied to that system, I had checked it and the option that triggers the bug (‘deallocate first text page’) wasn’t set!
Well, turned out I didn’t check my databases correctly at all! It also meant all the backups I’d taken for that database weren’t recoverable – not a nice situation to be in.
First mistake I did was trusting Sybase Central about the options actually set on the database. While Sybase Central told me the option ‘deallocate first text page’ wasn’t set, it actually was! The correct way of checking what options are set on a database is using sp_helpdb:
sp_helpdb <database name>
Second mistake was: I didn’t test the database dumps themselves. Maybe you don’t have the time or resources to test an actual db recovery, but you can check if you’re affected by this bug without actually loading the dump if you run load database with the option create_sql, using the syntax at the top of this post. That’s enough to trigger the error message if you’re affected by the bug.
So if you are using Sybase ASE 15.7.0.042, be extra careful and check if note 1864348 affects you. If you didn’t upgrade, and installed that version directly, check anyway. It will take you just a few minutes but could probably save you hours of tears and headaches!
Then if you are affected, just follow the instructions in the note, then check again to be sure you’re safe. Backups are not to be taken lightly!
I hope this helps. Kind regards.