You are on page 1of 1

3/8/2015

sapdatabase

DB REFRESH STEPS IN SAP


7:50 AM

SAPDAT ABASE V

1 COMMENT

PROCEDURE FOR DB REFRESH:


1) Take full offline backup of database using BRTOOLS/DB13.
Brbackup u p init<sid>.sap d disk t offline m all
2) Generate the control file
SQL> alter database backup controlfile to trace;
Get the trace file from user trace directory and modify the file as following
Rename the file to control.sql.
Remove all the content above the line STARTUP NOMOUNT and belowCHARACTER SET URF8;
Replace NORESETLOGS with RESETLOGS.
Replace ARCHIVELOG with NOARCHIVELOG.
Replace S_sid with T_sid.
3) Change the S_sid with T_sid in b***.afd backup log file.
4) Change the S_sid with T_sid in the first file of backup folder and rename to target sid.
5) Restore the database using the command
Brrestore u 0b b***.afd -d disk k yes -m all
6) Login to database start the database(startup nomount).
7) Run @contro.sql file.
SQL>select status from v$instance; it is in mounted state.
SQL>alter database open resetlogs; now it goes to open status.
SQL> select username from dba_users;
8) Now copy ORADBUSR.SQL file from installation folder copy to sap backup directory and run.
SQL> @ORADBUSR.SQL
Enter value for 1: schema owner ID SAPSR3
2: file system NT
3: host name
4: SAP SID
Now again check the users
SQL>select username from dba_users;
Now you can see target system users only. Remove the source system users.
9) Drop user
OPS$HOSTNAME\SIDADM cascade.
10) Now provide the permission to the target system users.
SQL> grant connect sapdba to OPS$Hostname/SIDADM;SAPSERVICESID;
SQL>grant dba to OPS$Hostname/SIDADM;SAPSERVICESID;
11) Now start the SAP system and is working or not.

data:text/html;charset=utf-8,%3Ch3%20class%3D%22post-title%20entry-title%22%20style%3D%22color%3A%20rgb(74%2C%20118%2C%20189)%3B

1/1

You might also like