Search This Blog

Tuesday, July 6, 2010

SAP MaxDB - Defining Backup Templates

 

Before you can back up data and log entries to a data carrier, you have to define a backup template. In the properties of the backup template you specify the backup type and the type of data carrier that is to be used.

To speed up backups, you can carry them out to several data carriers in parallel. If choose to do so, you need to define a backup template for parallel backups. You can use third-party backup tools to back up and restore data and log entries

-> You have to logon the database as the database system administrator or as a DBM operator with server authorization for performing backups

Procedure

  1. Select the database in the explorer tree.

  2. In the context menu of the database, choose Administration.

  3. Open the Backup tab page.

  4. Expand Templates.

  5. Choose New.... .

    To create a backup template for parallel backups, choose  New   New Parallel Backup Template . Then proceed as with normal backup templates, except that you define several devices instead of one. For backups of the TAPE type, you can use up to 32 tape devices in parallel.

  6. Enter the following data:

 

Backup Template Properties

Property

 

Description

 

Name

 

The name of the backup template has no influence on the name of the backup created later using this backup template.

 

Backup Type

 

  • Complete data backup

  • Incremental data backup

  • Log backup

 

Device Type

Data carrier type

  • File

  • Tape

  • Pipe

     Note

    For automatic log backups, you cannot use pipes.

     

Backup Tool

Only if you are using a third-party backup tool

Specify the backup tool:

  • BACK: Backint for Oracle or Backint for MaxDB

  • NSR: Networker

  • TSM: TSM

 

Device/File

Depending on the backup type enter the required information:

  • Name of the tape device in the operating system

  • Path and file name of the file in the file system

     Caution : If you do not enter a full path here, the system stores your backup in the run directory of the database.

  • Path and name of the pipe

We recommend that you do not use the same data carrier for several databases.

For log backups to files, the system adds a sequence number to the name of each new backup file. It assigns the numbers sequentially as long as the history of the log backups is not interrupted. If the log backup history is interrupted (for example after the database was initialized), the system starts numbering at 001 again.

It also uses sequential numbers if you carry out multiple log backups for one database onto different data carriers, and thus to files with different file names.

 Example

LogUri.001

LogKai.002

LogOleg.003

LogUri.004

LogUri.005

End of the example.

If automatic log backup is switched on, the system stores all backup files under the same file name using a sequence number.

 Example

DEMODB_MYLOG.001

DEMODB_MYLOG.002

DEMODB_MYLOG.003

DEMODB_MYLOG.004

DEMODB_MYLOG.005

 

You can also back up to data carriers on remote computers.

 

Size

There is no size restriction in default mode.

The size of log backups to files is calculated as the size of a log segment (general database parameter AutoLogBackupSize) plus the space required by system information.

 

Compressed

For backup templates of the FILE and PIPE types only

Specifies whether the backup is compressed

 

Overwrite

For backup templates of the FILE type only

Specifies whether the backup file can be overwritten

We recommend that you do not overwrite a backup with the backup that immediately follows it. Always keep an older version of the backup.

 

Block Size

 

Block size that the system uses to write backups to the data carrier.

 

Autoloader

 

Select this option if you want to use a tape device with an automatic tape loader.

 

OS Command

 

For backup templates fo the TAPE type only

Operating system command for backing up to tape devices

 

Encryption

Prerequisites: license for SAP Cryptolib (only available in SAP systems), private-public key pair has been created using sapgenpse

  • Algorithm

    Available encryption algorythms: DES, AES

  • Owner

    Private key owner (see X.509 certificate)

 

To use a third-party backup tool, choose the following settings:

  • Device Type: Pipe

  • Backup Tool: Name of the backup tool

  • Device/File: Operating system path of the pipe

 

More Information SAP MaxDB - Using Third-Party Backup Tools

 

 

Example of a Backup Template for a Complete Data Backup

Property

Value

Name of the backup template

COM

Backup type

COMPLETE DATA

Data carrier type

FILE

Data carrier (Device/File)

DEMODB_COM

Note that if you do not enter an absolute path, then the database system uses the run directory of the database

Example: C:\ProgramData\sdb\globaldata\wrk\DEMODB\DEMODB_COM

 

Size of data carrier

No restriction (blank or 0)

Block size

8 pages

Overwritable

Yes

 

Example of a Backup Template for a Log Backup

Property

Value

Name of the backup template

DEMODB_LOG

Backup type

LOG

Data carrier type

FILE

Data carrier (Device/File)

DEMODB_MYLOG

Note that i you do not enter an absolute path, then the database system uses the run directory of the database

Example: C:\ProgramData\sdb\globaldata\wrk\DEMODB\DEMODB_LOG

 

Size of data carrier

No restriction (blank or 0)

Block size

8 pages

Overwritable

No

 

