5 1 0:SAP ASE Restore

From SEPsesam

Welcome to the latest SEP sesam documentation version 5.1.0 Apollon. For previous documentation version(s), check documentation archive.


SEP sesam provides efficient data protection for SAP ASE (formerly SAP Sybase ASE) that was developed in cooperation with SAP. SEP sesam's API-based backup module for SAP ASE centralizes and automates data backup and restore in SAP environments.


  • Ensure that the required configuration steps are performed and the prerequisites are met. See SAP ASE Configuration and SAP ASE Backup.
  • Check that there is sufficient free space on the target storage system to which you want to restore your data.

Restore process

The restore process uses the standard isql commands: LOAD DATABASE <XY> FROM, LOAD TRAN <XY> FROM.

Restoring SAP ASE differs slightly depending on your SEP sesam version.

  • In the newer SEP sesam versions, a saveset ID is already stored in the backup history, which simplifies the restore process.
  • In SEP sesam versions ≤ 4.4.3, the restore process always fetches the latest saveset from the backup server by default. If you want to restore an older saveset, use the option SAVESET= option during the restore process. You have to obtain the saveset ID from the job details in the SEP sesam GUI.

Restore examples

Restoring a database with a specific saveset ID

The SAP ASE backup extension is implemented as an internal backup appliance to provide efficient data protection for SAP ASE. When a backup is run on schedule or manually with the Immediate Start option, SAP ASE writes backup processing information to the backup log, including the isql script for the backup and the required restore commands via

load database <database_name> with listonly=load_sql

The output of the above command contains the commands needed to recover the database to the state of the recent backup. For sample output, see SAP ASE backup execution.

To restore your database, you have to specify the following parameters:

  • SAVESET= (saveset to restore)
  • JOB= (name of the backup job)
  • SERVER= (SEP sesam Server)

The output should look something like the following:

sybase16:~ # isql -S SYBASE16 -U <USER> -P <PASSWORD>
1> LOAD DATABASE pubs2 FROM 'sepsybase::/tmp/;SERVER=dogmatix.sep.de;JOB=dogmatix_SAP_ASE_pubs2;SAVESET=SF20171127172533829@UDGj1cD_cBS'
2> go
Backup Server session id is: 108. Use this value when executing the
'sp_volchanged' system stored procedure after fulfilling any volume change request from the Backup Server.
Backup Server: Attempting to open byte stream device:
Backup Server: Archive API information for
Vendor application   name=SYBASE_SESAM, Library version=2, Message=syb_open: Command type [1]! SYBASE: (xbsa.a) BSASetTrace: PID 1331, ucTraceLevel 2.
Backup Server: Dumpfile name 'pubs2173310F514  ' section number 1
mounted on byte stream
Backup Server: Database pubs2: 2820 kilobytes (39%) LOADED.
Backup Server: Database pubs2: 7174 kilobytes (100%) LOADED.
Backup Server: Database pubs2: 7184 kilobytes (100%) LOADED.
Backup Server: LOAD is complete (database pubs2).
Started estimating recovery log boundaries for database 'pubs2'.
Database 'pubs2', checkpoint=(1343, 14), first=(1343, 14), last=(1343, 14).
Completed estimating recovery log boundaries for database 'pubs2'.
Started ANALYSIS pass for database 'pubs2'.
Completed ANALYSIS pass for database 'pubs2'.
Started REDO pass for database 'pubs2'. The total number of log records to
process is 1.
Completed REDO pass for database 'pubs2'.
Use the ONLINE DATABASE command to bring this database online; ASE will not bring it online automatically.

Restoring a database from the latest full backup

To restore a database to its original destination, you can use the following example isql statement. You have to specify the following parameters:

  • SERVER= (backup server)
  • JOB= (name of the backup job)
  • POOL= (name of the backup pool)

An example script would look like this:

use master
LOAD DATABASE SESAM_DB FROM "sepsybase::/tmp/;SERVER=backup;POOL=backup;JOB=sybase_sesam_db

Restoring a database to a different target with the latest full backup

To restore a database under a different name, you can use the following example where the database is set up on the device (device_name):

use master
CREATE DATABASE SESAM_DB_RESTORE on device_name for load
LOAD DATABASE SESAM_DB_RESTORE FROM "sepsybase::/tmp/;SERVER=sybasebackup;POOL=backup;JOB=sybase_sesam_db"

Restoring a database with transactional logs

In a first step, restore the database from the latest FULL backup as shown in the examples above, in a second step restore each transactional backup created for the database. This also means that you have to obtain all saveset information for the backups via the GUI.

Restore transactional logs by:

LOAD TRAN TARGET_DATABASE FROM "sepsybase::/tmp/;SERVER=backup;POOL=backup;JOB=sybase_sesam_db;SAVESET=XX

You have to repeat this action for each transactional log you want to apply for the database.

Recovering a database

You should use the SAP ASE documentation for details on how to recover the database.

Proceed as follows to minimize data loss in the event of a database failure and to bring the database back into operation:

  1. Create an emergency dump of the transactions using the SAP ASE sybdumptran command line tool.
  2. Perform a clean install of the ASE server software and install the API integration.
  3. Start the ASE server process on the command line with the parameter -m. For details on how to load a backup copy of the master, see SAP ASE documentation.
  4. Restore the master database using "load database master from sepsybase::...".
  5. After the restore, the SAP ASE server is automatically stopped. Start the server normally.
  6. The databases of the old server will be in the suspect state. Drop all databases that you want to restore. Then recreate the device files and databases according to the original configuration.
    Version ≥ SAP ASE 16.0 SP02 PL05

    Instead of deleting and recreating the suspect databases, you can re-initialize lost disk devices with "DISK REINIT <DEVICE>".

  7. Restore the databases by using "load database <XY> from sepsybase::...".

See also

SAP ASE ConfigurationSAP ASE Backup

External references

SAP ASE documentation: Recovering a DatabaseThe sybdumptran UtilityLoading a Backup of the master database

Copyright © SEP AG 1999-2024. All rights reserved.
Any form of reproduction of the contents or parts of this manual is allowed only with the express written permission from SEP AG. When compiling and designing user documentation SEP AG uses great diligence and attempts to deliver accurate and correct information. However, SEP AG cannot issue a guarantee for the contents of this manual.