Online Database Refresh
-
Upload
jithin-kuriakose -
Category
Documents
-
view
215 -
download
0
Transcript of Online Database Refresh
-
8/15/2019 Online Database Refresh
1/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
transactionSCC7.
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
-
8/15/2019 Online Database Refresh
2/8
- 2 -
Finally Release the request.
4.Note the system modification options inSE06 andSCC4 and saved them .So after refresh justfollow the screen shots and change the options accordingly –own
(II) Procedures in Source system.
1. Log into Source Server as adm.
2. Take:\oracle\ora92\database\init.sap and adjust the following parameter’s
which describes the back up strategy.
backup_mode = all
backup_type = online backup_dev_type = disk/tape
backup_root_dir = :\oracle\\sapbackup
compress = yes/no
3.After setting the above parameters you can go for online backup using anyone of the following
tools:
sapdba (:\usr\sap\\SYS\exe\run).
brbackup (in command prompt).
DB13 transaction (in sapgui).
4.Take transactionDB12and Click on theOverview of Database Backups button and take note
of the exact start time of the Source System’s online backup.
Date: __________________
Time: __________________
5.Take transactionDB12and Click on theOverview 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 System’s
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
-
8/15/2019 Online Database Refresh
3/8
- 3 -
6. Verify the backup is successfully done inDB12.
7. Create Control file as describe below:
Take the command prompt and entersqlplus.
Typesys@ as sysdba to access database as sys user and enter password. Typealter database backup controlfile to trace; and exit.
Above command will generate a.trc file in
:\oracle\\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 ascontrolfile.sql.
Open thecontrolfile.sql file and replace the entire source to target and Edit
theREUSEdatabase command with theSETdatabase command, also change
NORESETLOGS toRESETLOGS and save it
8. Take transactionDB12and Click on theOverview of redo log files button. Take note of the ID
number (leftmost column) of the first archive log immediately after creating the control file. Thiswill 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 adm.
2. Copy thecontrolfile.sql from source system to target system.
3. Also copy the generated backup file from the source system to target system.
(:\oracle\\sapbackup).
4. Rename the source with target in the copied backup files and folder.
5. Open the two.andfiles and replace the entire source with target
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:\oracle\ora92\database\init.sap and adjust the following parameter’s
which describes the back up strategy.
320183189.odt
-
8/15/2019 Online Database Refresh
4/8
- 4 -
backup_mode = all
restore_mode = all
backup_type = online
backup_dev_type = disk/tape
backup_root_dir = :\oracle\\sapbackup compress = yes/no
9. After setting the above parameters you can go for restore using anyone of the following tools:
sapdba (:\usr\sap\\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 entersqlplus.
Typesys@ 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@.
After displaying “statement processed”,type the commandalter 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
:\oracle\\saparch to target :\oracle\\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 entersqlplus.
Typesys@ as sysdba to access database as sys user and enter password.
Startup the database using “startup” commands.
Enter:
splplus>Create user 'OPS$\adm' identified by
default tablespace psapuser1d temporary tablespace psaptemp;
splplus>Grant dba, connect, resource to 'OPS$\adm' with admin
option;
320183189.odt
-
8/15/2019 Online Database Refresh
5/8
- 5 -
splplus>Grant connect to identified by sap;
splplus>commit
Note: Check the service sap_. If this service runs the SAPServiceSID
then you also need to create this user in Oracle the same way as you did for adm.
3. In the profile files change the background processes to0 in instance profile (this is to make sure
that no background jobs start running after starting sap)
4.If the environment variabledbs_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 commandsaplicense –showin commandprompt.
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.
TakeEditmenu --> SelectAll. 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 transactionSICK. Also ensure the absence of errors in this
transaction.
10. Check Background Processing:
Take TransactionSM65
From menu chooseGoto -> Additional tests
Selectall, and then pressExecute and Resolve issues if any.
11. Post Installation Processing:
Execute transactionSE06
ChooseDatabase copy or migration
ChoosePost Installation Processing
Do you want to reinstall? Yes
Change originals from? No
320183189.odt
-
8/15/2019 Online Database Refresh
6/8
- 6 -
Delete TMS configuration? Yes
Change and transport system not configured Ok
Do you want to delete old versions of transport routes? Yes
12. Open System for Changes:
Use transactionsSE06 andSCC4 to open system for changes.
Check sapnote 1532825 for TMS error , if any
13. Update TMS Config - Part 1:
Login to client000 asSAP* user, Then take the transactionSTMSand press save
TakeOverview -> transport routes -> Config-> adjust with controller -> Click yes.
14. Update TMS Config - Part 2:
Login to the client000 asSAP* user of the Transport Domain Controller and Go to
transactionSTMS.
TakeOverview->Systems
Go toExtras menu and chooseDistribute TMS Configuration
15. Import User Information:
Before proceeding you need to open the client for changes. You cannot import into
production client.
Note: We don’t 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 transactionSCC7.
Schedule job in background.
17. Remove TemSe Objects:
Go to TransactionSE14and Enter tableTST03and Press Enter.
Select Radio Button for:Direct
Select Radio Button for:Delete Data (to avoid archiving the data) Click onActivate and Adjust Database andConfirm.
Repeat the same forTST01 table.
18. Remove Obsolete Spool Objects:
Run transactionSPAD and SelectAdministration menu
320183189.odt
-
8/15/2019 Online Database Refresh
7/8
- 7 -
ChooseCheck consistency (this can take a long time, and you can do other steps while
waiting).
Click onDelete all button.
19. Delete Batch Logs:
Run transactionSE38and Run ProgramRSBTCDEL
Selection:
Job name *
User name *
Older than (days) 0
Delete with forced mode X
Leave all other options as default
Execute in background.
20. Maintain Instances and Operation Modes:
Go to transactionRZ04 and ClickInstances/Operation Modes button.
Select Instance(s) for Source System(s) and Go toInstance menu and chooseDelete Entry
Do this for each Production instance and ClickSave button.
Create a new instance by going to theInstance menu and choosingCreate new instance
Enter appropriate information andSave and Exit.
21. Delete unnecessary profiles:
To delete all system profiles after a system refresh, useSE14 to drop the data from tablesTPFHT
andTPFET.
Go to TransactionSE14and Enter tableTPFHTand Press Enter.
Select Radio Button for:Direct
Select Radio Button for:Delete Data (to avoid archiving the data)
Click on Activate and Adjust Database andConfirm
Repeat for tableTPFET.
22. Import Active Profiles:
Go to transactionRZ10 and Use menu choicesUtilities->Import Profiles->Of Active
Servers
23. Delete old stats and DB13 info:
To delete all old stats and DB13 entries after a system refresh, useSE14 to drop the data from
tables.
Go to TransactionSE14and Enter tableMONIand Press Enter.
320183189.odt
-
8/15/2019 Online Database Refresh
8/8
- 8 -
Select Radio Button for:Direct
Select Radio Button for:Delete Data (to avoid archiving the data)
Click onActivate and Adjust Database andConfirm.
Repeat for tablesPAHI, OSMON, DBSNP, SDBAH, SDBAD, SDBAP,andSDBAR.
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