现在的位置: 首页 > 综合 > 正文

SAP.数据库备份.Backup the database

2013年10月02日 ⁄ 综合 ⁄ 共 9325字 ⁄ 字号 评论关闭

·how databases store their data
·how data backups from SAP system can be performed
Objectives
at the conclusion of this unit, you'll be able to:
·back up the database
·determine whether your database backups have been successfully performed
ADM 100 mySAP Technology Admin (p107)

 


 

Procedure documentation DBA Planning Calendar Locate the document in its SAP Library structure
You can use the DBA Planning Calendar to automate the functions of the SAP DB database administration in the CCMS. You can schedule, perform, and check database administration actions.
You can use the DBA Planning Calendar for almost all regular database administration actions.
The database actions are automatically executed at the time you specify. You must therefore make sure in advance that the required resources will be available at the time of execution. You can schedule actions periodically (in weeks). This reduces the scheduling work needed for periodic actions.
Prerequisite
Procedure
...
       1.      In the user menu, choose Database: Operation ® Local DBA Planning Calendar (transaction DB13).
       2.      Choose a suitable concept for scheduling the following database activities:
Data backups, log backups, updates of SQL optimize statistics, database structure checks (see Scheduling Concept).
       3.      Create any backup media that you need.
       4.      Use the existing action patterns to schedule your database activities (see Action Pattern).
       5.      If you have not already done so by using the action pattern, schedule your data backups (see Scheduling a Data Backup).
       6.      Activate the automatic log backup (see Activating Automatic Log Backups).
If necessary, schedule an interactive log backup (see Scheduling a Log Backup).
       7.      If you have not already done so by using the action pattern, schedule the update of optimizer statistics (see Scheduling an Update of the SQL Optimizer Statistics).
       8.      If you have not already done so by using the action pattern, schedule the checks of the database structures (see Scheduling Database Checks).
       9.      If necessary, make changes to your scheduled activities or start times (see Changing or Deleting an Action and Adding an Action).
   10.      Check the DBA Planning Calendar daily to see whether your scheduled activities have been performed correctly.
Start the DBA Planning Calendar and check that the actions scheduled in the past were executed successfully.
Use the following logs and displays:
Action log, background job logs, DBA action logs, and recovery report in the display of the DBA action logs (see Result of an Action and DBA Action Logs).
If any action did not run successfully, analyze the problem, and repeat the action if necessary (see Troubleshooting).
   11.      In the DBA Planning Calendar, check whether the backup actions that are scheduled for the next few days can be performed correctly.
Before a scheduled backup action is due to start, make sure that the volumes have been inserted and are ready to run. You can display the volumes chosen for a backup action by selecting the relevant backup in the DBA Planning Calendar, and choosing Parameters.

 


 

Procedure documentation Backup Media Locate the document in its SAP Library structure

You can display and configure the backup media.

Prerequisite

Prerequisites

Procedure

·        User menu Configuration
In the user menu, choose Database: Monitoring
® Database Assistant (transaction DB50).
Choose Configuration ® Backup Media.

·        DBA Planning Calendar
Open the DBA Planning Calendar (transaction DB13 or DB13C).

Choose Backup Media.

Choose Edit ® Media Group or Edit ® Create Medium, and create a group of parallel backup media or a single backup medium.
Choose Edit ® Properties when you want to change the specifications of a backup medium.

External Backup Tool

NetWorker; TSM or Backint
For information on the configuration of external backup tools, see External Backup Tools: SAP DB.

Name

Name of the backup medium or group of parallel backup media
Follow the naming conventions for backup media.

Device/File

Specify the location of the backup.

If you use files and pipes, we recommend that you specify the absolute path of the backup medium.
UNIX: If you back up to a tape, you must communicate with the device driver correctly. Use a rewind tape for data backups.
Windows NT/Windows 2000: The system sets the device driver automatically.

Media Type

Select a backup media type:

File: If you back up the log area to a file, version files are generated automatically.

Tape: You cannot make log backups to tape.

Pipe: Always specify Pipe if you are using an external backup tool.

Backup Type

Select a backup type:
Complete (Data): Complete data backup
Incremental (Pages): Incremental data backup
Log: Interactive log backup
AutoLog: Automatic log backup

Size (KB)

Size of the backup medium

Can Overwrite

Select Can Overwrite if you want to use the overwrite mode for the backup medium.

Block Size (Pages)

Select Block Size if you want to make backups in blocks of eight pages You can specify another block size, if you want.
If you do not select Block Size, then the value of the database parameter BACKUP_BLOCK_CNT is used.

Autoloader

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

OS Command

When you back up to tape, you can specify operating system commands.

 


 

