• No results found

SAP R/3 Architecture

Restore Problems

SAP R/3 Architecture

Depending on the backup mode, there are two possible backup scenarios (backint mode or RMAN mode) that can be used.

Backup Flow Using Backint

The backup session undergoes the following stages if the backup is performed in backint mode. See Figure 2-2 for details.

NOTE It is not possible to perform an incremental backup in backint mode.

Figure 2-2 SAP R/3 Architecture: Backint Mode

Legend

BSM Data Protector Backup Session Manager RSM Data Protector Restore Session Manager

Oracle Database

RMA Data Protector Restore Media Agent GUI/CLI Data Protector User Interface

1. The backup session can be started using the Data Protector GUI, or interactively using the SAP R/3 utilities.

If the backup session is started using the Data Protector User Interface (or using the scheduler), then the Backup Session Manager (BSM) is started. The BSM then reads the appropriate Data Protector backup specification, checks if the devices are available, and starts the omnisap.exe program on the SAP R/3 Database Server.

The omnisap.exe program exports the appropriate environment variables and starts either the BRBACKUP or BRARCHIVE utilities.

These utilities then initiate the first backint command to back up the Oracle Target Database’s data files and the control files

(BRBACKUP) or to back up archived redo log files (BRARCHIVE).

If the backup is started interactively using the SAPDBA program, then the BRBACKUP or BRARCHIVE utilities are started directly.

2. BRBACKUP does the following:

• Automatically changes the state of the Oracle Target Database (opened or closed), according to the backup type (online or offline).

• Switches the Oracle Target Database to the ARCHIVELOG mode before the backup.

The archived redo log files are written to the archiving directory by Oracle and are backed up later using BRARCHIVE.

• Writes the BRBACKUP log during the backup session, with information about the backup file and the backup ID. These logs must be available in order to determine the location of the database files and archived redo log files during restores.

• Sets the tablespace mode (BEGIN / END BACKUP) in the case of online backup using backint.

In this way, the SAP R/3 puts the tablespace in backup mode just before it is backed up, and puts the tablespace back in normal mode immediately after the backup is completed. The tablespaces are therefore in backup mode for a minimal amount of time.

3. The backint program obtains the SAP R/3 configuration from the Cell Manager, divides the files for backup into subsets (provided that the specified concurrency is greater than 1) and starts the sapback program for each subset. Each sapback process connects to the BSM, which then starts General Media Agents on the corresponding client systems and establishes a connection between the sapback processes and General Media Agents.

Data transfer can begin at this point. The sapback processes read data from disks and send it to General Media Agents. The first backint program stops as soon as all sapback processes have finished and control is returned to the parent process, either the BRBACKUP or BRARCHIVE utility.

The second backint command is initiated by either the BRBACKUP or BRARCHIVE command. This command attempts to back up the SAP R/3 log files and parameter files (in the case of BRBACKUP), or the archived redo logs (in the case of BRARCHIVE) that have been created since the first backint command.

If new archived redo logs have been created, they are backed up and another backint command is started. Otherwise, the SAP R/3 log files and the parameter files are backed up, and the second backint program is started using BRBACKUP.

Therefore, more than two backint commands may be initiated by BRARCHIVE, while there are only two backint commands initiated by BRBACKUP.

If archive logs were backed up, omnisap creates a copy of the control files either in the directory defined by the SAPBACKUP variable, or in /var/opt/omni/tmp (on UNIX) or

<Data_Protector_home>\tmp (on Windows) if the variable is not set. The control file is then backed up by the backint utility using sapbackup.

NOTE The total number of sapback processes started in one session using Data Protector is limited to 256.

4. General Media Agents finish transferring data when all the sapback processes are complete. When all of the General Media Agents have

(SmWaitForNewClient omnirc global variable) and completes the backup session, as long as no backint is started within this time frame.

Backup Flow Using Recovery Manager

A backup session using RMAN mode differs from a backup session in backint mode in step 3. See Figure 2-3 on page 153 for details.

BRBACKUP starts RMAN, which then connects to the Data Protector Database Library via the Oracle Server processes. The Database Library provides a connection to the Data Protector BSM, which starts General Media Agents and establishes a connection between the Oracle Server and General Media Agents.

The data transfer begins at this point. The Oracle Server sends data to General Media Agents, which then write the data to the media.

Once the Oracle Target Database’s data files have been written to the media, the respective Oracle Server processes are completed, and so, subsequently, is RMAN. The backup control is now returned to BRBACKUP, which starts the first backint command to back up the Oracle Target Database’s control file and the SAP R/3 log files. Archive logs are backed up in the same manner as in backint mode.

Figure 2-3 SAP R/3 Architecture: RMAN Mode

Legend

BSM Data Protector Backup Session Manager BMA Data Protector Backup General Media Agent GUI/CLI Data Protector User Interface

Restore Flow Using Backint

SAP R/3 restore can be initiated using Data Protector, or interactively using the SAP R/3 utilities. However, only a standard filesystem restore is performed using Data Protector.

The restore session proceeds according to the following stages if the restore is performed in backint mode.

Control files, Profiles,

2. The BRRESTORE first checks whether the required free disk space is available to allow the files to be restored. It then starts the first backint command to restore the Oracle Target Database’s data files.

The backint command reads the SAP R/3 configuration file, divides the files for restore into subsets (provided that the specified

concurrency is greater than 1) and starts the saprest process for each subset.

The first saprest process starts the Data Protector Restore Session Manager (RSM), while the subsequent saprest processes connect to the same RSM. In addition, the saprest process checks whether the specified objects have been backed up.

The RSM checks the availability of the restore devices, starts General Media Agents and establishes a connection between the saprest processes and General Media Agents. Data transfer begins at this stage. Data is sent from the media to the target disks. The General Media Agent finishes as soon as all saprest processes connected to it are completed.

3. When all the General Media Agents have finished, the RSM waits for a timeout (SmWaitForNewClient global variable) and completes the restore session, if no backint is started within this time frame.

Restore Flow Using Recovery Manager

A restore session using RMAN differs from a restore session using the backint mode in the step 2 as follows:

BRRESTORE starts RMAN in order to restore the Oracle Target Database data files. RMAN then connects to the Data Protector Database Library via the Oracle Server processes.