This section tells you how to fix a crash during an online backup with BRBACKUP.
During an online backup, BRBACKUP sets tablespaces into backup mode to enable proper recovery if a data file from an online backup needs to be restored. After an online backup BRBACKUP turns off backup mode for all tablespaces.
Therefore, if BRBACKUP crashes, one or more tablespaces remain in backup mode. Also, no further backups can start because BRBACKUP sets a lock at the start of the failed backup.
An online backup crash means that:
Distinguish between the following cases, which each require a different procedure:
· BRBACKUP failure
The database and the server remain running but BRBACKUP fails. The following is true:
¡ The database cannot be shut down to a consistent state. Only shutdown abort is possible, although we strongly recommend you not to perform a shutdown abort.
Do not shut down the database with the command option shutdown abort.
The result of this is that the next database startup does not work and you need to perform additional actions such as a media recovery.
¡ Any other backup that you start with BRBACKUP can fail.
You can check the backup mode of a tablespace with either of the following commands:
¡ brconnect -f check:
BRCONNECT displays the following warning if a tablespace is in backup mode:
WARNING, type: TABLESPACE_IN_BACKUP, object: PSAPT00EX.
¡ brspace –c force -f dbshow -t tslist:
Check the column Back to see if any tablespace is in backup mode.
· Database server or host failure
The database server or the host running the database fails during a backup with BRBACKUP.
A normal database startup is not possible and you see the following error message when starting the database:
...
SQL> ORACLE instance started.
Total System Global Area 48307140 bytes
Fixed Size 453572 bytes
Variable Size 41943040 bytes
Database Buffers 5734400 bytes
Redo Buffers 176128 bytes
Database mounted.
ORA-01113: file 5 needs media recovery
ORA-01110: data file 5: ’D:\ORACLE\T00\SAPDATA3\T00_1\T00.DATA1’
...
You can solve this in either of the following ways:
¡ With SQLPLUS to start up the database into mount state from where you can use the ALTER DATABASEcommand. However, you must only use this method if no data file has been restored.
This solution is recommended.
¡ With recovery using BRRECOVER. However, this can take a long time, depending on the database activity and the size of the tablespace in backup mode.
This solution is not recommended.
...
1. Check if BRBACKUP is running using the ps command on UNIX or the task manager on Windows.
If BRBACKUP is running, do not continue with the procedure.
2. Start BRTOOLS or BRGUI and choose Space management → Alter tablespace → Reset backup status.
For more information, see Altering a Tablespace with BR*Tools.
3. Choose continue twice to get a list of all tablespaces in backup mode.
4. Select all tablespaces and choose Continue to turn the backup mode off.
5. Delete the lock file:
¡ UNIX: $SAPDATA_HOME/sapbackup/.lock.brb
¡ Windows: $SAPBACKUP%\.lock.brb
6. Perform a backup with BRBACKUP to check if everything is OK.
You can solve this problem in the following ways:
· To avoid a long recovery, use SQLPLUS:
a. Start SQLPLUS:
sqlplus “/as sysdba“
b. Start up the database to mount state:
SQL> startup mount
c. Execute the command:
SQL> alter database end backup
Only use alter database end backup if no data file has been restored.
Never use this command after having restored a data file because it might leave your database in an inconsistent and unusable state.
d. Open the database for normal user access:
SQL> alter database open
For more information, see Database Recovery with SQLPLUS.
· If no other problem has occurred and the above SQLPLUS method is not possible, perform a step-by recovery with the following BRRECOVER command:
brrecover –t complete
Continue with the step-by-step recovery as prompted by BRRECOVER.
For more information, see Complete Database Recovery with BR*Tools.