You are on page 1of 8

-1-

ONLINE DATABASE REFRESH


(I)

Prerequisites in Target System.

1. Ensure the successful Backup of target system.


2. If needed, export user-using transaction SCC8, so that we can import it after refresh using
transaction SCC7.
3. Also note the Background Jobs (SM37), Spool settings (SPAD), RFC destinations (SM59), and
ALE settings (SALE), Instances and Operation Modes (RZ04)(only if needed).
RFC Export
Goto SE01, create transport request (Transport of Copies)

R3TR

TABU

RFCATTRIB

R3TR

TABU

RFCDES

R3TR

TABU

RFCDOC

R3TR

TABU

RFCSYSACL

*
*
*
*

================
SE09 --> Select Modifiable --> Click on Create ---> Transport of Copies --> OK --> Put Short
Description --> OK

Double click in the created request

Now Put
Program ID : R3TR
Object Type : TABU
Object Name : RFCDES (Press Enter)

Double Clieck on RFCDES --> put * in table keys --> Save

320183189.odt

-2-

Finally Release the request.

4. Note the system modification options in SE06 and SCC4 and saved them .So after refresh just
follow the screen shots and change the options accordingly own

(II) Procedures in Source system.


1. Log into Source Server as <SID>adm.
2. Take <Drive>:\oracle\ora92\database\init<SID>.sap and adjust the following parameters
which describes the back up strategy.

backup_mode = all
backup_type = online
backup_dev_type = disk/tape
backup_root_dir = <Drive>:\oracle\<SID>\sapbackup
compress = yes/no

3.After setting the above parameters you can go for online backup using anyone of the following
tools:

sapdba (<Drive>:\usr\sap\<SID>\SYS\exe\run).
brbackup (in command prompt).
DB13 transaction (in sapgui).

4.Take transaction DB12 and Click on the Overview of Database Backups button and take note
of the exact start time of the Source Systems online backup.
Date: __________________
Time: __________________
5.Take transaction DB12 and Click on the Overview of redo log files button. Take note of the ID
number (leftmost column) of the first archive log previous to the start of the Source Systems
online backup. This will be the starting point for restoring the archive logs. Note the log number,
date and time of the first archive log to be restored here:
Archive Log: ______________________
Date: ____________________
Time: ____________________

320183189.odt

-36. Verify the backup is successfully done in DB12.


7. Create Control file as describe below:

Take the command prompt and enter sqlplus.


Type sys@<service> as sysdba to access database as sys user and enter password.
Type alter database backup controlfile to trace; and exit.
Above command will generate a .trc file in
<Drive>:\oracle\<SID>\saptrance\usertrace directory.
Open the .trc file, copy the text from CREATE CONTROLFILE until the ; and paste
it in to new text file and name it as controlfile.sql.
Open the controlfile.sql file and replace the entire source <SID> to target <SID> and Edit
the REUSE database command with the SET database command, also change
NORESETLOGS to RESETLOGS and save it

8. Take transaction DB12 and Click on the Overview of redo log files button. Take note of the ID
number (leftmost column) of the first archive log immediately after creating the control file. This
will be the stopping point for restoring the archive logs. Note the log number, date and time of
the first archive log to be restored here:
Archive Log: ______________________
Date: ____________________
Time: ____________________

(III) Procedures in Target system.


1. Log into Target Server as <SID>adm.
2. Copy the controlfile.sql from source system to target system.
3. Also copy the generated backup file from the source system to target system.
(<Drive>:\oracle\<SID>\sapbackup).
4. Rename the source <SID> with target <SID> in the copied backup files and folder.
5. Open the two .and files and replace the entire source <SID> with target <SID>
6. Also replace the path of the source backup directory with the target backup directory in the
.and file, if the directories are in different locations.
7. Shutdown the target server instance.
8. Take <Drive>:\oracle\ora92\database\init<SID>.sap and adjust the following parameters
which describes the back up strategy.

320183189.odt

-4-

backup_mode = all
restore_mode = all
backup_type = online
backup_dev_type = disk/tape
backup_root_dir = <Drive>:\oracle\<SID>\sapbackup
compress = yes/no

9. After setting the above parameters you can go for restore using anyone of the following tools:

sapdba (<Drive>:\usr\sap\<SID>\SYS\exe\run).
brrestore (in command prompt).

10. Wait for the successful restore.


11. For applying control files to the restored database, proceed as follows:

Take the command prompt and enter sqlplus.


Type sys@<service> as sysdba to access database as sys user and enter password.
Shutdown the database using shutdown immediate command.
Type startup nomount to start database in nomount mode.
Enter the command @<path and name of the copied control file>.
After displaying statement processed, type the command alter database open resetlogs;
for opening the database with resetlogs

.
12. If recovery is need for opening database,
Copy the redo logs that we noted in steps II (5) to II (8) from the source
<Drive>:\oracle\<SID>\saparch to target <Drive>:\oracle\<SID>\saparch.
Then enter the command recover database using backup controlfile until cancel for
recovering database.
13. Shutdown the database.

(IV) Post Processes in Target system.


1. Creating OPS$, etc, (if needed)

