on 08-20-2008 7:58 AM
hi experts,
We are on win2003 and orale10g and we do online db13 backup alloline + redo log .now we have to restore this backup on test instance.can anybody guide me the exact steps involved and documentations if availabe.
Are you trying to restore on same SID or different, if it is same SID then, please find the below steps:
Hope the below gives you a full idea
"Steps for Restore and Recovery of
SAP system using Brtools"
1 Check the sapmnt directory, SAP kernel and oracle executables
2 check the sap operating system users (i..e, ora<sid>, <sid>adm) with appropriate user IDs' and group membership. (Note: the Uids' of the SAP operating system users and GIDs' must be same as it was before disaster)
3 Check the Operating System groups (i.e., sapsys, dba, oper) with appropriate Group IDs'
4 Check for the Successful backup taken with brbackup and the tapes related to same
5 Check the init<sid>.sap, especially change the tape_address parameter,
6 check the sap directories used by brtools (/oracle/<SID>/sapbakcup, /oracle/<SID>/saparch, /oracle/<SID>/sapreorg, /oracle/<SID>/sapcheck), if necessary create it with ora<sid> as owner and dba as group
7 Connect the tape drive to the system and insert tapes in to it.
8 Check the Backup in the tape using command "brbackup -I show". This will show the backup date, tape label, etc
9 "Restore the backup logs as well as init<sid>.sap, init<sid>.ora saved while backup using backup ""brrestore -n all_log=<alternate location>""
(Note: this takes much time, since it reads the whole tape. So please be patience and donot cancel this step. Also we cannot restore the database without the detailed log)"
10 The above command will restore all the files like init<sid>.ora, init<sid>.sap, backup detail log, summary log.
11 Replace the existing files with the files restored from the alternate location to the original location
12 Check the mount points and permissions for sapdata<n> folders (i.e., owner - ora<sid>, group - dba, file permissions 755)
13 start the datafiles restoration using command - "brrestore -b <detail log name>.<ext> - m full"
14 Brrestore will create the sub directories as required and as in detail log specified
15 Brrestore will start restoring the datafiles as per detail logs
16 Once the datafiles restoration is completed, it restores Controlfile in to sapbackup folder and copies the controlfile as specified in the detail log
17 Check the control_files parameter in init<sid>.ora file and confirm whether the files are at the correct location. If the controlfiles are at different locations, check the path of all files and change the control_file parameter in init<sid>.ora
18 Mount the database, to do this execute sqlplus "/ as sysdba" and then in the sql prompt type sql script "startup mount"
19 This will mount the database if control files are in correct location as in init<sid>.ora and are not corrupt
20 Restore the archive logs from the archive logs backup taken with brarchive.
21 To Restore, insert the archive log tape in the tape drive
22 Ensure that the tape address parameter tape_address is correct in init<sid>.sap
23 To restore archive logs we have to restore summary as well as detail log of archive log backup
24 To restore the archive log backup log, execute the command - brrestore -n all_logs=<alternate location>. This will restore all logs saved in the backup like init<sid>.sap, init<sid>.ora, summary and detail log
25 Copy the summary and detail log from alternate locaiton to original location i.e., /oracle/<SID>/saparch
26 Execute the sql script recover database using backup controlfile until cancel; in the sql prompt. This command will show the archive log file that will be necessary for recovery of the database.
27 To restore the archive log files, check in detail log file the archive logs saved in the backup. To restore the logs backed in the backup execute, brrestore -a <archive log a>-<archive log b>. This command will restore the archive logs from archive log a to archive log b to default location /oracle/<SID>/oraarch
28 Start applying the archive logs using sql script - recover database using backup controlfile until cancel; This will give the archive log file, check whether we have all the logs along with the file specified
29 Restore the all the archive logs available in the backup. Follow steps 21 to 25
Note: if we had added any datafile to any tablespace. The archive log will be switched from online redo log to offline redo log file (if we use brtools to add or extend datafile). When we try to add this archive log file, then we get an error, ORA-01111: name for data file <id> is unknown - rename to correct file and the correct file name with location will be displayed. But if we have extended the datafile, then applying the archive log of that time will extend the file automatically
To solve this problem , check the alert log file, the below error will be displayed
ORA-01244: unnamed datafile(s) added to controlfile by media recovery
ORA-01110: data file <file id>: '/oracle/<SID>/sapdata<n>/<sid>_<no.,>/<sid>.data<no.,>'
Check the unnamed file in v$datafile table using query "select FILE#, NAME from V$datafile where FILE# = <id>;"
This will show the name of the file as in the controlfile. We have to rename the file and create the physical file; to do this execute "alter database create datafile '/oracle/<SID>/920_64/dbs/UNNAMED00<file id>' as '/oracle/<SID>/sapdata<n>/<sid>_<no.,>/<sid>.data<no.,>';"
Start Applying the archive logs using sql script - recover database using backup controlfile until cancel;
30 Open the database using sql command - "alter database open resetlogs;", this will open the database in read/write mode and reset the archive log number to 0, the archive log generated will be started with number - 1
31 Check the connectivity of the Database with sap using a tool given by SAP i.e., R3trans. Which checks the connectivity to the database. Start the listener - lsnrctl start and execute R3trans -d. The output of the r3trans -d should be 0, else analyze the error and go ahead.
32 If the R3trans tool return code is 0, then start sap.To start sap switch to user <sid>adm (use su - <sid>adm give the password if prompted) and execute startsap. This will start both database if not started and then sap
34 Brbackup doesnot take the backup of the tempfiles in any of the backup. So after opening the database we have to create the temporary datafiles. To add tempfiles execute the sql script : "alter tablespace PSAPTEMP add tempfile '/oracle/<SID>/sapdata<n>/temp_<no.,>/temp.data<no.,>' SIZE 6144M;". This will add a temp file of size 6GB
Hope this helps you
Regards,
Kishore
Edited by: Kishore Soma on Aug 20, 2008 3:02 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.