Background documentation Data Backup Locate the document in its SAP Library structure
A data backup saves the contents of the data volumes, and the database parameter values needed for restores.
For the SAP DB database system, we differentiate between the following types of data backup:
·        Complete data backup
·        Incremental data backup
You can perform complete and incremental data backups in the operational mode ONLINE or ADMIN. When doing so, you can back up to a group of parallel backup media. Data backups are always consistent in themselves.
Procedure
Use the Database Manager or, in SAP systems, the DBA Planning Calendar to perform the backups.
Database Manager GUI: SAP DB 7.4, Section Backup Processes
Database Manager CLI: SAP DB 7.4, Commands for Backing Up and Archiving
Database Administration in CCMS: SAP DB OLTP, DBA Planning Calendar
Note
To restore a database instance, you may also need log backups in addition to a data backup.
See also: Backing Up

 Complete Data Backup Locate the document in its SAP Library structure

In a complete data backup, all the pages of the data volumes are backed up to the backup medium you specified.

 Incremental Data Backup Locate the document in its SAP Library structure

In an incremental data backup, all the pages of the data volumes changed since the last complete data backup are backed up to the backup medium you specified

Background documentation Scheduling Concept Locate the document in its SAP Library structure

To ensure the secure operation of your database system, you have to create a scheduling concept for the following database activities:

·        Data backups

·        Log backups

·        Updating statistics of the SQL Optimizer

·        Checking the Database Structures

You can schedule, start, and monitor these activities with the DBA Planning Calendar. You can use external backup tools to increase the speed of the backup.

Data Backups

Note that in the case of a recovery, the more up-to-date that the last backup is, the fewer log entries have to be reloaded. Therefore, perform data backups as often as possible.

·        Perform at least one complete data backup (complete data backup) every week (at the weekend, if possible).

·        On each day that the database is productive, start an incremental data backup.

Caution

If a complete data backup is active you cannot start an incremental data backup.

You can perform data backups in parallel to increase the speed of each backup.

Follow the procedure described in Scheduling a Data Backup.

Log Backups

In production systems, make sure that your log settings include the following: hardware-based mirroring of the log area, the log area can be overwritten only once it has been backed up, and redo log management must always be activated. Perform log backups regularly.

·        Automatic Log Backup

The automatic log backup (autosave log mechanism) must always be activated (see Activating the Automatic Log Backup). Complete and incremental data backups are also possible while the automatic log backup is activated.

Check regularly that automatic log backups are activated. To do this, see the Log Area State in the DBA action log display.

·        Interactive Log Backup

If automatic log backups are deactivated, you have to check regularly that there is enough memory space is available in the log area (see Checking the Available Log Memory Space). If no new log entries can be written due to lack of memory space in the log area, the database system shuts down. If necessary, save the log area immediately by starting an interactive log backup (see Scheduling a Log Backup).

·        Archiving the Version Files

Regularly archive the version files that are written during a log backup on a medium of your choice. After these files have been archived successfully, you can delete the version files that were written during the log backup. This ensures that there is always enough space in the directory for the version files.

If you use an external backup tool, you can automate the process for archiving version files. To do this, proceed as described in Archiving the Version Files of the Log Area.

You cannot schedule the archiving of the version files in the DBA Planning Calendar.

Note

Make sure that tapes that contain data or log backups are not overwritten the next time that you perform a backup. By keeping the last four backup generations, for example, you still have the option of using an older backup if an error occurs on a particular medium.

Updating the SQL Optimizer Statistics

Execute the function create new optimizer/space statistics once after an installation, upgrade, or database migration.

Subsequently, you need to update the statistics only once a week (if possible at the weekend). To do this, use the functions check optimizer statistics and refresh optimizer/space statistics (Scheduling Updates for SQL Optimizer Statistics).

Database Structure Checks

You must check the database structures at the latest before the backup media in a backup cycle are overwritten again. The following recommendations are based on a backup cycle of 4 weeks.

Every four weeks (if possible on a weekend), check the database structures for all database objects (tables and indices). To do this, use the function check database structure (all objects). This structure check may take some time, depending on the size of your dataset.

Alternatively, or additionally, you can check the database structures for all tables. To do this, use the function check database structure (only tables). Indices contain redundant information and can be restored after errors. Therefore, you do not need to check their structures as regularly.

To schedule database structure checks, proceed as described in Scheduling a Database Structure Check.

You can check structures for a single table by means of the user menu Tables/Views.

Result

Check regularly whether the scheduling concept meets your security requirements for the database system. To do this, you can use the option of generating a recovery report (display in DBA action logs).


抱歉!评论已关闭.