Take the command prompt and enter sqlplus.


Type sys@<service> as sysdba to access database as sys user and enter password.
Startup the database using startup commands.
Enter:
splplus>Create user 'OPS$<name of domain>\<SID>adm' identified by <password>
default tablespace psapuser1d temporary tablespace psaptemp;
splplus>Grant dba, connect, resource to 'OPS$<Domain>\<SID>adm' with admin
option;

320183189.odt

-5splplus>Grant connect to <name of oracle sap user> identified by sap;


splplus>commit
Note: Check the service sap<sid>_<instance number>. If this service runs the SAPServiceSID
then you also need to create this user in Oracle the same way as you did for <SID>adm.
3. In the profile files change the background processes to 0 in instance profile (this is to make sure
that no background jobs start running after starting sap)
4. If the environment variable dbs_ora_schema is not set to the owner of the tables, the SAP
system should work with fresh 4.7 installations.
5. Start sap
6. Install the sap license.

Check the existence of license by entering the command saplicense show in command

prompt.
Delete the current license (if exist) by executing the command: saplicense delete.
Install the license using the command saplicense install and enter the require
information.

7. Logon to SAP and Check all jobs for the past 5 days for released, ready, and active.

Take Edit menu --> Select All. Then go thru and unselect the eu*, sap*, oh and collector*
jobs. Then select job, released->scheduled
8. Stop sap and Change the number of background work processes to same as before
9. Start sap and Execute the transaction SICK. Also ensure the absence of errors in this
transaction.
10. Check Background Processing:

Take Transaction SM65


From menu choose Goto -> Additional tests
Select all, and then press Execute and Resolve issues if any.
11. Post Installation Processing:

Execute transaction SE06


Choose Database copy or migration
Choose Post Installation Processing
Do you want to reinstall?
Change originals from?

Yes
No

320183189.odt

-6Delete TMS configuration?


Change and transport system not configured
Do you want to delete old versions of transport routes?

Yes
Ok
Yes

12. Open System for Changes:


Use transactions SE06 and SCC4 to open system for changes.
Check sapnote 1532825 for TMS error , if any
13. Update TMS Config - Part 1:

Login to client 000 as SAP* user, Then take the transaction STMS and press save
Take Overview -> transport routes -> Config-> adjust with controller -> Click yes.
14. Update TMS Config - Part 2:

Login to the client 000 as SAP* user of the Transport Domain Controller and Go to
transaction STMS.

Take Overview->Systems
Go to Extras menu and choose Distribute TMS Configuration
15. Import User Information:
Before proceeding you need to open the client for changes. You cannot import into
production client.
Note: We dont need to do it at the OS level. We need to do it from SAP just like any other regular
transport request.
16. Run Post-Client Import Processing:

Use transaction SCC7.

Schedule job in background.

17. Remove TemSe Objects:


Go to Transaction SE14 and Enter table TST03 and Press Enter.
Select Radio Button for: Direct
Select Radio Button for: Delete Data (to avoid archiving the data)
Click on Activate and Adjust Database and Confirm.
Repeat the same for TST01 table.

18. Remove Obsolete Spool Objects:

Run transaction SPAD and Select Administration menu

320183189.odt

-7 Choose Check consistency (this can take a long time, and you can do other steps while
waiting).

Click on Delete all button.


19. Delete Batch Logs:

Run transaction SE38 and Run Program RSBTCDEL


Selection:
Job name
User name
Older than (days)
Delete with forced mode
Leave all other options as default
Execute in background.

*
*
0
X

20. Maintain Instances and Operation Modes:

Go to transaction RZ04 and Click Instances/Operation Modes button.


Select Instance(s) for Source System(s) and Go to Instance menu and choose Delete Entry
Do this for each Production instance and Click Save button.
Create a new instance by going to the Instance menu and choosing Create new instance
Enter appropriate information and Save and Exit.

21. Delete unnecessary profiles:


To delete all system profiles after a system refresh, use SE14 to drop the data from tables TPFHT
and TPFET.
Go to Transaction SE14 and Enter table TPFHT and Press Enter.
Select Radio Button for: Direct
Select Radio Button for: Delete Data (to avoid archiving the data)
Click on Activate and Adjust Database and Confirm
Repeat for table TPFET.

22. Import Active Profiles:

Go to transaction RZ10 and Use menu choices Utilities->Import Profiles->Of Active


Servers
23. Delete old stats and DB13 info:
To delete all old stats and DB13 entries after a system refresh, use SE14 to drop the data from
tables.

Go to Transaction SE14 and Enter table MONI and Press Enter.

320183189.odt

-8 Select Radio Button for: Direct


Select Radio Button for: Delete Data (to avoid archiving the data)
Click on Activate and Adjust Database and Confirm.
Repeat for tables PAHI, OSMON, DBSNP, SDBAH, SDBAD, SDBAP, and SDBAR.

24. perform BW relateed activities ( rfc conne3ctions,user replicatio etc)

25. Check temp tablespace and files

(V) References
SAP note number: 147243, 50088, 8179, 534765, 246

http://www.sap-img.com/basis/system-copy.htm
END

320183189.odt

You might also like