Source:SAP ASE Backup

From SEPsesam
Revision as of 11:48, 30 March 2018 by Sta (talk | contribs) (Corrected because of GUI change (backup type to task type).)

Template:Copyright SEP AG en

Docs latest icon.png Welcome to the latest SEP sesam documentation version 4.4.3/4.4.3 Tigon. For previous documentation version(s), check Documentation archive.


Overview

SEP sesam provides efficient data protection for SAP ASE (formerly SAP Sybase ASE) that was developed in collaboration with SAP. This API–based backup module works through a special destination syntax that directs ASE to use SEP sesam's library for the backup.

In the past, there were two possibilities for backing up databases stored on ASE server: backup to file system and backup to tape. Both methods had the same problems: lots of scripting was required to automate the backups; there was no retention management for backups; it was not possible to monitor the backup status over time; and backup as a service (BaaS) was not possible.

SEP sesam's API-based backup module for SAP ASE centralizes and automates data backup and restore in SAP environments. When dump command is executed with specifying the special destination, SAP ASE loads a SEP sesam library and writes the backup into a pipe.

As of 4.4.3 Tigon V2, the SAP ASE backup extension is implemented as an internal backup appliance to provide efficient data protection for SAP ASE. The sbc_proxy frontend is used as a wrapper to create all configuration parameters for SAP ASE isql to perform backup via SAP ASE SQL API. This includes creating a backup history and storing save set ID into the backup history, which simplifies the restore process. However, SEP sesam simple backup configuration using GUI currently does not support multiple stripes (parallel process); only one stripe (backup channel) is used for backup. If you want to use multiple stripes, consider using backup commands instead. For details, see SAP ASE documentation Dump and Load with Multiple Stripes.

Key features

SEP sesam SAP ASE integration advantages:

  • Automatic retention management for your SAP ASE database and transaction log backups.
  • Simple overview and monitoring with SEP sesam GUI and web-based dashboard.
  • No more manual housekeeping jobs for local backups.
  • Allows for integration into system refresh utilities.

SAP ASE system databases overview

master
The master database controls the operation of SAP ASE and stores information about all user databases and their associated database devices. Make sure that the master database is backed up regularly.
model
This SAP ASE database is a template for new user databases and does not necessarily have to be backed up. SAP recommends to back up the model database each time it is changed.
sybsystemprocs
This database holds the SAP system procedures for the SAP ASE server. It is recommended to back up the sybsystemprocs database each time it is changed, if you have stored procedures on your database server.

For details on system databases, see official SAP documentation System and Optional Databases.

If you are backing up SAP ASE via GUI, create a separate backup task for each database you want to back up. If you are backing up using backup commands, use the backup command examples to create backup scripts for the respective system databases.

Prerequisites

To ensure error-free operation of SEP sesam and improve performance, make sure that the following conditions are met:

Information sign.png Note
  • Before proceeding, you should validate that you can backup to SEP sesam. Run a test Path backup manually to ensure that the backups work. For details on typical backup configuration, see Standard Backup Procedure.
  • Make sure to regularly check your SAP ASE databases consistency as well as to validate backups of your SAP ASE database.

Simple backup configuration using GUI

As of 4.4.3 Tigon V2, you can configure SAP ASE backup by using the GUI without any extra configuration at SAP ASE side and without setting up backup commands. Note that currently this method does not support multiple stripes (parallel process); only one stripe (backup channel) is used for backup.

SEP Tip.png Tip
If you want to use multiple stripes, consider using backup commands instead.

Creating a backup task with SAP ASE task type on SEP sesam Server

Use the SEP sesam GUI to configure the SAP ASE backup tasks. You have to create a separate backup task for each SAP ASE database you want to back up.

  1. From Main Selection -> Tasks -> By clients, select SAP ASE client and click New backup task. The New backup task window opens.
  2. Specify the Source; since you have to create a separate backup task for each SAP ASE database you want to back up, the source must be specified accordingly, e.g., specify a database master for the backup task SAP_ASE_master. By selecting the source, the task type and task name are set automatically.
  3. SAP ASE bck task.png
  4. Click the tab SAP ASE and enter the user name and password to access the database. Note that a user account with sufficient privileges is required to perform backup and restore operations!
  5. SAP ASE tab.png
  6. Click OK to create the task.

Once you created a task, create a schedule to specify when you want to back up your data. Then create a backup event by selecting where to back up your data to and how. For details, see Standard Backup Procedure.

Backup configuration using backup commands

The following backup configuration is used with SEP sesam 4.4.3 Tigon.

