sapdbrefresh

1
DB REFRESH STEPS IN SAP 7:50 AM SAPDATABASE 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.

Upload: asimalamp

Post on 04-Oct-2015

219 views

Category:

Documents


0 download

DESCRIPTION

SAP DB refresh

TRANSCRIPT

  • 3/8/2015 sapdatabase

    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

    DB REFRESH STEPS IN SAP

    7:50 AM SAPDATABASE V 1 COMMENT

    PROCEDURE FOR DB REFRESH:

    1) Take full offline backup of database using BRTOOLS/DB13.

    Brbackup u p init.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.

    http://www.sapdatabase.net/2012/02/procedure-of-db-refresh-in-sap.html#comment-formhttp://www.sapdatabase.net/2012/02/procedure-of-db-refresh-in-sap.html