Database Copy Refresh
Database Copy Refresh
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
Table of Contents
1
GENERAL.................................................................................
1.1
1.2
1.2.1
1.2.2
1.3
1.4
1.5
1.6
1.7
Briefing............................................................................................
Scenarios..........................................................................................
Scenario 1: database copy to another host (default)......................................
Scenario 2: database copy to the same host................................................
Scope...............................................................................................
Planning information............................................................................
References........................................................................................
Document control................................................................................
Legenda...........................................................................................
CHECK LIST.............................................................................
PRE CHECKS............................................................................
3.1
3.2
3.3
3.6
3.7
PRE ACTIONS...........................................................................
4.1
4.2
4.3
4.4
4.5
4.6
4.7
4.8
4.9
4.10
4.11
4.12
4.13
4.14
4.15
4.16
4.16.1
4.16.2
4.17
4.18
3.4
3.5
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
4
o f 8 5Step
4.19
5.1
6.1
6.2
6.17
6.18
7.1
7.1.1
7.1.2
7.2
7.3
7.4
7.5
Step 46.
Step 44.
Step 44.
Step 47.
Step 48.
Step 49.
Step 50.
8.1
8.2
8.3
8.4
8.5
6.3
6.4
6.5
6.6
6.7
6.8
6.9
6.10
6.11
6.12
6.13
6.14
6.15
6.16
8.6
POST ACTIONS..........................................................................
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
9.1
9.2
9.3
9.4
9.5
9.5.1
9.5.2
9.5.3
9.5.4
9.6
9.7
9.8
9.9
9.10
9.11
9.12
9.13
9.14
9.15
9.16
9.17
9.18
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
6
o f 8 5Step
9.38
9.39
9.40
9.41
9.42
9.43
9.44
9.45
Step
Step
Step
Step
Step
Step
10
10.1
11
AFTERCARE.............................................................................
11.1
11.2
11.3
11.4
11.5
11.6
1.1.
2.
2.1.
2.2.
2.3.
2.4.
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
Version History
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
8
of 85
GENERALv
1.1
1.1
1.1
1.1
Briefing
This work instruction describes the refresh (also known as a Database Copy) of a SAP system,
specifically for the customer WML, where the refresh is part of a landscape refresh of the following
SIDs:
WRP WRAR/3
WCP WCACRM
WMP WMA Manual Mobile (dual stack)
WBP WBA BW (dual stack)
WTP WTA Trex
WDP WDAContent Servers (MaxDB)
This document is based on the generic document NLW-SAP-0451 SAP Database Copy Refresh SID
(mainly used for the DSM Oracle landscape) with limited additions, mainly in the post-processing part.
The target SAP system is restored from an offline or online backup from a source SAP system. Detailed
requirements of the target SAP system are specified by the customer via NLF-SAP-2011 SAP Refresh
template.
Scripts will be used to automate parts of the procedure.
Important
This work instruction must be used in combination with the NLF-SAP-2011 SAP
Refresh template.
You will receive this form from the customer.
The form specifies the customer specific settings. These settings override the default
settings of this work instruction (e.g. meaning: which tables need to be exported);
but must be checked for inconsistencies by the analyst.
Details
This work instruction describes the database copy of:
1. OLTP SAP systems (regular R/3),
2. Business Warehouse/Business Intelligence SAP systems, and
3. the ABAP-stack/part of APO SAP systems (read also: Supply Chain Management (SCM)).
For the LiveCache part of APO SAP systems refer to manual NLW-SAP-0834.
For BW/BI SAP systems refer to SAP note 886102 (=System Landscape Copy for NetWeaver BW). This
manual describes the Technical Maintenance steps for BW-scenario B3 (=Copy of a single BW system of
the group), not the functional steps.
For all SAP systems, but most importantly the BW/BI and APO SAP systems, the customer functional
SAP consultants should run transaction BDLS themselves. Main reason is that more than one logical
system name can be in use. The customer functional consultants know exactly which logical system
names are in use and must be converted.
1.2
Scenarios
A SAP system can be described as the presentation layer on the database layer. This means, that a
refresh of a SAP system basically is nothing more than a Database copy.
We can define two different scenarios as described below.
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
When in this workinstruction, there is a difference in execution between the two scenarios, this is
marked with:
Critical!!!
1.2.1
Source
Host
Target
Host
Source
Database
1.2.2
Target
Database
Source
Database
1.3
Target
Database
Scope
Scoping
Data
Customer
ALL
SID(s)
ALL
Operating system
Database
Unix, Linux
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
1Scoping
0 of 85
Data
Application
1.4
1.5
1.6
Planning information
Planning item
Data
3
Meaning Junior under supervision.
References
Reference
Document
Service Description
Procedure
Naming Conventions
Manual LiveCache
Document control
Please submit your contributions, insights and lessons learnt to the document owner.
Only use the latest up to date and approved version from Livelink!
1.7
Legenda
Term
Description
<source_SID>
Example
<target_SID>
e.g. PR2
<target_sid>
e.g. pr2
<target_client>
<SAPnet user>
CC-er
Customer Coordinator
Backup CC-er
puid
personal user id
ora>
adm>
SQL>
OS
Host
Computer system
e.g. S0000264727
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
CHECK LIST
Source SAP system
Source host
10
11
12
13
14
15
16
Action
PRE CHECKS
Copy required refresh scripts from central location
Check that both SAP systems are binary compatible
Check that both SAP systems have the same Oracle database version
Check that both SAP systems have the same file-systems and file-system-size
When applicable; write down
Change-request-ticket
Check target SAP system sizing and if necessary adapt spfile<target_SID>.ora
Check target SAP system transport-system
Check source backup retention period
PRE ACTIONS
Lock users
Customer specific => DSM ALWAYS
Save User master data
Write down
the Transport numbers for client 000 and
each customer client
Save SAP printer definitions
Write down
the Transport number
Save RFC definitions and other customer specified tables
Save SAP license details
Write down
the SAP license details
Save Logical system names for all relevant clients
Write down
the Logical system names for client 000 and
each customer client
Save Operation modes
Write down
a. the Operation modes
b. their settings; meaning the number of
processes per process-type
Save Logon groups and Server groups
Write down
the Logon groups
Write down
the Server groups
Save EDI port definitions
Write down
OK
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
1 2 o f 8the
5
17
18
19
20
21
21
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
44
44
45
46
47
48
49
50
Port definitions
Save Latest transport-number
Write down
the Latest transport-number
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
51
52
53
54
55
56
57
58
59
59
59
59
59
60
61
62
63
64
65
66
67
68
60
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
1 4 o f 8For
5
91
92
93
94
95
96
97
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
3
3.1
PRE CHECKS
Step 1 Check refresh scripts
The following files should be present in directory /oracle/<target_SID>/refresh:
correct_bsl_settings.ksh
create_refresh_links.ksh
delete_cleanup_SID
generate_new_sap_db
get_offline_or_online_bck_redo
rename_files.ksh
user_rights.ksh
If not, check with Rob Kelgtermans how to obtain them.
Because the names of the files above should contain the actual target SID name instead of SID,
these files have to be renamed. This can be done by running the following script:
ora> cd /oracle/<SID>/refresh
ora> ./rename_files.ksh
3.2
Example output:
HP-UX nlxdsm25 B.11.11 U 9000/800 1545520504 unlimited-user license
3.3
Step 3 Check that both SAP systems have the same Oracle database version
The Oracle software versions on the source system and target system must be the same. Check this as
ora-user on unix level with command:
ora> sqlplus "/as sysdba"
Example output:
SQL*Plus: Release 9.2.0.7.0 - Production on Thu Mar 29 09:59:15 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.7.0 - Production
The value of the Oracle compatibility parameter of the source system database should be at least
equal to the Oracle software version on the target system. Check in both SAP systems the file
$ORACLE_HOME/dbs/spfile<target_SID>.ora for the value of the parameter compatible. The value
should correspond to the actual Oracle release. Example, all systems running Oracle 9.2.0.4 should
have this parameter as compatible 9.2.0
ora> cd $ORACLE_HOME/dbs
ora> grep i compatible spfile<target_SID>.ora
ora> grep i compatible spfile<source_SID>.ora
Example output:
compatible = 10.2.0.4
or
compatible = 10.2.0
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
3.4
1
6 o f48 5Check
Step
that both SAP systems have the same file-systems and file-system-size
The size on the $HOME/sapdata* file-systems in total should be at least the same size as that of the
source database backup. Remember that for a restore of data-files to a file-system you need more
space in the file-system than the total size of the combined data-files you are restoring.
ora> cd $HOME
ora> bdf sapdata*
ora> df -k sapdata*
(overview)
(details)
Also check and ensure enough space for the online redologs:
ora> bdf mirrlog*
(must be at least the same size as the source SAP system)
ora> bdf origlog*
(must be at least the same size as the source SAP system)
Important
In case additional disk-space (called LUNs) is needed on the target host, timely a
Change-request-ticket must be created for the responsible OS-team. Normally this
activity will be performed by the Customer Coordinator (shortcut: CC-er)/backup CCer to keep the /oracle/<target_SID>/sapdata*-structure in sync on the entire
transport landscape.
This work instruction assumes that there is a 1:1 match of file-systems and file-system-size on both
source and target systems. Before you take any actions on the target system you must check that this
is true. Please consult your Customer Coordinator (shortcut: CC-er) or the OS-team if in doubt.
Note
3.5
In some cases, file-system(s) have been added to the source SAP system, but are not
yet used. In this case you do not need these file-systems on the target SAP system.
Step 5 Check target SAP system sizing and if necessary adapt spfile<target_SID>.ora
The sizing of the source and target SAP systems can differ vastly. For example, a production system
can be much bigger than a quality assurance or development system. If this is the case, there will be
different database parameters and most likely that there is less system memory on the target SAP
system.
For this reason, check if the system-dependent-parameters specified in file
$ORACLE_HOME/dbs/spfile<target_SID>.ora of the source SAP system differ from the parameters in
the same file on the target SAP system. In case there are differences, write these differences down.
Any differences must be added to file $ORACLE_HOME/dbs/spfile<target_SID>.ora of the target SAP
system (after the database copy) in order for the target SAP system to function properly.
Please check the correct location of the control-files on the target system (go to: offline/online
backup).
The following database parameters are also important:
shared_pool_size
shared_pool_reserved
db_block_buffers
enqueue_resources
compatibility
(must be equal)
3.6
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
In case, field Domain is not visible add it to the System Overview screen in following
way (as of 4.6C):
1. Right-click on one of the headings System, Cat, Short text, Release, Status, Conf.
2. Choose Show... to change the layout.
3. Add column Transport domain.
4. Press button Save layout (F5).
Fill in the layout name
: /<target_SID>/
Fill in a description
: <target_SID> layout
Tick Default setting so that this layout will be used every time STMS is started.
4. In the same screen, double-click on the SID of the target system and check the transport group.
3.7
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
1
8 o fACTIONS
85
PRE
4.1
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
Make sure you have the Test check activated and press the Execute button.
The silimar result like this will appear:
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
20 of 85
Go back and do now the same for the deletion, but now with the Test check deactivated.
Make sure you do this for all concerned logical system names, so both client 000 and client 100, for all
QA systems. You can do multiple selection, but safer is to one by one.
Once the satellite systems are deactivated, user updates such as locking and authorization updates
can be done locally on the satellite system with transaction SU01.
4.2
Export the user master data in sequence starting with client 000. This makes it easer
to import the user master data later on into the correct client.
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
In case no error-messages occur, proceed with the screen below. It is not needed to fill in a
Background server.
6. Schedule job.
Menu: Client copy -> Schedule as background job.
Press button Continue.
7. The following screen will be like this; write down the transport numbers.
Press the Enter key to continue.
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
22 of 85
Do not fill in an output device and spool options, since your goal is to print NOTHING.
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
The transports created for the user master data are released AUTOMATICALLY!
11. After the export is Successfully completed, check the existence of the generated transport with
syntax <target_SID>KT<numbers> in directories:
/usr/sap/<??>trans/data
for the corresponding data file and
/usr/sap/<??>trans/cofiles
for the corresponding cofiles.
4.3
adm> cd /usr/sap/<??>trans/bin
In case no file exists with syntax <target_SID>_exp_printers.ctl create it, otherwise proceed to the
next step.
EXAMPLE
of ctl-file:
########################################
# Export printers
########################################
export
client = 000
file = "/usr/sap/sutrans/bin/data/SUA_printers.dat"
select * from tsp03
select * from tsp03c
Check that the *.dat-file exists, which means that the export was successfull:
adm> cd data
(directory: /usr/sap/<??>trans/bin/data)
adm> ls altr *printers.dat
Important
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
2
f 85
4.4 oMenu:
Make sure you fill in the target SAP system and client (for example
<target_SID>.<CLIENT> ). A filled in target will make the transport transportable,
instead of local!
Make sure that the transport is released, error free and exists on Unix: /usr/sap/<??
>trans/data/ and /usr/sap/<??>trans/cofiles/
4.4
If the target system is a new installation and is only intended to be used temporarily,
the customer does not intend to apply for a permanent license. In this case, the
temporary license must be exported from the target system before the refresh and
re-imported afterwards. The temporary license is stored in table MLICHECK and can
be included in the export-control-file.
EXAMPLE of
ctl-file:
########################################
# RFC/EDI/TBDLS export
########################################
export
client = <client-number>
file = "/usr/sap/<??>trans/bin/data/<target_SID>_tables<client-number>.dat"
select * from <table-name>
and-so-on
Important
When refreshing development SAP systems ensure that you export the contents of
following tables:
- DEVACCESS
(developer users)
- VARI
(program-variants)
- VARID
(program-variants)
- VARIT
(program-variants)
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
VARIS
VRSD
VRSMODISRC
VRSX
VRSX2
VRSX3
(program-variants)
(program-variants)
(program-variants)
(program-variants)
(program-variants)
(program-variants)
Important
When refreshing quality assurance SAP systems AND when using Transport
Management System (TMS) Quality Assurance Approval (see note 397138, transaction
STMS_QA) ensure that you export the contents of following tables:
- TMSQWLF
(QA approval history)
- TMSQNOTES
(QA approval history)
- TMSQNOTESH
(QA approval history)
- TMSQWLH
(QA approval history)
- TMSQWLFH
(QA approval history)
- TMSQWL
(QA approval worklist)
- TMSQLASTWL
(QA approval worklist)
Important
Make sure the following secure store tables are NOT in the configuration file:
- RSECTAB
- RSECACTB
Be aware
adm> cd /usr/sap/<??>trans/bin
Example commands:
adm>
adm>
adm>
adm>
adm>
R3trans
R3trans
R3trans
R3trans
R3trans
-w
-w
-w
-w
-w
MCQ_exp_tables000.log
MCQ_exp_tables600.log
MCQ_exp_tables740.log
MCQ_exp_tables760.log
MCQ_exp_tables777.log
MCQ_exp_tables000.ctl
MCQ_exp_tables600.ctl
MCQ_exp_tables740.ctl
MCQ_exp_tables760.ctl
MCQ_exp_tables777.ctl
4.5
In the newest SAP systems more licenses are necessary for the different parts
(meaning dual stack SAP systems).
Example output:
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
26 of 85
In case there are more than one licenses for the SAP system, retrieve the hardware key.
The license which matches with the hardware key is the correct license to use.
adm> saplicense get
Example output:
Also check the saplicense details against those stored on SAPnet (read also: SAP Service Marketplace)
for this SAP system.
1. Logon to SAPnet:
http://service.sap.com/access-support
User
: <see SAPnet user in password database>
Password
: <see password in password database>
2. Press button Maintain Connections.
3. Select the target system.
4. Press button System Data.
5. Go to tab License Keys.
For release >=WAS 7.00
The SAP license details are maintained ONLY within the SAP system via transaction SLICENSE.
It is not possible to download/save them directly from transaction SLICENSE; so retrieve them from
SAP marketplace (also known as: SAPnet). Check that the hardware key is correct.
Normally only a restricted number of people at the customer side have sufficient
authorizations on SAP marketplace to download/save the SAP license information.
Note
4.6
4.7
Make screenshots of your pc-screen (Alt+PrintScrn) and paste them in your Word
document.
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
4.8
4.9
Make screenshots of your pc-screen (Alt+PrintScrn) and paste them in your Word
document.
Make screenshots of your pc-screen (Alt+PrintScrn) and paste them in your Word
document.
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
28 of 85
4.10
Step
Before the refresh, safe the entries in the qRFC monitor (QOUT scheduler) on the target SAP system
1. In WBA-100 and WCA-100, go to transaction SQMS
2. Make a screenshot of all entries
4.11
4.12
Make screenshots of your pc-screen (Alt+PrintScrn) and paste them in your Word
document.
Example output:
dbs_ora_schema=SAPR3
Example output:
LASTNUM TRKORR
---------- -------------------TRKORR
DEDK909903
4.13
Make screenshots of your pc-screen (Alt+PrintScrn) and paste them in your Word
document.
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
4.14
4.15
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
3
f 85a
3.0 oMake
4. Check the settings of SAP_CONFIG for SLD-API (double click on it twice), especially the hostname
and user entries. Make screenshots.
Note in the screen above that for WMA the SLD on the wbacsz01 host is being used. Also do a test
connection to see if connection to SLD is currently working.
4.16
If no rows selected is returned, Java is not installed and can be skipped completely. Otherwise the
result will be Java Installed. For WML this is only the case for WMA and WBA.
4.16.1
Example output:
<java_user>
<java_tablespace> <java_tablespace_size>
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
2. Get and save the datafiles used for the tablespace (execute command exactly as described below):
SQL> col <java_tablespace_files> format a60
select a.default_tablespace "<java_tablespace>",
b.file_name "<java_tablespace_files>"
from dba_users a,
(select file_name from dba_data_files
where tablespace_name =
(select default_tablespace from dba_users where username =
(select owner from dba_tables where table_name = 'J2EE_CONFIG'))) b
where a.username =
(select owner from dba_tables where table_name = 'J2EE_CONFIG');
Example output:
<java_tablespace> <java_tablespace_files>
------------------- ---------------------PSAPJVADB
/oracle/NWP/sapdata3/jvadb_1/jvadb.data1
3. Run the script "user_rights.ksh" for saving the permissions of the following users:
OPS$JVAADM (if exists)
OPS$SAPSERVICE<target_SID> (if exists)
<java_user>
ora> cd /oracle/<target_SID>/refresh
ora> ./user_rights.ksh
(Ask the
4.16.2
Example command:
4.17
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
4.18
3
2 o f25
85
Step
Important
Before the refresh, save the settings of the certificates between R/3 and the Portal for Human
Resource (HR) SAP systems in the following way:
1. Logon to the client in which the certificates have been setup (e.g. client 080 for HRA).
2. Go to transaction STRUSTSSO2 and make a screenshot (Alt+PrintScrn).
4.19
Before the refresh, place an SAP system message to inform customer end-users of the planned
maintenance action:
1. Go to transaction SM02 in client 000 of the target SAP system.
2. Menu: Messages -> Create (F5).
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
5
5.1
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
3
4 of 85
RESTORE
6.1
The backup of the source SAP system, which the customer asks you to use (see received NLW-SAP2011 SAP Refresh template), must be finished with a return code 0 and have no errors which corrupt
the backup.
Check the return code on SAP level with transaction DB12.
Check the return code on Unix level with command:
ora> tail /oracle/<source_SID>/sapbackup/<backup_name>.aff
ora> tail /oracle/<source_SID>/sapbackup/<backup_name>.anf
6.2
(offline backup)
(online backup)
Step 29 Copy the needed source SAP system files from source to target SAP system
Copy the files below from source to target SAP system:
- <backup_name>.aff
copy to: /oracle/<target_SID>/sapbackup
- <backup_name>.anf
copy to: /oracle/<target_SID>/sapbackup
- arch<source_SID>.log
copy to: /oracle/<target_SID>/saparch
- init<source_SID>.sap
copy to: $ORACLE_HOME/dbs
- init<source_SID>.ora
copy to: $ORACLE_HOME/dbs
- spfile<source_SID>.ora
copy to: $ORACLE_HOME/dbs
- init<source_SID>.utl*
copy to: $ORACLE_HOME/dbs
- init<source_SID>.dba
copy to: $ORACLE_HOME/dbs
Note
6.3
(offline backup)
(online backup)
This step is only required when restoring from an online backup or performing a point
in time recovery.
It can be skipped, when an offline backup is used.
This step retrieves the redo logs needed for the recovery and the recover-until timestamp; both from
the source SAP system.
Execute script get_offline_or_online_bck_redo to:
1. retrieve the redo logs needed for the recovery and
2. retrieve the recover-until timestamp to roll forward to.
ora> cd /oracle/<source_SID>/sapbackup
ora> /oracle/<source_SID>/refresh/get_offline_or_online_bck_redo <backup_filename>
In case script get_offline_or_online_bck_redo comes back with an error message the following
actions have to be taken:
1. Check for useful earlier backups.
2. Inform the customer and advise on useful backups.
In case script get_offline_or_online_bck_redo comes back with the correct data, write down this
data.
=========================================================
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
When you need to restore to a certain point in time somewhere after the backup, you can use the
following command in the source database to determine which archivelog files need to be restored to
recover the database later on to the required timestamp.
Replace the first blue field into the exact start time of the backup.
Replace the second blue field into the exact time you want to restore to.
The format to be used for these dates and times is: DD-MON-YYYY hh24:mi:ss
Example:
For
20 March 2011 00:15:10
Enter
20-MAR-2011 00:15:10
SQL> select a.seq "Min", b.seq "Max" from
(select max(sequence#) seq from v$archived_log
where FIRST_TIME <= to_date('20-MAR-2011 00:15:10','DD-MON-YYYY hh24:mi:ss')) a,
(select min(sequence#) seq from v$archived_log
where COMPLETION_TIME >= to_date('20-MAR-2011 04:48:52','DD-MON-YYYY hh24:mi:ss')) b;
6.4
1.
2.
3.
4.
5.
6.5
ora> cd /appl/sap/bin
ora> SSD-monitor -h 48 <target_SID> stop <ticket> Refresh <target_SID> from <source_SID>
6.6
6.7
or
adm> kill <processnumber>
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
6.8
3
6 o f35
85
Step
Make sure SAP and Oracle are up; this script will not work otherwise.
ora> cd /oracle/<target_SID>/refresh
ora> ./delete_cleanup_<target_SID>
Important
6.9
Step 36 Stop SAP and Oracle database of the target SAP system
ora> cd /appl/sap/bin
ora> SSD-sap <target_SID> stop
ora> ps ef | grep i <target_SID>
6.10
At least one listener must be active for all instances on the host.
ONLY stop the listener for the target SAP system in case there is still a listener
running for the other instances.
6.11
(stop listener)
(check listener has been stopped)
Example result:
BACKUP_ARC_[def]params="-r init<target_SID>.utl.archive.prim"
BACKUP_ARC_[def]params2="-r init<target_SID>.utl.archive.sec"
In most cases there will be only 1 location to write the files to, but sometimes it must be written to 2
locations. The utl_files to use in this case will be init<target_SID>.utl.archive.prim and
init<target_SID>.utl.archive.sec
Start the backup of the archived log files. Sometimes this has to be done twice, when there are 2
locations specified. Then first use the utl_file of BACKUP_ARC_[def]params and than use the utl_file
of BACKUP_ARC_[def]params2:
ora> nohup /sapmnt/<target_SID>/exe/brarchive -c force -u / -r <utl_file>
6.12
cd /oracle/<target_SID>/sapbackup
mv back<target_SID>.log back<target_SID>.log1
cd /oracle/<target_SID>/saparch
mv arch<target_SID>.log arch<target_SID>.log1
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
ora> cd /oracle/<target_SID>/saptrace/background
ora> mv alert_<target_SID>.log alert_<target_SID>.log1
6.13
At least one OS-collector must be active for all instances on the host.
ONLY stop the OS-collector for the target SAP system in case there is still an OScollector running for the other instances.
adm> saposcol k
adm> ps ef | grep saposcol
6.14
Step 41 Remove the target SAP system database using generated script
ora> cd /oracle/<target_SID>/refresh
ora> ./doit_<target_SID>
Important
Should return zero, if not then find and delete the data file(s) in the following way:
ora> find /oracle/<target_SID> name *.data* type f ok rm {} \;
ora> find /oracle/<target_SID> name *.dbf type f | wc l
Should return zero, if not then find and delete the data file(s) in the following way:
ora> find /oracle/<target_SID> name *.dbf type f ok rm {} \;
6.15
Critical!!!
For database copies on the same host, this step can be skipped.
For database copies on separate hosts, proceed with this step.
To be able to restore the source system on the target host, logical links need to be created for the
source system, pointing to the target system on the target host.
To create these links, the script create_refresh_links.ksh has been created.
Note
Enter the source system, meaning the system which is being refreshed from
Enter the source system: <source_SID>
Enter the name of the backup logfile from the source system, as being copied in
Step 29 Copy the needed source SAP system files from source to target SAP
system
Enter the name of the source backup logfile
(/oracle/<target_SID>/sapbackup/): <source backup logfile>
Check if the script is being executed as the correct user, being ora<target_sid>
ERROR: Script should be executed as user ora<target_sid>
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
38 of 85
Check if the entered logfile is a logfile from the source system backup
ERROR: The backup logfile /oracle/${TARGET}/sapbackup/<backup logfile> is
not a logfile from the source system <source_SID>
Example output:
6.16
Step 43 Set ORACLE_SID environment variable for the restore of source database
Critical!!!
For database copies on the same host, this step can be skipped.
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
Critical
6.17
Only for database copies on the same host; skip this step.
For further explanation see chapter 15.
Best
practice 1
If the restore is allowed to run overnight, run it in background, so that the session
will not be disconnected accidentally.
Best
practice 2
In case the restore is interrupted automatically an RSB-file will be created, which can
be used to restart the restore at the point where it was interrupted.
Critical!!!
For database copies on the same host, first read the following:
Since the database restore of the source database takes place on the same host,
where both databases are located, the only option is to logon as the target database
(no different than before) and start the database restore (no different than before).
However, trying to restore the source database with the user of the target database
will result in warnings. Meaning, the restore logging indicates that it wants to restore
the source database over the target database; since the ORACLE_SID environment
variable is the target database. This is correct; please check very carefully that you're
restoring the correct SAP system!
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
4 0 wmpcsz01.wml.nl
of 85
numstreams
1
To start the restore of the database, run the following command:
For restore of OFFline backup:
Repeat command several times: lets you see if the sapdata-directories are being filled.
Check progress via restore-file:
ora> cd /oracle/<target_SID>/sapbackup
ora> tail f <last_file>.rsb
6.18
sudo
sudo
sudo
sudo
sudo
Note
chown
chown
chown
chown
chown
-R
-R
-R
-R
-R
ora<target_sid> /oracle/<target_SID>/sapdata*
ora<target_sid> /oracle/<target_SID>/mirrlog[AB]
ora<target_sid> /oracle/<target_SID>/origlog[AB]
ora<target_sid> /oracle/<target_SID>/oraarch
ora<target_sid> /oracle/<target_SID>/saparch
If there are no files in the saparch-directory, then an error occurs, which may be
ignored.
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
7.1
7.1.1
This chapter is only required when restoring from an online backup or performing a
point in time recovery.
In all other cases it can be skipped.
If the restore seems to be struck, check this in Tivoli Storage Manager (TSM).
Commands:
adm> dsmadmc
tsm> q mo
tsm> q ses
tsm> q actlog
7.1.2
7.2
Note
Note on
Legato
If you are using Legato, you will be able to see the logs only when the restore is
completed. As it does not display anything useful on the restore screen, do the
following to check the restore progress.
ora> tail f /tmp/backint<source_SID>.log
7.3
Note
If there are no files in the saparch-directory, then an error occurs, which may be
ignored.
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
7.4
4
2 o f49
85
Step
Important 1
Confirm that environment variable ORACLE_SID is set to the source SAP system for
each Unix session you are using.
Check :
Correct:
Note 1
In the blue field you use the recover-until-timestamp you received as output from
script get_offline_or_online_bck_redo.
Note 2
After starting the recovery you can use the output of the following command to
confirm that each stage of recovery & rebuild is successful:
ora> tail f /oracle/<target_SID>/saptrace/background/alert_<source_SID>.log
Press <return> for each offline redo-logs to apply. Each correctly recovered redo-log should give
message Log applied.
When all redo-logs have been recovered, check for message:
Log applied. Media recovery complete.
7.5
Because the online redo-logs are not used yet, the creation of the control file trace will give error(s)
and is not useable. Do a switch log-file as many times as there are online redo-logs:
SQL>
SQL>
SQL>
SQL>
SQL>
startup
select count(*) from v$log;
alter system switch logfile;
shutdown immediate
exit
Important
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
8
8.1
Critical!!!
For database copies on the same host, first read the following:
Creation of the control-file can only be done on the source SAP system (with the
database copy on the same host).
Since there is a close link between the backup used to restore the source database
and the number of database-files listed in the control-file, the backup of the controlfile must be performed just after completion of the backup.
In case this is not possible anymore, be aware, that the trace-file may contain too
many database-files. As a result, you may need to remove them from the trace-file
manually.
Confirm that environment variable ORACLE_SID is set to the source SAP system for
each Unix session you are using.
Check :
Correct:
ora> cd /oracle/<target_SID>/saptrace/usertrace
ora> sqlplus /as sysdba
SQL> startup
SQL> alter database backup controlfile to trace;
SQL> shutdown immediate
SQL> exit
Important
8.2
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
4 4 o fArchival
85
ARCH:
disabled due to shutdown: 1089
*** 2011-04-04 15:15:10.860 64213 kcrr.c
ARCH: Archival disabled due to shutdown: 1089
CRITICAL
8.3
Critical!!!
For database copies on the same host, this step can be skipped.
For database copies on separate hosts, proceed with this step.
8.4
generate_new_sap_db
.generate_new_sap_db
= the configation file which the script reads
= located in: /oracle/<target_SID>/refresh
Make sure that file .generate_new_sap_db does not exist at this moment in
directory /oracle/<target_SID>/refresh. In Step 1 , the complete refresh directory
should have been removed. If so, the file .generate_new_sap_db will not exist at this
moment.
Next execute script generate_new_sap_db so that a new empty (read also: unedited) configuration
file is created:
ora> cd /oracle/<target_SID>/refresh
ora> ./generate_new_sap_db
You now have a new unedited version of configuration file .generate_new_sap_db which you can now
edit as per the customers requirements; see NLW-SAP-2011 SAP Refresh template.
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
8.5
Note 1
Note 2
CRITICAL
Make absolutely sure that the System Instance parameter (INSTAN) is correct!
Check in SAP logon.
:g/SrC/s//<source_SID>/g
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
4#
6 Stop
o f 8at
5 each step to check the step or do all the steps automatic, (Yes / No)
INTRAC = Yes
Critical!!!
For database copies on the same host, also perform the following:
8.6
CRITICAL
The configuration file used for the restore is filled in, so the next step is to rename the SAP system.
The script will come up with oracle error messages. The following messages can be ignored, because
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
ora> cd /oracle/<target_SID>/refresh
ora> ./generate_new_sap_db
Follow the prompts which are displayed, mostly you will press the Enter key to continue each step
that the script executes.
Note
Critical!!!
When running script "./generate_new_sap_db" be sure to ignore message "The source database
<source_SID> is up and running, Did you forget to stop it?" (see below).
Meaning, ignore message and continue anyway.
Example result when running script "./generate_new_sap_db"
#BS5#BD5#NO#/oracle/BS5/refresh/create_new_db_BS5.sql#1#
#YES#YES#/oracle/BS5/refresh/post_generate#YES#
#YES#YES#YES#YES#10#NO#CLEANUP#
#YES#ON#YES#YES#YES#
#
#
# #
#
#
#
# ###### #
# ###### #
# ######
#
# #
# # #
#
# #
####### ##### ####### ##### ####### #####
#
# #
# # #
#
# #
#
# #
# # #
#
# #
#
# ###### #
# ###### #
# ######
The source database BS5 is up and running, Did you forget to stop it?
I expect that the database is already restored, only a rebuild is needed.
Start check all db files exists/writable
All files found and writable
./generate_new_sap_db_Oracle10[461]: Ed: bad number
Tracefile version 9
Change the SID from BD5 to BS5.
rename ./saptrace/background/alert_BS5.log
Start rename db?
Return to continue or CTRL-C to stop:
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
4
8 o f ACTIONS
85
POST
9.1
Only in case tablespace PSAPTEMP uses one or more temporary file(s), these file(s)
will not be added to the regular backup.
This means that the tempfile(s) will not restored automatically; you will have to
create it manually. See steps below.
Solution:
Ensure that each tempfile of tablespace PSAPTEMP has their actual-total-used-size
allocated. This procedure is explained in the steps below.
Important
In case more than one tempfile is configured, add them also in the same way (as
described below).
9.2
The following error message can be ignored, because this means that the permissions to revoke, have
not been granted:
ORA-01927: cannot REVOKE privileges you did not grant
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
9.3
Note
9.4
Check that the listener has started correctly by checking the output that is displayed
on screen.
9.5
If no rows selected is returned, Java is not installed and Step 61 Java import can be skipped
completely. Otherwise the result will be Java Installed.
9.5.1
Example output:
<source_java_user>
<source_java_tablespace>
------------------------------ -----------------------------SAPJVADB
PSAPJVADB
Drop the the <source_java_user> and the <source_java_tablespace> from the database (fill in the data
gathered in previous steps):
SQL> drop user <source_java_user> cascade;
SQL> drop tablespace <source_java_tablespace> including contents and datafiles;
9.5.2
1. Manually create the target-directory for the target-datafile on OS-level and create the tablespace
in the database as saved in paragraph 4.16.1 point 2.
ora> mkdir /oracle/<target_SID>/sapdata<X>/jvadb_1
SQL> CREATE TABLESPACE <java_tablespace> DATAFILE <java_tablespace_files size <java_tablespace_size>M reuse extent
management local autoallocate ONLINE;
Example:
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
5 0 ora>
o f 8cd5 /oracle/<target_SID>/refresh
9.5.3
(if exists)
(if exists)
@recreate_user_OPS_SAPSERVICE<target_SID>.sql
@recreate_user_SAPJVADB.sql
2. To import the Java owner and object the following script should be executed:
ora> imp userid=system/<see-password-tool> fromuser=<java-user> touser=<java-user> \
file=/usr/sap/<??>trans/refresh/<java-user>.dmp \
log=/usr/sap/<??>trans/refresh/<java-user>_imp.log
9.5.4
9.6
@restore_grants_on_tables_OPS_SAPSERVICE<target_SID>.sql
(if exists)
(if exists)
@restore_grants_on_tables_SAPJVADB.sql
Example output:
dbs_ora_schema=SAPR3
CRITICAL
ONLY delete the list of tables you previously listed in file /usr/sap/<??
>trans/bin/<target_SID>_exp_tables<clt>.ctl
This are the tables specified in the NLW-SAP-2011 SAP Refresh template (which you
received from the customer).
Note
The customer must check/test the SAP business functionally, to check that the
correct tables have been exported on beforehand and imported afterwards.
EXAMPLE sql-file:
Execute script
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
SQL> @<target_SID>_cleanup_tables.sql
SQL> commit;
SQL> exit
9.7
########################################
# RFC/EDI/TBDLS import
########################################
import
client = <client-number>
file = "/usr/sap/<??>trans/bin/data/<target_SID>_tables<client-number>.dat"
adm> cd /usr/sap/<??>trans/bin
adm> R3trans w <target_SID>_imp_tables<clt>.log <target_SID>_imp_tables<clt>.ctl
Example commands:
adm>
adm>
adm>
adm>
9.8
R3trans
R3trans
R3trans
R3trans
-w
-w
-w
-w
MCQ_imp_tables000.log MCQ_imp_tables000.ctl
MCQ_imp_tables740.log MCQ_imp_tables740.ctl
MCQ_imp_tables760.log MCQ_imp_tables760.ctl
MCQ_imp_tables777.log MCQ_imp_tables777.ctl
Example output:
dbs_ora_schema=SAPR3
Example update-command:
9.9
Step 65 Install sap license details (for WAS 6.40 and lower)
Manually fill in the sap license details youve saved. The SAP system will not start without a valid sap
license key.
adm> saplicense install
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
5 Example
2 of 85
Much easier is to place the license details in a file, named <target_SID>.lic in the adm-homedirectory.
adm> cd
adm> saplicense install ifile=<target_SID>.lic
#############################################
Example of
# Installation of the license key
MCQ.lic
# Script for release 4.5A and higher
# saplicense -install [ifile=...]
#############################################
# Database: ORACLE
# Release: SAP R/3 4.6C
#############################################
#
SAPSYSTEM = MCQ
CUSTOMER-KEY = D0413031492
INSTNO = 0020178366
EXPIRATION = 99991231
PRODUCTID = R3_ORA
LKEY = 3FTXXNSRYK986SA7TSHPXSYU
9.10
9.11
Step 67 Upload SAP license details (for WAS 7.00 and higher)
Retrieve saplicense information from SAP Service Marketplace.
1. Logon to the SAP Service Marketplace: http://service.sap.com/access-support and the Service
Corner at the bottom of the screen. Push button "Maintain Connections".
2. In case the requested SAP system is not present in the recently used-system-list, perform a
search. Fill in the System-ID and push button "Search systems".
3. Go to the System Data of the requested SAP system by pushing button "Systemdata".
4. Go to tab "License Key & Maintenance Certificate" and display the saplicense key belonging to the
correct hardware key(s). Copy this key(s) into OS-level-file(s).
5. Delete all old existing licenses from the target system.
Import saplicense information.
6. Logon to client 000 preferably with personal userid (note: emergency user "sap*" always works).
7. Go to transaction SLICENSE.
8. Menu: Goto -> New Licenses (F9).
Or press button "New Licenses".
9. Menu: Edit -> Install License (F6).
Or press button "Install".
10. Select the OS-level-file(s) which contain the license information.
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
9.12
9.13
Check the generated .trc file for errors and note these.
Important
If the database check and/or tracefile checks fail then you have to fix these before
you can handover the target SAP system to the customer.
SQL> $ORACLE_HOME/rdbms/admin/utlrp.sql
9.14
(= lock-session 2)
Example:
For script-details:
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
9.15
5
4 o f71
85
Step
Installation check
9.16
2. Choose Check entries and press button Execute. A typical example is shown in the next figure:
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
5. Request the migration key by pressing the button Create Key. Copy the key into a notepad file.
You will need this later.
6. In the target system, go to transaction SECSTORE again, and choose tab System Data changed,
add Old System Name, Old Installation Number and the Release Key. The release key is the saved
migration key. See the example below:
7. Press button Execute. Red and yellow lights should become green. See the following example:
Also check for the correct SAP_CONFIG settings as was saved in advance (step 20). If not correct
because there is still a reference to the production host, change the entry and test.
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
56 of 85
9.17
9.18
YES
<source_SID>
YES
(2x)
YES
(2x)
NO
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
9.19
Step 75 Transport Management System configuration: Insert refreshed SAP system into
transport domain
For releases R/3 4.x and higher
1. Logon to client 000 on the target SAP system.
2. Go to transaction STMS.
3. Re-connect to the Domain Controller, click button Other selection/Other configuration (F6)
4. Select button Include into domain.
5. Fill in the correct (a) Target host and (b) System number (read also: instance number) of the
Domain Controller.
9.20
8. Menu: Configuration -> Distribute and activate (F8) -> Yes (to distribute and activate configuration
across all systems).
Important 1
Important 2
Important 3
9.21
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
58 of 85
Note
In case the transport-strategy uses source and target clients, all transport requests in
9.22
9.23
9.24
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
9.25
WCA-100 screenshot:
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
60 of 85
9.26
9.27
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
2. Check and adjust the settings for all customer clients; where the target system is mentioned in
the paths. Pay special attention to all directory-paths under the tree-node File in transaction
WE21.
zchedipod.txt
9.28
SQL> exit
9.29
exit
connect sapr3/<password>
@GRAN_SEL_2_LDC1.sql
exit
connect oraldc1/<password>
select table_name from all_tables;
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
62 of 85
Or button Copy as
6. Change field Destination to (Luminaires: for example to CRMDC2200).
9.30
9.31
For WML, each QA system has multiple logical system names that need to be converted: all
production names have to be change into QA names. Some will run for hours, others are
finished quickly. All logical system names can be seen in transaction BD54.
WBA-100:
WBA-000:
WCA-100:
WCA-000:
WBP100 WBA100
runs 11 hours!
WCP100 WCA100
WRP100 WRA100
WBPCLNT000 WBACLNT000
WCP100 WCA100
WBP100 WBA100
WRP100 WRA100
WCPCLNT000 WCACLNT000
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
WMA-100:
WMA-000:
WMPCLNT100 WMACLNT100
WMACLNT000 WMACLNT000
WRA-100:
WBP100 WBA100
WCP100 WCA100
WRP100 WRP100
WRPCLNT000 WRACLNT000
WRA-000:
9.32
9.33
For system WBA (client 100) only, in transaction RSA1, change the description of the source
systems. This description is still referencing to the production name, which should be the QA
system name. Note that is not effecting functionality (as it is only a description), but it
confuses the user.
Press the Source System tab, open the BI and SAP entries and change the names as shown below.
9.34
9.35
Go to transaction SMLG.
Re-apply the saved settings of the Logon groups as saved in the pre-actions.
Go to transaction RZ12.
Re-apply the saved settings of the Server groups as saved in the pre-actions.
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
64 of 85
9.36
9.37
Ensure that the correct SAP housekeeping jobs are scheduled with the correct
program-variants. Incorrectly configured/defined SAP housekeeping jobs may hang the
SAP system (eventually).
9.38
9.39
Perform transaction SCC7 in each client (000 and all customer clients) for which the
Users have been imported.
Go to transaction SM59
Select each rfc connection (mainly Abap and tcp/ip
Test connection by pressing button Connection Test
Solve issues when connection test does not work
Go to transaction SM59
Choose Extras and select Trusted systems
Make sure you have the same entries as beforehand saved in step 14.
If not, make sure you create them manually with the details you save in step 14 and delete
the ones that are new (with production reference)
5. Now go back and choose Extras again and select Trusting systems
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
6. Make sure you have the same entries as save in step 14.
7. Trusting systems are to be created in the reference system as trusted system.
9.40
9.41
Go to transaction STRUSTSSO2
Check if there is still a reference to production
If so, reapply the QA certificate
Details how to will be provided by Jos Schippers
For WML this is only needed in WBA when the restore is done on an
online backup
In BW systems, infocube indexes are created standard with the NOLOGGING option, which means that
changes during the creation of the index are not written to the Oracle redolog files. The consequence
of this during a refresh procedure using an online backup is that changes to those indexes that were
made during the online backup cannot be recovered because of the lacking info in the redolog file. As
a consequence, the blocks of those indexes in the relevant datafiles are marked corrupt and excess to
it by queries is not possible.
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
66 of 85
The only solution is to rebuild the indexes which contain the corrupted blocks.
In the WBA database, make a selection for all '/BI%/F%' and '/BI%/E%' indexes to be dropped:
1. In sqlplus:
set pages 0
spool drop_bi_indexes_WBA.sql
select 'drop index '||owner||'."'||index_name||'";' from dba_indexes where index_name like
'/BI%/F%' or index_name like '/BI%/E%';
spool off
quit;
2. Edit drop_bi_indexes_WBA.sql by removing all obsolete lines as a result of the spooling (such
as "xxx rows selected" at the bottom).
3. Execute @drop_bi_indexes_WBA.sql (in sqlplus) to drop all '/BI%/F%' and '/BI%/E%' indexes.
4. In SAP, run script SAP_INFOCUBE_INDEXES_REPAIR from SE38 (in background) takes about 2
hours.
9.42
9.43
ora> cd /appl/sap/bin
ora> SSD-monitor <target_SID> start
9.44
9.45
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
4. After the upload the fields will be filled and can be moved up and down with following buttons:
a) Move up:
b) Move down:
During the move down, fill in the client for which the R/3-Portal-connection has been setup.
Note: Usually this is client 000.
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
10
6
8 of 85
HANDOVER
10.1
Step
101 Inform Customer Coordinator, Officer-of-the-Day and customer
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
11
11.1
AFTERCARE
Step 102 Enable backups
Run the following commands to enable all backups for this system:
ora> /appl/sap/bin/SSD-backup <target_SID> enable archive
ora> /appl/sap/bin/SSD-backup <target_SID> enable offline
ora> /appl/sap/bin/SSD-backup <target_SID> enable online
11.2
In case the customer decides for an offline backup (of the target system); deliver the SAP system after
completion of the backup.
ora> cd /appl/sap/bin
ora> nohup SSD-backup <target_sid> offline
11.3
11.4
Example:
(= unlock-session 1)
Check users have been unlocked via script-logging (appended at the end of the file):
ora> cd /oracle/<target_SID>/abin/log
ora> more <ticket>.log
Note
For script-details:
ora> cd /oracle/<target_SID>/abin
ora> DSM-lock-users help
11.5
11.6
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
70 of 85
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
Appendix A
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
7
2 of 85
Appendix
Or button
4. Double click on client 000 and afterwards perform the same actions for each customer client.
5. Change the following client options:
Changes and transports for client-specific object.
Change to Automatic recording of changes.
Client-independent object changes.
Change to Changes to Repository and cross-client Customizing allowed.
Protection: Client copier and comparison tool.
Change to Protection level 0: No restriction (if not default setting).
Restrictions (if not default settings).
Tick Allows CATT processes to be started.
Untick Currently locked due to client copy.
Untick Protection against SAP upgrade.
Or button
4. Double click on client <T-CLIENT> (same as client you logged on with)
5. Change the following client options:
Client role.
Change to Test.
Changes and transports for client-specific object.
Change to No changes allowed.
Client-independent object changes.
Change to No changes to Repository and cross-client Customizing objs.
Protection: Client copier and comparision tool.
Change to Protection level 0: No restriction (if not default setting).
Restrictions (if not default settings).
Tick Allows CATT processes to be started.
Untick Currently locked due to client copy.
Untick Protection against SAP upgrade.
6. Press Enter (so that field Logical system name can be changed).
7. Fill in the name of the Logical system name.
8. Change the client role back to Production.
9. Menu: Table view -> Save (Ctrl+S).
Or click button
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
Appendix C
Dependent on the customer the Logical system name can or cannot be changed.
1. For customers who have integrated the list of logical system names in the source
SAP system also, you can easily change the Logical system name; youve written
them down in the pre-actions.
2. For customers who do not have integrated the list of logical system names in the
source SAP system, you need to create the logical system name first (see next
step).
Problem
Solution
For some clients field Client role may be Production, this means that you are not
allowed to change field Logical system.
Change the field Client role to Test and press <enter> to activate this change.
Field Logical system now can be changed.
If you see the message Changes to Repository or cross-client Customizing are not
permitted, you need to "Open system for cross-client changes first; check out
Appendix "Opening/Closing SAP system for cross-client changes". Make sure to close
the system afterwards.
Usually more than one logical system name is being used; so more than one logical system name needs
to-be converted.
Perform the first BDLS and check the throughput time. Depending on this throughput time, schedule
the rest of the BDLS conversions as mentioned in the following table:
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
74 of 85
Throughtput
Time First
BDLS
< 30 minutes
< 1 hour
< 2 hours
< 4 hours
> 4 hours
every 20
minutes
every 30
minutes
every 45
minutes
every 1
hours
every 2
hours
BDLS
BDLS
2
BDLS
3
BDLS
4
BDLS
5
BDLS
6
BDLS
7
BDLS
8
BDLS
9
0:00
0:20
0:40
1:00
1:20
1:40
2:00
2:20
2:40
0:00
0:30
1:00
1:30
2:00
2:30
3:00
3:30
4:00
0:00
0:45
1:30
2:15
3:00
3:45
4:30
5:15
6:00
0:00
1:00
2:00
3:00
4:00
5:00
6:00
7:00
8:00
0:00
2:00
4:00
6:00
8:00
10:00
12:00
14:00
16:00
10
Restriction(s):
1. The conversion of logical system names must run in all customer clients in which logical system
names are used; either in transaction SCC4 (technical) or to distinguish SAP functionality (customer
functionality).
2. The conversion of logical system names should not run parallel in multiple clients, meaning at once
on the same data-dictionary-tables; this will heavily impact the total-completion-time.
Bottleneck(s):
1. Usually only two huge data-dictionary-tables cause the longer completion-time.
Solution:
Best practice is to run the logical-system-name-conversion via multiple batch jobs (in the background)
with multiple variants (so one batch job with one variant).
As a result:
1. The data-dictionary-tables which have a huge impact on the total-completion-time can be run
separately; therefore improving the completion-time of the other batch jobs.
2. The data-dictionary-tables which run fast and have been completed can be run in the next
customer client already.
Best practice is also to keep track of which data-dictionary-tables take a longer completion-time on
each SAP system type (e.g. APO, R/3, BW) for future reference.
Practical implementation:
1. Schedule and run program RBDLSMAP as a batch-job; via transactions SM36 (create job) and SM37
(manage jobs).
2. Create multiple variants, via transaction SE38, for program RBDLSMAP. See examples below:
# Variants with ranges:
Variant name
Variant description
BDLS_AF
Tables A*-F*
BDLS_G
Tables G*, except GLPCA
BDLS_HR
Tables H*-R*, except MKPF
BDLS_S
Tables S*, except SWW_CONTOB
BDLS_T
Tables T*
BDLS_UW
Tables U*-W*
BDLS_XZ
Tables X*-Z*
# Variants with single tables:
Variant name
Variant description
BDLS_GLPCA
Table GLPCA
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
BDLS_MKPF
Table MKPF
BDLS_SWW_CONTOB Table SWW_CONTOB
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
7
6 of 85
APPENDIX
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
Select your added row and press text button Save Selected Systems. Do NOT press the Complete
Save button (the floppy disk) on top, as this will save all connections and can take long.
The following log screen should pop up:
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
78 of 85
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
Go to transaction SCUG.
Select your added system and press button Copy users to the Central system
Check the different tabs for users (New users/Identical users/Different users).
Select all users in all tabs and press button Transfer users.
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
80 of 85
When finished, all users should have switched to tab Already central user.
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
8
2 of 85
APPENDIX
These instructions are taken from document Refresh Manual Mobile Offline_v01.doc, which
describes all the steps needed when a new installation of Java is done during the refresh. Since we
do a java export and import on WMA and rfc destinations are saved, not all steps are needed as most
of the java settings will be unchanged. Therefore, this appendix will only list those steps that are
needed to be executed. But it is a good practice to double check all settings with the main
document.
Check following urls if they are pointing to the QA target system WMA and WRA:
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
The URL is probably pointing to the production hostnames. If so, change the URLs to point to
wmacsz01 and wracsz01.
Click on button:
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
84 of 85
S A P - D a t a b a s e Co p y / Re f re s h o f a n S A P s ys t e m f o r W ML
http://wmacsz01.wml.nl:50000/meContainerSync/servlet/com.sap.ip.mi.http.MobileComponentServl
et?Application=IDEO_BDI_1.02&Type=APPLICATION&Runtime=JSP
Copy the link in your web-browser and check if this results in a pop-up.
You now have checked If the mobile component can be downloaded.
Repeat the above mentioned steps for the mobile components adjusted in chapter 5.10
2.4. Check if mobile devices displayed in NWA are the same as target system
Before you delete obsolete device ids you have to check if the device ids displayed in the NWA are
the same as displayed in transaction MEREP_PD of the target system.
Logon to the NWA and go to Administration, Mobile Infrastructure and click on the node: Device
Maintenance.
Seach: MOB* and click on search.
A similar result is diplayed.
Notify that the Device ID we found in the NWA is the same as the Device ID found in trx MEREP_PD.
So now we know that the that the Device IDs found in the NWA are the same as the Device IDs in the
target system and not the productive system.
If needed delete the obsolete Device IDs via:
Logon to the NWA and go to Administration, Mobile Infrastructure and click on the node: Device
Removal.