Creating a backup task

Before the ASE backint component can be started on the ASE system, a backup task has to be specified. This backup task is set as parameter during the ASE backup command created on the ASE system.

Sybase backup.jpg

Creating a backup command on ASE System

Database dump and load commands follow similar syntax regarding the use of the SAP ASE backup API. The library delivered by SEP sesam to save the backup to the SEP sesam Server is treated as a special destination location.

  • Special destination syntax:
  • "sepsybase::<pipename>;<arguments>"
  • Possible arguments are:
  • DRIVE=(drivenumber) POOL=(mediapool) SERVER=(sesamserver) JOB=(sesam_taskname)
  • Backup command examples:
    • Backup of master database (recommended) to backup server "backup001.sep.de" into media pool "daily_7" using drive "2" and the task name "sybase_ase-1":
    • DUMP DATABASE master TO "sepsybase::/tmp/;DRIVE=2;POOL=daily_7;SERVER=backup;JOB=sybase_sesam_db"
    • Backup of database PRD to backup server "backup001.sep.de" into media pool "daily_7" using drive "2" and the task name "sybase_ase-1":
    • DUMP DATABASE PRD TO "sepsybase::/tmp/;DRIVE=2;POOL=daily_7;SERVER=backup001.sep.de;JOB=sybase_ase-1"
    • Backup of transaction log from database SRD:
    • DUMP TRANSACTION SRD TO "sepsybase::/tmp/;DRIVE=4;POOL=tp-month;SERVER=sesamsrv02.yourcompa.ny;JOB=SRD-22-syb"

In case the maximum length of parameters exceeds 127 characters an configuration file can be specified:

DUMP DATABASE SESAM_DB TO "sepsybase::/tmp/;SESAM_INI_FILE=/tmp/backup.ini"

The configuration file can then include a list of arguments as shown above.

For details on SAP ASE backup, see SAP Help Portal.

Creating a database backup SQL file

To back up databases, you have to trigger them from the SQL interface of the ASE. This is possible by using SQL scripts. There are some examples for DUMP DATABASE queries in the section below. Run of the following it is necessary to execute your ASE server by one of those DUMP commands:

  1. Open text editor and copy content below into a new file:
  2. DUMP DATABASE master TO "sepsybase::/tmp/;DRIVE=<sesam-drive>;POOL=<sesam-pool>;SERVER=<sesam-server>;JOB=<sesam-taskname>" DUMP DATABASE sybsystemprocs TO "sepsybase::/tmp/;DRIVE=<sesam-drive>;POOL=<sesam-pool>;SERVER=<sesam-server>;JOB=<sesam-taskname>" DUMP DATABASE sybsystemdb TO "sepsybase::/tmp/;DRIVE=<sesam-drive>;POOL=<sesam-pool>;SERVER=<sesam-server>;JOB=<sesam-taskname>" DUMP DATABASE sybmgmtdb TO "sepsybase::/tmp/;DRIVE=<sesam-drive>;POOL=<sesam-pool>;SERVER=<sesam-server>;JOB=<sesam-taskname>"
  3. Replace the variables with the values suitable for your environment, for example:
  4. DUMP DATABASE master TO "sepsybase::/tmp/;DRIVE=2;POOL=daily_7;SERVER=backup001.sep.de;JOB=sybase_ase-1" DUMP DATABASE sybsystemprocs TO "sepsybase::/tmp/;DRIVE=2;POOL=daily_7;SERVER=backup001.sep.de;JOB=sybase_ase-1" DUMP DATABASE sybsystemdb TO "sepsybase::/tmp/;DRIVE=2;POOL=daily_7;SERVER=backup001.sep.de;JOB=sybase_ase-1" DUMP DATABASE sybmgmtdb TO "sepsybase::/tmp/;DRIVE=2;POOL=daily_7;SERVER=backup001.sep.de;JOB=sybase_ase-1"
  5. Save the file into your sybase directory as sysdbbackup.sql. To make your SAP ASE server execute the SQL file, you can use a SEP sesam command event configuration. Use the following command syntax:
  6. isql -S server_name -U user_name -P password -i script_name
  7. Example:
  8. isql -S localhost -U backup -P supersecret -i $SYBASE/$SYBASE_ASE/sysdbbackup.sql By running this command all relevant system databases on your SAP ASE server will be backed up. You may either maintain an SQL file for each of your user databases and execute or configure a separate command event for every file, or put all DUMP DATABASE calls into one file and execute all backups one after another.

See also

SAP ASE ConfigurationSAP ASE Restore

External references