SAP MaxDB - Using Third-Party Backup Tools

 
You can use third-party backup tools to back up and restore data and log entries. Some of these backup tools are supported directly by SAP MaxDB. With operating system scripts, you can also use all other backup tools that can process backups from pipes, even if they are not directly supported by SAP MaxDB.
 
Caution : For backup tools not directly supported by SAP MaxDB: After the database system has backed up data to a pipe, it cannot check whether the backup was successful (the backup history does not offer reliable information in this case). Use your operating system script to check whether the backup was successful.

 

TSM (IBM/Tivoli) -

You can connect TSM using the TSM client adint2 or using the Backint for Oracle interface.

With adint2, you achieve better performance. However, this program is not available on all platforms.

 

NetWorker (Legato) -

You can connect NetWorker using the command line clients SAVE, RECOVER and MMINFO that are included in the Networker software, or using the Backint for Oracle interface.

The command line clients deliver better performance.

 

All backup tools that support Backint for SAP MaxDB -

Backint for SAP MaxDB is an interface that is supported by various third-party vendors.

 

All backup tools that support Backint for Oracle -

Backint for Oracle is an interface that is supported by various third-party vendors.

 

Procedure - Use the normal backup and restore functions.

Result - When data is backed up using a backup tool that is supported directly by the database system, each backup or data stream is given an external backup ID (External Backup ID).

 

 

SAP MaxDB - Connecting Third-Party Backup Tools

 

Together with SAP MaxDB database tools, you can use third-party backup tools to backup, restore, export, and import data.

 

SAP MaxDB supports a direct connection to a range of third-party backup tools. This requires you to configure the SAP MaxDB software accordingly.

You may also use third-party backup tools which are not directly supported by SAP MaxDB, provided that these tools can retrieve data from pipes.

If, for example, you want to back up the data stored in a database or export data from a database, you can save this data using the SAP MaxDB database tools to files, pipes, or tapes (by means of a tape device).

However, you can also use a third-party backup tool to back up the data on to a data carrier. Even then you can control the necessary actions using the SAP MaxDB database tools. The backup tool provides the data carrier onto which you can save or export your data.

You can use third-party backup tools for the following actions:

  • Backing up to data carriers

    • Complete data backups

    • Incremental data backups

    • Log backups

    • Archiving the backup files (for log backups)

  • Restoring backups

    • Restoring the database using data backups, log backups, and archived log backups

  • Exporting data to data carriers

    • Exporting the entire database

    • Exporting the entire database catalog

  • Importing data from the data carriers

    • Importing the entire database

    • Importing the entire database catalog

 

Recommendation

After you have defined the configuration, test all the planned actions. This allows you to familiarize yourself with the relevant SAP MaxDB database tool, and to test the correct configuration of the SAP MaxDB software for the backup tool. This is a prerequisite for ensuring that no errors occur when the third-party backup tool is used to back up, restore, import, or export data while the system is running in production operation.

End of the recommendation.

Constraints

With backups and restores, you only can switch from Microsoft Windows to Linux and vice versa. This means that a backup created on the Microsoft Windows operating system can only be restored on the same operating system or on Linux. A backup created on Linux can only be restored on the same operating system or on a Microsoft Windows operating system.

For data migration between different operating systems, in most cases Loader will be the best tool to use. Loaderl does not impose any restrictions on switching operating systems when exporting or importing data. However, there may be restrictions since various backup devices have a limited independence of the operating system. If, for example, you want to switch from Microsoft Windows to Unix, a tape device or a third-party backup tool must be compatible with both operating systems. Check this beforehand in your backup device documentation.

 

Thursday, July 1, 2010

SAP MaxDB :: Displaying Information About the Data Area


Prerequisites

Log on to the database as the database system administrator or as a DBM operator.

The database should be in the ONLINE operational state.

Procedure

Select the database in the explorer tree.

In the context menu of the database, choose Administration.

Open the Data Area tab page.

 

Property

Description

General

Current and maximum configurable number of data volumes

Usage

Used space and free space in the data area

Parameters

Database parameters relevant for data volumes

Data Volumes

Configured data volumes

 

SAP MaxDB :: Displaying Information About the Log Area

 


Prerequisites

Log on to the database as the database system administrator or as a DBM operator.

The database should be in the ONLINE operational state.

Procedure

Select the database in the explorer tree.

In the context menu of the database, choose Administration.

Open the Log Area tab page.

 

Log Area: Information

   

Property

Description

General

Log settings:

o Log Mode

o Overwrite Mode for the Log Area

o Redo Log Management

Automatic log backup: Activating or Deactivating Automatic Log Backup

To change any of these settings, choose the corresponding link.

Usage

Free and used space in the log area

Activities

Information on logging:

o Log pages written with redo log entries

o Wait for Log Writer

Indicates how often the system had to wait for a commit or rollback for the Log Writer for finish an I/O operation

o Group Commits

Indicates how often the system wrote pages that waited for more than one task

o If the value of Log I/O Queue Overflow is greater than 0, increase the space available for log queues.

You can configure the number of log queues with the special database parameter LogQueues and the size of the log queues with LogQueueSize.

Parameters

Database parameters relevant for log volumes

Log Volumes

Configured log volumes


Monitoring SAP MaxDB Databases

Below are the monitoring activities to be performed

  • Automatic Problem Notification
  • Monitoring Free Space in the Data Area
  • Monitoring Free Space in the Log Area
  • Monitoring the Hit Rate for Access to the Caches
  • Monitoring Backups
  • Monitoring Database Activities
  • Monitoring the Number of Database Sessions
  • Monitoring Security-Relevant Activities

 

Changing SAP MaxDB Database Properties

Property

Restrictions

Modifiable

 

Database name

Conventions for Database Names

No

 

Database System Administrator: Name and password

Conventions for User Names and Passwords

Name: No
Password: Yes

 

Data area (data volumes): Size (=database size), directory, automatic extension
Log area (log volumes): Size and directory

General database parameters MaxDataVolumes and MaxLogVolumes

 

Yes

Working memory used by the database

General database parameter CacheMemorySize

Note that this parameter only roughly determines the size of the working memory used by the database. There are database functions which also need a certain amount of working memory, but whose memory consumption is not configured with this parameter.

Yes

Number of CPUs

General database parameter MaxCPUs

Yes

 

Maximum number of parallel database sessions

General database parameter MaxUserTasks

Yes

 

Maximum number of locks

General database parameter MaxSQLLocks

Yes

 

Automatic update of the SQL optimizer statistics

For SAP systems, see SAP note 927882.

Yes

 

Automatic log backup

-

Yes

 

Automatic database start

Only available on Microsoft Windows

Yes

 

Log settings

-

Yes

 

SAP MaxDB Automating Administration Tasks

As a database administrator, you must periodically carry out certain administration tasks. In addition to these, you may need to carry out further administration tasks after specific system events have occurred.

Some administration tasks can be automated using special automating functions, others can be planned with the scheduler, triggered by events or triggers, or planned with the DBA Planning Calendar.

 
Using Automating Functions
  • Automatic extension of the data area (database size)
  • Automatic Log Backup
  • Automatic update of the SQL optimizer statistics
 
Using the Scheduler

You can use the scheduler to schedule DBM commands to be executed at specific times. For that purpose, you log on to the database and create a job in the scheduler for every DBM command to be executed. You must activate the scheduler for the jobs to be executed.

The scheduler uses a separate DBM server process for the connection to the database. Therefore, the scheduler remains active when you stop the database.

 
Using Database Events

You can define that database events are triggered under specific circumstances, and that certain actions are carried out in response to these events, for example sending an e-mail, executing a DBM command or executing a command from another program.

 
Using Database Triggers

You can use database triggers to trigger actions in the database following certain data changes or a restart

 
Using the DBA Planning Calendar

In SAP systems, you can plan periodic administration tasks with the DBA Planning Calendar.

 

SAP MaxDB Periodic Administration Tasks

The following table is an example for scheduling periodic administration tasks. Depending on how large you configured your database and how much of its capacity is in use, you may have to carry out these administration tasks more or less frequently than in this example.

Periodic Administration Tasks (Example)

Task

Frequency

Comments and Recommendations

Complete data backup

On each productive day or according to your backup schedule

The more recent the last data backup, the quicker you can restore the database after a system failure.

Every restore requires a complete data backup as a starting point.

Incremental data backup

Optional

Once to multiple times a day, according to your backup schedule

If you cannot afford a complete data backup every day, then you should carry out at least an incremental data backup on each productive day.

Incremental data backups are cumulative: if you recover your database, only the most recent incremental backup is used.

Log backup

Once to multiple times a day, depending on how much data was changed in the database and according to your backup schedule

Only necessary if automatic log backup is switched off.

Archiving backup files

Regularly

Depending on how much space is available for your log backups

Only necessary for log backups on data carriers of the FILE type

Checking database structures

Once a week

We recommend that you check the database structures at times when the database load is low, or using a system copy.

Updating SQL optimizer statistics

Once a week

For SAP systems refer to SAP note 927882

Outside SAP systems, we recommend that you activate the automatic statistics update

 

Tools for Managing SAP MaxDB Databases

The following tools are available for managing SAP MaxDB databases:

  • Computer Center Management System (CCMS)

    Tool for configuring, managing and monitoring SAP systems, including databases

    Only available in SAP systems

  • Database Studio

    Tool for configuring, managing and monitoring SAP MaxDB databases

    From version 7.7 onwards, Database Studio replaces the database tools Database Manager GUI and SQL Studio and also offers additional functions (such as a GUI for the Loader program).

  • Database Manager CLI

    Command line tool for configuring and managing SAP MaxDB databases