You are on page 1of 85

SAP - DATABASE COPY / REFRESH OF AN SAP SYSTM

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

Step 1. Check refresh scripts...............................................................


Step 2. Check that both SAP systems are binary compatible..........................
Step 3. Check that both SAP systems have the same Oracle database version
....................................................................................................
Step 4. Check that both SAP systems have the same file-systems and filesystem-size......................................................................................
Step 5. Check target SAP system sizing and if necessary adapt
spfile<target_SID>.ora.........................................................................
Step 6. Check target SAP system transport-system.....................................
Step 7. Check source backup retention period..........................................

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

Step 8. Detach CUA and Lock users........................................................


Step 9. Save User master data..............................................................
Step 10. Save SAP printer definitions.....................................................
Step 11. Save RFC definitions and other customer specified tables.................
Step 12. Save SAP license details..........................................................
Step 13. Save Logical system names for all relevant clients..........................
Step 14. Save trusted and trusting rfcs...................................................
Step 15. Save Operation modes............................................................
Step 16. Save Logon groups and Server groups..........................................
Step 17. Safe entries in qRFC monitor......................................................
Step 18. Save EDI port definitions.........................................................
Step 19. Save Latest transport-number...................................................
Step 20. Save Transport Management System (TMS) transport routes...............
Step 21. Switch Transport Management System (TMS) domain controller...........
Step 22. Save Secure store settings of the ABAP stack.................................
Step 23. Java export.........................................................................
Step 21. Java export: Save Java user privileges.........................................
Step 21. Java export: Export Java owner and objects.................................
Step 24. Save settings BW systems.........................................................
Step 25. Save certificate settings..........................................................

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

26. Place SAP system message.......................................................

HANDOVER OF SYSTEM FROM CUSTOMER TO US..................................

5.1

Step 27. Inform Officer-of-the-Day........................................................

RESTORE SOURCE SAP SYSTEM ON TARGET HOST.................................

6.1
6.2

6.17
6.18

Step 28. Check that the customer-requested backup is usable.......................


Step 29. Copy the needed source SAP system files from source to target SAP
system............................................................................................
Step 30. Retrieve redo logs and recover-until-timestamp.............................
Step 31. Lock transport queue of the target SAP system..............................
Step 32. Disable monitoring.................................................................
Step 33. Disable backups....................................................................
Step 34. Check if backup or archive is running..........................................
Step 35. Generate target SAP system cleanup database script.......................
Step 36. Stop SAP and Oracle database of the target SAP system....................
Step 37. Stop Oracle listener of the target SAP system................................
Step 38. Spool all archives to tape........................................................
Step 39. Save backup, archive and alert logfile.........................................
Step 40. Stop OS-collector of the target SAP system...................................
Step 41. Remove the target SAP system database using generated script..........
Step 42. Create softlink(s) from <source_SID> to <target_SID>.......................
Step 43. Set ORACLE_SID environment variable for the restore of source
database.........................................................................................
Step 44. Begin actual restore on target host.............................................
Step 45. Change ownerships of restored data-files.....................................

RESTORE SOURCE ORACLE ARCHIVELOG FILES ON TARGET HOST..............

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.

RENAME RESTORED SAP SYSTEM.....................................................

8.1
8.2
8.3
8.4
8.5

Step 51. Create backup of control-file; create trace-file..............................


Step 52. Copy tracefile to create_new_db_<target_SID>.sql script................
Step 53. Reset ORACLE_SID environment variable......................................
Step 54. Rename database: Create a new empty configuration file.................
Step 55. Rename database: Set parameters in new empty configuration file
.generate_new_sap_db.....................................................................
Step 56. Rename database: Execute script generate_new_sap_db to
rename the SAP system.......................................................................

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

Prepare restore of redo-log files................................................


Prepare restore of redo-log files: Redo-logs on disk.........................
Prepare restore of redo-log files: Redo-logs on tape........................
Restore of redo-logs...............................................................
Change ownerships of restored data-files.....................................
Recover the database to the recover-until-timestamp......................
Reset redolog sequence...........................................................

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

Step 57. Check and add tablespace PSAPTEMP..........................................


Step 58. Correct Oracle BSL settings......................................................
Step 59. Start Oracle listener...............................................................
Step 60. Check connection to database is ok............................................
Step 61. Java import.........................................................................
Step 59. Java import: Remove source Java stack.......................................
Step 59. Java import: Recreate Java tablespace and users...........................
Step 59. Java import: Import Java owner and objects.................................
Step 59. Java import: Restore grants.....................................................
Step 62. Delete RFC connections and other tables.....................................
Step 63. Import exported RFC connections...............................................
Step 64. Set to latest transport-number..................................................
Step 65. Install sap license details (for WAS 6.40 and lower).........................
Step 66. Start newly refreshed target SAP system......................................
Step 67. Upload SAP license details (for WAS 7.00 and higher).......................
Step 68. Check sapcheck-file...............................................................
Step 69. Check oracle trace-file...........................................................
Step 70. Lock users...........................................................................
Step 71. Installation check..................................................................
Step 72. Migration secure store of the ABAP stack......................................
Step 73. Activate/check instance profiles................................................
Step 74. Transport Management System configuration: Post installation
processing.......................................................................................
9.19 Step 75. Transport Management System configuration: Insert refreshed SAP
system into transport domain................................................................
9.20 Step 76. Transport Management System configuration: Re-distribute TMS
configuration from domain controller......................................................
9.21 Step 77. Unlock transport queue for the target SAP system..........................
9.22 Step 78. Setup Workload analysis..........................................................
9.23 Step 79. Cleanup transactional RFC.......................................................
9.24 Step 80. Change the operation modes....................................................
9.25 Step 81. Recreate qRFC monitoring entries................................................
9.26 Step 82. Adapt Unix directories............................................................
9.27 Step 83. Adapt EDI ports.....................................................................
9.28 Step 84. Define Business Object authorizations.........................................
9.29 Step 85. Change CRMRFCPAR table........................................................
9.30 Step 86. Delete entries from SMQ1.........................................................
9.31 Step 87. Conversion of SAP logical system names.......................................
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............................................................................
9.32 Step 88. Change the client settings in SCC4..............................................
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....................
9.34 Step 89. Configuration Logon groups and Server groups...............................
9.35 Step 90. Import printers.....................................................................
9.36 Step 91. Check/Configure SAP housekeeping jobs......................................
9.37 Step 92. Import 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

6
o f 8 5Step
9.38

9.39

93. Check all rfc connections.........................................................


Step 94. Reconfigure trusted and trusting rfc connections............................

9.40
9.41
9.42
9.43
9.44
9.45

Step
Step
Step
Step
Step
Step

10

HANDOVER OF SYSTEM FROM US TO CUSTOMER..................................

10.1

Step 101. Inform Customer Coordinator, Officer-of-the-Day and customer.........

11

AFTERCARE.............................................................................

11.1
11.2
11.3
11.4
11.5
11.6
1.1.

Step 102. Enable backups...................................................................


Step 103. Create full backup of target SAP system.....................................
Step 104. Perform full statistics run.......................................................
Step 105. Unlock users.......................................................................
Step 106. Reattach the QA systems to CUA...............................................
Step 107. Document audit evidence.......................................................
Adjusting the backend customizing.........................................................

2.

Configuration of NetWeaver Administrator.......................................

2.1.
2.2.
2.3.
2.4.

Manage j2ee engine............................................................................


Check parameter set...........................................................................
Check download links of mobile components..............................................
Check if mobile devices displayed in NWA are the same as target system...........

95. Reapply certificate................................................................


96. Rebuild corrupt indexes for BW info cubes......................................
97. Specific Manual Mobile Offline instructions for WMA..........................
98. Start SAP monitoring..............................................................
99. Re-apply settings BW systems...................................................
100. Re-apply settings HR 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

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

For database copies on the same host, ...


For database copies on separate hosts,

Scenario 1: database copy to another host (default)


Both source and target SAP systems usually are located on another host (meaning: different hosts).
Simply put, this action consists of two main steps:
1. An existing copy of the Source Database is restored on the target host; as the Source Database
(environment parameter ORACLE_SID is set upfront to the Source Database SID),
2. After which the Source Database (on the target host) must be renamed to the Target Database (so
that both source and target SAP-system-names differ).

Source
Host

Target
Host

Source
Database

1.2.2

Target
Database

Scenario 2: database copy to the same host


Both source and target SAP systems can also be located on same host.
Simply put this action consists of two main steps:
1. an existing copy of the Source Database is restored on the same host; as the "Target Database"
(environment parameter ORACLE_SID must NOT be set to the Source Database SAP-system-name);
2. after which the "Target Database" must be renamed to the real Target Database (so that both
source and target SAP-system-names differ).

Source Host = Target Host

Source
Database

1.3

Target
Database

Scope
Scoping

Data

Customer

ALL

SID(s)

ALL

Operating system
Database

Unix, Linux

Oracle 9.2.0.x and higher

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

SAP releases 3.1x, 4.x, 6.x, 7.x

Planning information
Planning item

Data

Required skill level

3
Meaning Junior under supervision.

Normal time needed to


complete this instruction

Takes 2 days in general.


However heavily depends on the size of the Database.

Related Request form or


Workflow task (USD)

NLF-SAP-2011 SAP Refresh template; to be received from customer

References
Reference

Document

Service Description

Application Technical Management SAP, docnr MOD-GPM-0872, chapter 2.1.22 Change


management SAP Client Maintenance

Procedure

NLP-SAP-0568 Data Refresh

Naming Conventions

NLD-SAP-2087 SAP Naming Conventions

Manual LiveCache

NLW-SAP-0834 APO SCM LiveCache MaxDB

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>

System ID of source SAP system; capitals

Example

<target_SID>

System ID of target SAP system; capitals

e.g. PR2

<target_sid>

System ID of target SAP system; non capitals

e.g. pr2

<target_client>

Client of target SAP system

<SAPnet user>

SAP marketplace userid / SAPnet userid

CC-er

Customer Coordinator

Backup CC-er

Backup of Customer Coordinator

puid

personal user id

ora>

Execute command as user ora<sid>

adm>

Execute command as user ora<sid>

SQL>

Execute command in sqlplus

OS

Operating System (installed on a host)

Host

Computer system

e.g. S0000264727

e.g. Unix AIX, Unix HP

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

Target SAP system


Target host
Target SAP system instance number

Atos Origin change request number


Customer change request number
Refresh Start date/time (Time zone: example
CET)
Refresh End date/time (Time zone: example CET)
Step
1
2
3
4
5
6
7
8
9

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

Save Transport Management System (TMS) transport routes


Switch Transport Management System (TMS) domain controller
Save Secure store settings of the ABAP stack
Java export
Java export: Save Java user privileges
Java export: Export Java owner and objects
Save settings BW systems
For BI, BIW and BW-systems ONLY
Save settings HR systems
For HR-systems ONLY
Place SAP system message
HANDOVER OF SYSTEM FROM CUSTOMER TO US
Inform Officer-of-the-Day
RESTORE SOURCE SAP SYSTEM ON TARGET HOST
Check that the customer-requested backup is usable
Write down
the offline backup name
Copy the needed source SAP system files from source to target SAP system
Retrieve redo logs and recover-until-timestamp
Lock transport queue of the target SAP system
Disable monitoring
Disable backups
Check if backup or archive is running
Generate target SAP system cleanup database script
Stop SAP and Oracle database of the target SAP system
Stop Oracle listener of the target SAP system
Spool all archives to tape
Save backup, archive and alert logfile
Stop OS-collector of the target SAP system
Remove the target SAP system database using generated script
Create softlink(s) from <source_SID> to <target_SID>
Set ORACLE_SID environment variable for the restore of source database
Begin actual restore on target host
Change ownerships of restored data-files
RESTORE SOURCE ORACLE ARCHIVELOG FILES ON TARGET HOST
ONLY FOR RESTORE FROM ONLINE BACKUP OR POINT IN TIME RECOVERY
Prepare restore of redo-log files
Prepare restore of redo-log files: Redo-logs on disk
Prepare restore of redo-log files: Redo-logs on tape
Restore of redo-logs
Change ownerships of restored data-files
Recover the database to the recover-until-timestamp
Reset redolog sequence
RENAME RESTORED SAP SYSTEM
Create backup of control-file; create trace-file
Copy tracefile to 'create_new_db_<target_SID>.sql' 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

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

Reset ORACLE_SID environment variable


Rename database: Create a new empty configuration file
Rename database: Set parameters in new empty configuration file
.generate_new_sap_db
Rename database: Execute script generate_new_sap_db to rename the SAP system
POST ACTIONS
Check and add tablespace PSAPTEMP
Correct Oracle BSL settings
Start Oracle listener
Check connection to database is ok
Java import
Java import: Remove source Java stack
Java import: Recreate Java tablespace and users
Java import: Import Java owner and objects
Java import: Restore grants
Delete RFC connections and other tables
Import exported RFC connections
Set to latest transport-number
Install sap license details (for WAS 6.40 and lower)
Start newly refreshed target SAP system 45
Upload SAP license details (for WAS 7.00 and higher)
Check sapcheck-file
Check oracle trace-file
Lock users
Customer specific => DSM ALWAYS
Customer specific => Philips Lighting ALWAYS
Installation check
Activate/check instance profiles
Transport Management System configuration: Post installation processing
Transport Management System configuration: Insert refreshed SAP system into transport
domain
Transport Management System configuration: Re-distribute TMS configuration from
domain controller
Unlock transport queue for the target SAP system
Setup Workload analysis
Migration secure store of the ABAP stack
Cleanup transactional RFC
Change the operation modes
Adapt Unix directories
Customer specific => Philips Lighting Luminaires ALWAYS
Adapt EDI ports
Define Business Object authorizations
Customer specific => Philips Lighting Luminaires ONLY
Change CRMRFCPAR table
Customer specific => Philips Lighting Luminaires ALWAYS
Conversion of SAP logical system names
Configuration Logon groups and Server groups
Import printers
Check CCMS AutoReaction Method (for SSD-14 only)
Check/Configure SAP housekeeping jobs
Import users
Start SAP monitoring
Re-apply settings BW 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

1 4 o f 8For
5

91

92
93
94
95
96
97

BI, BIW and BW-systems ONLY


Re-apply settings HR systems

For HR-systems ONLY


HANDOVER OF SYSTEM FROM US TO CUSTOMER
Inform Customer Coordinator, Officer-of-the-Day and customer
AFTERCARE
Enable backups
Create full backup of target SAP system
Perform full statistics run
Unlock users
Customer specific => DSM ALWAYS
Document audit evidence

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

Step 2 Check that both SAP systems are binary compatible


The Operating System (shortcut: OS) of both source and target SAP system must be binary compatible.
Check this with command:
puid> uname -a

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

Step 6 Check target SAP system transport-system


Check that a transport-domain and transport-group have been assigned to the target SAP system.
Make sure this is true; otherwise all transports which are currently in the transport-queue will not be
there after the 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

Check this in the following way:


1. Go to transaction STMS.
2. Press button System Overview (Shift+F6).
3. Check that the Domain is the same for all systems in the transport-domain (read also: transportlandscape).
Best
practice

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

Step 7 Check source backup retention period


Check that the retention period of the source backup and archives (in case of an online backup) used
for the refresh is long enough. If not, create a ticket to the Data Storage group to extent the backup
retention period.

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

Step 8 Detach CUA and Lock users


Locking of users is done by WML, locally on the systems after they have been detached from CUA by
us.
A list of users that should be locked should be given to WML. Besides the personal users of the persons
executing the refresh, this includes the following technical users (in all clients):

ADSUSER, ADS_AGENT, CSMREG, HOUSEKEEPING, J2EE_ADMIN (for WMA en WRA), SAPADMIN,


SAPCPIC, SAPCUA, SAPJSF, SLDAPIUSR, SSSCPIC, TMSADM, ALE_R3TOBW, ALE_R3TOCRM,
ALE_CRMTOR3, ALE_CRMTOBW, ALE_BWTOCRM
How to delete a QA child system from CUA
Login to Solution Manager client WSP-360 with user sapadmin.
Start transactions SCUA.

Press the Garbage button to delete a child system (QA 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

Select a child system, for example WBA100.

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

Step 9 Save User master data


Before the refresh, the user master data must be exported for each client on the target SAP system.
This is especially important for SAP systems where personal userids are being used. Make sure not to
forget client 000.
Best
practice

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.

The following steps explain how to do this:


1. Logon to each client for which a user export needs to be made (client dependent).
2. Go to transaction SCC8 (=Client export).
3. Select profile SAP_USER (=User master records and authorisation profiles).
4. Select target system. Syntax: <target_SID>.<CLIENT>. Preferable the client youre exporting from.
Example syntax: QA2.400 (or QA2 in case the transport system doesnt accept a client to be
filled in).

5. Schedule as background job.


Menu: Client copy -> Schedule as background job (Shift+F6).
In case you encounter the following error-messages (see below) do NOT proceed since the contents
of the user-export will miss data (although the user-export completes normally).

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

8. In order to release the background job:


Click on the button Immediate, click on the button Check, click on button Save.
Select as follows:

Click on Save button.


Important

Do not fill in an output device and spool options, since your goal is to print NOTHING.

9. Click on Continue button three times (see below).


Message: Define a printer
Action: Press Enter key to continue
Message: Format set to 'X_65_132'
Action: Press 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

Message: The background job was successfully scheduled.


You can see the result via transaction SCC3.
Action: Press Enter key to continue
Important

The transports created for the user master data are released AUTOMATICALLY!

10. Use transaction SCC3 to check status of export.


Click button All clients. Click button Exports. Double click the client youre exporting from.
The list of exports is sorted on date and time. View the correct export by double clicking on it.
Important

During the export a temporary logfile is created in /usr/sap/<??>trans/tmp. The


logfile is deleted upon completion of the export. Ensure the export is completed
before you continue:
adm> cd /usr/sap/<??>trans/tmp
adm> ls altr
(to sort
adm> tail f <name_export>.log

files with latest on the bottom)

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

Step 10 Save SAP printer definitions


Before the refresh, the SAP printer definitions must be exported on the target SAP system. Since the
printer definitions are client INdependent you only have to export them once.
THIS STEP IS NOT NEEDED FOR WML. The same production printers are used in the QA systems.
The following steps explain how to do this:
For SAP release 3.1x

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 directory data exists. If not, create it.

adm> mkdir data


adm> cd /usr/sap/<??>trans/bin
adm> R3trans w <target_SID>_exp_printers.log <target_SID>_exp_printers.ctl

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

Check that the timestamp of the data-file is of the current day.

For SAP release >= 4.x


1. Go to transaction SPAD.
2. Click on button Output devices.
3. Go to change mode
(F8).

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:

Edit -> Transport -> Transport all


Message: **** Device definitions MUST be processed in the target system ***

Action: Press Enter key.


5. Create new request
(F8).
6. Enter Short description with following syntax: <yyyymmdd>/<initials>/<description>
Example: 20030210/SK/Refresh QA2: Printer definitions
Enter Target SAP system: <target_SID>
7. Press Enter key to save.
8. Write down the transport number in the attached Checklist.
9. Press Enter to continue.
10. Go to transaction SE03, select
and press button Execute (F8). Fill in
<target_SID>K* for Request/task, your login-user-id for Owner and tick all check boxes.
11. Release the transport.
12. Check that the transport exists on Unix-level in directories:
/usr/sap/<??>trans/data
for the corresponding data file and
/usr/sap/<??>trans/cofiles
for the corresponding cofile.
Important

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

Step 11 Save RFC definitions and other customer specified tables


Before the refresh, the RFC definitions and other customer specified tables must be exported for each
client on the target SAP system; so for client 000 and each customer-client.
Before the tables-export, check that the tables specified in the export-control-file /usr/sap/<??
>trans/bin/<target_SID>_exp_tables<clt>.ctl (on the target system) are the same as the tables
specified in the NLW-SAP-2011 SAP Refresh template (which you received from the customer).
Note

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

Some customer-specified-tables contain NO data (and are empty). To ensure


consistency throughout the landscape these tables are not deleted from the export
control file; since no harm can be done to the SAP system.

adm> cd /usr/sap/<??>trans/bin

Check that data directory exists, if not create it.

adm> mkdir data


adm> R3trans w <target_SID>_exp_tables<clt>.log <target_SID>_exp_tables<clt>.ctl

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

This uses the commands in <target_SID>_exp_tables<clt>.ctl and writes the log to


<target_SID>_exp_tables<clt>.log.
Make sure that the data file <target_SID>_tables<clt>.dat has been created in directory:
/usr/sap/<??>trans/bin/data

4.5

Step 12 Save SAP license details


Before the refresh, save the SAP license details on the target SAP system.
Important

In the newest SAP systems more licenses are necessary for the different parts
(meaning dual stack SAP systems).

For release <= WAS 6.40

adm> saplicense show > show_saplicense

Example output:

LICENSE system: I38 hardware key: X1151018099 expiration_date: 99991231


installation no: 0220031315 key: 3LZDLWJS1RO2YGRGHGYAJV4O
userlimit: 0 productid: R3_ORA
*** license useable ***

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:

saplicense: HARDWARE KEY = X1151018099

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

Step 13 Save Logical system names for all relevant clients


Before the refresh, save the logical system names for each client on the target SAP system.
1. Go to transaction SCC4.
2. Write down the settings for client 000 and all customer clients.
3. Check and write down entries in BD54 (logical system names)
Best
practice

4.7

Make screenshots of your pc-screen (Alt+PrintScrn) and paste them in your Word
document.

Step 14 Save trusted and trusting rfcs


Before the refresh, save the trusted/trusting rfcs on the target SAP system
1.
2.
3.
4.

Go the transaction SM59


Choose Extra and select both Trusted systems and Trusting systems
Make screenshots of both of them
Also make sure you save screenshots of the details by clicking on each entry

An example screenshot of trusted systems in 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

An example screenshot of trusting systems in WMA:

4.8

Step 15 Save Operation modes


Before the refresh, save the operation modes on the target SAP system.
1. Go to transaction RZ04.
2. Write down the settings for the the Operation modes and their settings; meaning the number of
processes per process-type.
Best
practice

4.9

Make screenshots of your pc-screen (Alt+PrintScrn) and paste them in your Word
document.

Step 16 Save Logon groups and Server groups


Before the refresh, save the logon groups and server groups on the target SAP system.
1. Go to transaction SMLG.
2. Write down the settings of the Logon groups.
3. Go to transaction RZ12.
4. Write down the settings of the Server groups.
Best
practice

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

17 Safe entries in qRFC monitor

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

Step 18 Save EDI port definitions


Before the refresh, save the EDI port definitions for each client on the target SAP system.
1. Go to transactions WE20, WE21 and RSA1.
2. Write down the settings for all customer clients; where the target system is mentioned in the
paths. Especially pay attention to all directory-paths under the tree-node File in transaction
WE21.
Best
practice

4.12

Make screenshots of your pc-screen (Alt+PrintScrn) and paste them in your Word
document.

Step 19 Save Latest transport-number


Before the refresh, save the latest transport-number (for Development and Project SAP systems) on
the target SAP system.
Check schema user
ora> env|grep -i schema

Example output:

dbs_ora_schema=SAPR3

Retrieve latest transport-number

ora> sqlplus /as sysdba


SQL> select * from <dbs_ora_schema>.e070l;

Example output:

LASTNUM TRKORR
---------- -------------------TRKORR
DEDK909903

4.13

Step 20 Save Transport Management System (TMS) transport routes


Before the refresh, save the Transport Management System (TMS) transport routes for the target SAP
system.
1. Go to transaction STMS in client 000 of the target SAP system.
2. Menu: Overview -> Transport routes (Shift+F7).
3. Write down the settings for the Transport Management System (TMS) transport routes.
Best
practice

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

Step 21 Switch Transport Management System (TMS) domain controller


Before the refresh, switch the Transport Management System (TMS) domain controller in case the
target system you are going to refresh is currently the domain controller in a two/three-or-more
system-transport-landscape. No switch is needed for one-system-transport-landscapes (e.g. Project
SAP systems), which are generally pointing to a virtual system.
1. Go to transaction STMS in client 000 of the backup TMS domain controller.
2. Menu: Overview -> Systems (Shift+F6).
Select the backup domain controller.
3. Menu: Extras -> Activate Backup Controller.
Popup: Activate <SID> as domain controller?
Click Yes button
As a result the backup domain controller becomes the domain controller.
Best
By default the TMS domain controller should be located on the SAP Production system;
practice
since the SAP Production system has a high availability and is less likely to be
refreshed.

4.15

Step 22 Save Secure store settings of the ABAP stack


Before the refresh, this transaction enables you to administer the secure store data of the ABAP stack.
The data before the refresh needs to be compared with the data after the refresh. Deviations need to
be reported to the customer.
1. Go to transaction SECSTORE in client 000 (client independent).

2. Choose Check entries and choose Execute

. A typical output 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

3
f 85a
3.0 oMake

screenshot and note down Red and Yellow flags.

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

Step 23 Java export


Before the refresh, save Java-database-users and Java-data
This step should only be executed when Java is installed on this SAP system. This can be checked by
executing the following query in the database:
ora> sqlplus /as sysdba
SQL> select decode(table_name,'J2EE_CONFIG','Java Installed') "Java"
from dba_tables where table_name = 'J2EE_CONFIG';

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

Step 23 Java export: Save Java user privileges


1. First get and save the <java_user>, the <java_tablespace> and the <java_tablespace_size> from
the database (execute command exactly as described below):
SQL> select a.username "<java_user>", a.default_tablespace "<java_tablespace>", b.tbssize "<java_tablespace_size>"
from dba_users a,
(select sum(bytes)/1024/1024 tbssize
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_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

---------------- ------------------ ---------------------SAPJVADB


PSAPJVADB
6000

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

CC for the latest version of this script)

Enter a username or something the username contains:


Press <ENTER> button
Enter the number of the user you want to look up ( q to quit ): For all three users below:
OPS$JVAADM (if exists)
OPS$SAPSERVICE<target_SID> (if exists)
<java_user>
Do you want to save the grants to other users on the tables of <java-user> ( y | n ) ?
y
Result: File "restore_grants_on_tables_<java_user>.sql" is created on OS-level.
Do you want to create a file to recreate this user later ( y | n ) ?
y
Result: File "recreate_user_<java_user>.sql" is created on OS-level.
Do you want to lookup another user ( y | n ) ?
n

4.16.2

Step 23 Java export: Export Java owner and objects


To export the Java owner and object the following script should be executed (fill in the data gathered
in previous steps):
ora> nohup exp userid=system/<see-password-tool> owner=<java_user> statistics=none \
file=/usr/sap/<??>trans/refresh/<java-user>.dmp \
log=/usr/sap/<??>trans/refresh/<java_user>_exp.log

Example command:

ora> nohup exp userid=system/<see-password-tool> owner=sapjvadb statistics=none \


file=/usr/sap/nwtrans/refresh/sapjvadb.dmp \
log=/usr/sap/nwtrans/refresh/sapjvadb_exp.log

4.17

Step 24 Save settings BW systems

For BI, BIW and BW-systems ONLY


Before the refresh, save the settings for starting the Planning Modeler for Business Intelligence (BI),
Business Intelligence Warehouse (BIW), Business Warehouse (BW) in the following way:
1. Go to transaction RSPLSA.
2. Write down the right URL (e.g. Free URL Prefix) for starting the planning modeler.

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

Save certificate settings

For WRA ONLY

Important

The HR certificates must be available on Operating System (OS-)files OR on the


Atos Origin network.

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

Step 26 Place SAP system message


Note

Placing an SAP system message often is done by the customer.


If so, skip this step.

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

HANDOVER OF SYSTEM FROM CUSTOMER TO US


Step 27 Inform Officer-of-the-Day

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

SOURCE SAP SYSTEM ON TARGET HOST

6.1

Step 28 Check that the customer-requested backup is usable

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)

In case you use one of the files init<source_SID>.utl.offline or


init<source_SID>.utl.full; copy this file instead of init<source_SID>.utl.

Step 30 Retrieve redo logs and recover-until-timestamp


Important

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

Number of redologs to restore: 8


Redologs to restore (from-until): 899-906
Backup completion time:
2011-04-04:02:12:49
=========================================================

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

Step 31 Lock transport queue of the target SAP system


Important

1.
2.
3.
4.
5.

6.5

If target SAP system is domain-controller, switch to backup-domain-controller FIRST.


So logon to the backup-domain-controller and activate backup-domain-controller
(pull mechanism).

Logon to the target SAP system.


Go to transaction STMS.
Menu: Overview -> Imports (F5).
Go to the import queue of the target SID by double clicking on it.
Menu: Queue -> Close (Ctrl+F1).

Step 32 Disable monitoring


Disable the monitoring of the target SAP system

ora> cd /appl/sap/bin
ora> SSD-monitor -h 48 <target_SID> stop <ticket> Refresh <target_SID> from <source_SID>

6.6

Step 33 Disable backups


Run the following commands to disable all backups for this system:
ora> /appl/sap/bin/SSD-backup -h 200 <target_SID> disable archive
ora> /appl/sap/bin/SSD-backup -h 200 <target_SID> disable offline
ora> /appl/sap/bin/SSD-backup -h 200 <target_SID> disable online

6.7

Step 34 Check if backup or archive is running


Check if a backup or archive run is running:

adm> ps ef | egrep brbackup | brarchive | backint | grep <target_SID>

If a backup or archive run is running, kill it with the following commands:


adm> SSD-backup kill <target_SID> [offline | online | archive ]

or
adm> kill <processnumber>

(repeat this for all running processes)

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

Generate target SAP system cleanup database script

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

The above script generates the /oracle/<target_SID>/refresh/doit_<target_SID>


script.
Check in the script that all target SAP-specific file systems are included.
By viewing /oracle/<target_SID>/refresh/doit_<target_SID>. It is vital that the
target SAP system is cleaned properly before the restore.

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

Step 37 Stop Oracle listener of the target SAP system


Important

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.

ora> lsnrctl stop


ora> ps ef | grep lsnrctl

6.11

(check all processes have been stopped)

(stop listener)
(check listener has been stopped)

Step 38 Spool all archives to tape


To be able to restore the target system later on, all the generated archive logfiles on the target
system should be spooled to tape.
First determine which utl_file(s) should be used to write the archived log files to tape:
ora> cat /appl/sap/etc/SSD-backup_<target_SID>.conf | grep "^BACKUP_ARC_" | grep "params"

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

Step 39 Save backup, archive and alert logfile


To be able to restore the system later on, all the current version of the archive and alert logfile should
be spooled to tape:
ora>
ora>
ora>
ora>

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

Step 40 Stop OS-collector of the target SAP system


Important

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

(stop OS- collector)


(check OS-collector has been stopped)

Step 41 Remove the target SAP system database using generated script
ora> cd /oracle/<target_SID>/refresh
ora> ./doit_<target_SID>

Important

Check that the deletion has been successful.


Cleanup if it has not!

Check success of deletion with the following commands:


ora> find /oracle/<target_SID> name *.data* 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 *.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

Step 42 Create softlink(s) from <source_SID> to <target_SID>

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

The following input is requested by the script:


Enter the target system, meaning the system to be refreshed
Enter the target system: <target_SID>

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>

This script will perform the following checks:


Check if the entered target system exists

ERROR: The target system <target_SID> does not exist

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>

Check if directory /oracle/<source_SID> on the target host exists, and try to


create it

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

ERROR: Directory /oracle/${SOURCE} cannot be created


Correct this and run this script again

Check if directory /oracle/<source_SID> on the target host is writable


ERROR: Directory /oracle/${SOURCE} is not writable for user ora<target_sid>
Correct this with:
puid> sudo chown ora<target_sid> /oracle/<source_SID>
ora> chmod 775 /oracle/<source_SID>
Now run this script again.

Check if directory /oracle/<source_SID> on the target host is empty and try to


make it empty
ERROR: Directory /oracle/${SOURCE} is not empty
Correct this and run this script again

Check if the entered backup logfile exists


ERROR: The backup logfile /oracle/<target_SID>/sapbackup/<backup logfile>
does not exist

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>

This script will perform the following actions:


Create directory /oracle/<source_SID>
Remove all files from directory /oracle/<source_SID>
Create softlinks for directories and filesystems mirrlogA, mirrlogB, origlogA,
origlogB, sapreorg, saparch, oraarch, sapcheck, sapbackup, saptrace and all
sapdata filesystems and the ORACLE_HOME mentioned in the backup logfile
Linking /oracle/<source_SID>/<FS> with /oracle/<target_SID/<FS> ...

Execute the following script to create the links:


ora> cd /oracle/<target_SID>/refresh
ora> ./create_refresh_links.ksh

Example output:

Enter the target system: DED


Enter the source system: DEP
Enter the name of the source backup logfile (/oracle/<target_SID>/sapbackup/): bfdghdva.anf
Creating links...
Linking /oracle/<SOURCE_SID>/mirrlogA with /oracle/<TARGET_SID>/mirrlogA ...
Linking /oracle/<SOURCE_SID>/mirrlogB with /oracle/<TARGET_SID>/mirrlogB ...
Linking /oracle/<SOURCE_SID>/origlogA with /oracle/<TARGET_SID>/origlogA ...
Linking /oracle/<SOURCE_SID>/origlogB with /oracle/<TARGET_SID>/origlogB ...
Linking /oracle/<SOURCE_SID>/sapreorg with /oracle/<TARGET_SID>/sapreorg ...
Linking /oracle/<SOURCE_SID>/saparch with /oracle/<TARGET_SID>/saparch ...
Linking /oracle/<SOURCE_SID>/oraarch with /oracle/<TARGET_SID>/oraarch ...
Linking /oracle/<SOURCE_SID>/sapcheck with /oracle/<TARGET_SID>/sapcheck ...
Linking /oracle/<SOURCE_SID>/sapbackup with /oracle/<TARGET_SID>/sapbackup ...
Linking /oracle/<SOURCE_SID>/saptrace with /oracle/<TARGET_SID>/saptrace ...
Linking /oracle/<SOURCE_SID>/102_64 with /oracle/<TARGET_SID>/102_64 ...
Linking /oracle/<SOURCE_SID>/sapdata1 with /oracle/<TARGET_SID>/sapdata1 ...
Linking /oracle/<SOURCE_SID>/sapdata2 with /oracle/<TARGET_SID>/sapdata2 ...
Linking /oracle/<SOURCE_SID>/sapdata3 with /oracle/<TARGET_SID>/sapdata3 ...
Linking /oracle/<SOURCE_SID>/sapdata4 with /oracle/<TARGET_SID>/sapdata4 ...
Linking /oracle/<SOURCE_SID>/sapdatat with /oracle/<TARGET_SID>/sapdatat ...

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

For database copies on separate hosts, proceed with this step.


ora> setenv ORACLE_SID <source_SID>
ora> env | grep ORACLE_SID

Critical

6.17

(set in each active Unix screen)


(to check that environment variable is set)

Only for database copies on the same host; skip this step.
For further explanation see chapter 15.

Step 44 Begin actual restore on target host


During the restore warning messages may come up. Messages like the following can be ignored, since
the files are restored on the target SAP system, but the SAP system still thinks its the source.
Message:

BKI4000W: The attributes of file '/oracle/QA2/sapdata22/btabi_109/btabi.data109' cannot be restored.


Reason: errno(1) Operation not permitted.

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!

For database copies on separate hosts, proceed with this step.


To make the brrestore possible, the init<Source>.utl file on the QA system must have the following
lines:
CvInstanceName
Instance001
CvClientName
<QA hostname>
srcCrossclient
<Prod hostname>.wml.nl
If not in the file, add them. For WMA, the initWMP.utl for example, looks like this:
switch_sem /oracle/WMP/sapbackup/.switch.sem
switch_log /oracle/WMP/sapbackup/.switch.log
sort_backup_type size
drives 1
CvInstanceName
Instance001
CvClientName
wmacsz01
srcCrossclient

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:

ora> nohup brrestore c b <offline_backup>.aff m full r init<Source>.utl d util_file

For restore of ONline backup:

ora> nohup brrestore c b <online_backup>.anf m full r init<Source>.utl d util_file

To check if the restore is running, the following commands can be used:


Check progress via sapdata-filesystems:
ora> bdf . sapdata? sapdata??

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

Step 45 Change ownerships of restored data-files


puid>
puid>
puid>
puid>
puid>

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

RESTORE SOURCE ORACLE ARCHIVELOG FILES ON TARGET HOST


Important

7.1

Step 46 Prepare restore of redo-log files


Note

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.

You know which redo-logs you need as you ran script


get_offline_or_online_bck_redo earlier in step Step 30 Retrieve redo logs and
recover-until-timestamp.

Step 46 Prepare restore of redo-log files: Redo-logs on disk


If the redo-logs (file type: /oracle/<source_SID>/oraarch/*.dbf) of the source SAP system havent
been archived to tape yet, you can copy them from source to target SAP system via intermediate
directory /usr/sap/<??>trans/refresh
Note for
Tivoli
Storage
Manager
(TSM)

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

(= see if tapes are mounted)


(= see if sessions are running)
(= see action log)

In case of any problems please contact the Data Storage group.

7.1.2

Step 46 Prepare restore of redo-log files: Redo-logs on tape


Normally most redo-logs have been archived to tape. File arch<source_SID>.log knows the storage
location of these redo-logs.
Youve already copied this file to the target SAP system earlier.

7.2

Step 47 Restore of redo-logs


ora> cd $ORACLE_HOME/dbs
ora> nohup brrestore c a <first redolog file number>-<last redolog file number> -r <utl file>

Note

In case you use one of the files init<source_SID>.utl.offline or


init<source_SID>.utl.full; copy this file instead of init<source_SID>.utl.

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

Step 48 Change ownerships of restored data-files


puid> sudo chown -R ora<target_sid> /oracle/<target_SID>/oraarch
puid> sudo chown -R ora<target_sid> /oracle/<target_SID>/saparch

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

Recover the database to the recover-until-timestamp

Important 1

Confirm that environment variable ORACLE_SID is set to the source SAP system for
each Unix session you are using.
Check :
Correct:

ora> env | grep ORACLE_SID


ora> setenv ORACLE_SID <source_SID>

ora> sqlplus /as sysdba


SQL> startup mount
(spfile<source_SID>.ora
SQL> recover database using backup controlfile until time YYYY-MM-DD:HH:MM:SS;

is read with proper controlfiles)

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

Step 50 Reset redolog sequence


Reset the redo log sequence, so that the first redo-log created for <target_SID> has number 1.
SQL> alter database open resetlogs;
(this may take 5 minutes to complete)
SQL> shutdown immediate

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

(gives the count #)


(# of times the log files as displayed above)

The shutdown immediate and exit mentioned above are essential!

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

RENAME RESTORED SAP SYSTEM


Step 51 Create backup of control-file; create trace-file

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.

For database copies on separate hosts, first read the following:

Confirm that environment variable ORACLE_SID is set to the source SAP system for
each Unix session you are using.
Check :
Correct:

ora> env | grep ORACLE_SID


ora> setenv ORACLE_SID <source_SID>

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

(required to generate the rebuild script later)

Find the correct trace file:

ora> ls -altr /oracle/<target_SID>/saptrace/usertrace/<source_sid>_ora_*.trc | tail 1

Check for errors in trace-file

ora> more /oracle/<target_SID>/saptrace/usertrace/<source_sid>_ora_<process_id>.trc

Important

8.2

Resolve errors before continuing.

Step 52 Copy tracefile to create_new_db_<target_SID>.sql script


ora> cd /oracle/<target_SID>/saptrace/usertrace
ora> ls altr
(the last .trc file on the list is the
ora> cp p <source_SID>_ora_<pid>.trc /oracle/<target_SID>/refresh/create_new_db_<target_SID>.sql

one you require)

Now remove all lines from /oracle/<target_SID>/refresh/create_new_db_<target_SID>.sql after the


last presence of -- Other tempfiles may require adjustment.
Example: All lines in red below should be removed
...
ALTER TABLESPACE PSAPTEMP ADD TEMPFILE '/oracle/SKP/sapdatat/temp_1/temp.data1' REUSE;
-- End of tempfile additions.
--- End of tempfile additions.
-*** 2011-04-04 15:14:58.549
ksukia: Starting kill, force = 0
ksukia: killed 0 out of 0 processes.
*** 2011-04-04 15:15:09.862
*** 2011-04-04 15:15:09.862 64213 kcrr.c

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

Make sure you have created file create_new_db_<target_SID>.sql, because this


exact name is used in the database-rename-script generate_new_sap_db to
rename the database (later on).
Has the database-rename-script run with an incorrect sql-file, you will have to
recover the database anew, since these changes are irreversible!

8.3

Step 53 Reset ORACLE_SID environment variable

Critical!!!

For database copies on the same host, this step can be skipped.
For database copies on separate hosts, proceed with this step.

ora> env | grep ORACLE_SID


ora> setenv ORACLE_SID <target_SID>
ora> env | grep ORACLE_SID

8.4

(check that variable is target system)


(if not, set environment variable)
(check that variable is target system)

Step 54 Rename database: Create a new empty configuration file


Script generate_new_sap_db is currently available for Oracle 10 and lower.
Important 1

generate_new_sap_db

= the script to create the new database


= located in: /oracle/<target_SID>/refresh

.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

Correct example output:


Version of this script is 20040129
Config file /oracle/<target_SID>/refresh/.generate_new_sap_db doesn't exists, created an empty config file
Please adapted the config file and restart this script again

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

Step 55 Rename database: Set parameters in new empty configuration file


.generate_new_sap_db
Set parameters in configuration file /oracle/<target_SID>/refresh/.generate_new_sap_db according
the settings specified by the customer in the NLW-SAP-2011 SAP Refresh template:
ora> cd /oracle/<target_SID>/refresh
ora> vi .generate_new_sap_db

Note 1

( there is a dot at the start to show this is a configuration file)

To change all TrT to <target_SID> type in the following command in vi:


:g/TrT/s//<target_SID>/g

Note 2

To change all SrC to <source_SID> type in the following command in vi:

CRITICAL

Make absolutely sure that the System Instance parameter (INSTAN) is correct!
Check in SAP logon.

:g/SrC/s//<source_SID>/g

Example parameters in config file /oracle/<SID>/refresh/.generate_new_sap_db :


# This file is generated by script version on 20021029#103533
PARVER = 20020729
# target sid
TRTSID = QA2
# source sid
SRCSID = PR2
# perform a database verify, (Yes / No)
DO_DBV = N o
# tracefile of Oracle command alter database backup controlfile to trace;
# (filename with the info needed to rebuild the database)
TRCFIL = /oracle/QA2/refresh/create_new_db_QA2.sql
# start maximum number of parallel session for the database verify, ( 1 until 2 x cpu's)
MAXDBV = 1
# should the database verify (dbv) started with nice, lower load for system, (Yes / No)
DBVNCE = Yes
# should catalog.sql + catproc.sql be executed after db rebuild, (Yes / NO)
DBXCAT = Yes
# create the users ops$... and delete old useris's, (Yes / No)
OPSUSR = Yes
# cleanup history/statistics tables (Yes / No)
CLNSTS = Yes
# delete SAP profiles/ Oracle parameter (+history) tables (Yes / No)
CLNPAR = Yes
# cleanup spooling/TemSe/ABAP-dumps tables (delete/trucate), (Yes / No)
CLNOTH = Yes
# delete all saplicenses, (Yes / No)
CLNMLI = Yes
# cleanup Batch InPut tables ( Yes / No )
CLNBIP = Yes
# Rename printer spool host to target CI, (Yes /No)
RENPRH = Yes
# target instance number for printer spool host, (between 00 and 99)
INSTAN = 00
# Create new system message that the DB is a copy of SRCSID + date of db copy,
# (Yes / No)
SESYME = Yes
# What todo with the batchlog tables, Truncate, Cleanup + norun, Norun, No cleanup,
# (Truncate / Cleanup / Norun / No)
BTCHTB = Cleanup
# truncate BTCCTL table, sapevent trigger table
BTCCTL = Yes
# Oracle archive mode, (On / OFF)
ARCHIV = On

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

# Post action scriptname, (script filename)


PSTSCR = /oracle/QA2/refresh/post_generate
#
# next parameters only needed for full automated restore in test fase.
# the script is sapmgr@abin/rebuild_db/build_new_sap_db.
# should a brrestore be performed, (Yes / No / Flash)
BRREST = No
# brbackup file to be used for restore OR script do a flash copy
# script should be in sapbackup directory, (filename of backup log)
BRREFL = bdfhlfjp.aff
# parameterfile for option -p in brrestore, (filename of sap backup config)
BRRPAR = initKkK.sap
# hostname of source system
SRCHST = nlxxxxxx
# Delete / clean database on target system (Yes / No)
CLNTRT = No

Critical!!!

For database copies on the same host, also perform the following:

1. Manually add additional parameter "SRCTRT = Yes" to top of configuration file


".generate_new_sap_db".
ora> cd /oracle/<target_SID>/refresh
ora> vi .generate_new_sap_db

( there is a dot at the start to show this is a config file)

2. Manually change parameter "TRCFIL" to


"TRCFIL=/oracle/<target_SID>/refresh/create_new_db_<target_SID>.sql"

Example parameters in configuration file /oracle/BS5/refresh/.generate_new_sap_db :


# This file is generated by script version on 20100211#112714
SRCTRT = Yes
PARVER = 20040129
# target sid
TRTSID = BS5
# source sid
SRCSID = BD5
# perform a database verify, (Yes / No)
DO_DBV = No
# tracefile of Oracle command alter database backup controlfile to trace;
# (filename with the info needed to rebuild the database)
TRCFIL = /oracle/BS5/refresh/create_new_db_BS5.sql

8.6

Step 56 Rename database: Execute script generate_new_sap_db to rename the SAP


system

CRITICAL

### POINT OF NO RETURN ###


Make sure that all configuration settings are correct. Take your time !

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

we do not want a recovery:


Messages

ORA-00283: recovery sessions canceled due to errors


ORA-01610: recovery using BACKUP CONTROLFILE option must be done
ORA-01649: operation not allowed with a backup controlfile

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

Monitor this process for success/errors by doing the following:

ora> tail -f /oracle/<target_SID>/saptrace/background/alert_<target_SID>.log

Critical!!!

For database copies on the same host, check the following:

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

Step 57 Check and add tablespace PSAPTEMP


Important

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.

Check that tablespace PSAPTEMP uses one or more tempfile(s):


ora> sqlplus /as sysdba
SQL> select file_name, tablespace_name from dba_temp_files;

If not, do the following:


a) Check that the location of the tempfile(s) exist(s).
If not, create directory
ora> mkdir /oracle/<target_SID>/sapdata?/temp_1
(retrieve location from source SAP backup)
b) Create tempfile:
Note
Background:
Tempfile(s) of tablespace PSAPTEMP should have their actual-total-used-size allocated
and displayed within its sapdata-filesystem, and should not display empty files which
can grow to the configured size.
Problem description:
In case the tempfile(s) display(s) a size of 0 (=zero/null) their maximum allocate-able
size is not in-use leaving more space for script " SSD-oratbsp" to extend to a configured size
(usually 97%). When a tempfile grows, the sapdata-filesystem can become 100% full, resulting in
an incident ticket.

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).

ora> sqlplus /as sysdba


SQL> create tablespace DUMMY
datafile '/oracle/<target_SID>/sapdatat/temp_1/temp.data1' size xxxxM;
SQL> drop tablespace DUMMY including contents;
SQL> alter tablespace PSAPTEMP add tempfile '/oracle/<target_SID>/sapdatat/temp_1/temp.data1' reuse;
SQL> alter database default temporary tablespace PSAPTEMP;
SQL> exit

9.2

Step 58 Correct Oracle BSL settings


After the refresh, some Oracle BSL settings are overwritten and have to be corrected.
Execute the following script to correct the Oracle database BSL settings:
ora> cd /oracle/<target_SID>/refresh
ora> ./correct_bsl_settings.ksh

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

Step 59 Start Oracle listener


ora> lsnrctl start
ora> ps ef | grep lsnr

Note

9.4

Check that the listener has started correctly by checking the output that is displayed
on screen.

Step 60 Check connection to database is ok


adm> cd /usr/sap/<??>trans/bin
adm> rm trans.log
adm> R3trans d

This should return the following message:


This is R3trans version 6.05 (release 46D - 27.10.04 - 13:52:00).
R3trans finished (0000).

9.5

Step 61 Java import


This step should only be executed when Java is installed on this SAP system. This can be checked by
executing the following query in the database:
ora> sqlplus /as sysdba
SQL> select decode(table_name,'J2EE_CONFIG','Java Installed') "Java"
from dba_tables where table_name = 'J2EE_CONFIG';

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

Step 61 Java import: Remove source Java stack


First get <the source_java_user> and the <source_java_tablespace> from the database:
SQL> select username "<source_java_user>", default_tablespace "<source_java_tablespace>"
from dba_users
where username = (select owner from dba_tables where table_name = 'J2EE_CONFIG');

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;

Manually remove the source-directory of the source-datafile on OS-level if necessary.

9.5.2

Step 61 Java import: Recreate Java tablespace and users

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:

ora> mkdir /oracle/CAQ/sapdata2/jvadb_1


SQL> sqlplus /as sydba
SQL> CREATE TABLESPACE PSAPJVADB DATAFILE
'/oracle/CAQ/sapdata2/jvadb_1/jvadb.data1' size 6000M reuse
extent management local autoallocate ONLINE;

2. Recreate the java users as saved in paragraph 4.16.1 point 3.

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

Run the following scripts in sqlplus:


ora> sqlplus /as sysdba
@recreate_user_OPS_JVAADM.sql

9.5.3

(if exists)
(if exists)

@recreate_user_OPS_SAPSERVICE<target_SID>.sql
@recreate_user_SAPJVADB.sql

Step 61 Java import: Import Java owner and objects


1. Reset the password of the system user to the original value:
SQL> alter user system identified by <see-password-tool>;

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

Step 61 Java import: Restore grants

Recreate the java users as saved in paragraph 4.16.1 point 3.


ora> cd /oracle/<target_SID>/refresh

Run the following scripts in sqlplus:

ora> sqlplus /as sysdba


@restore_grants_on_tables_OPS_JVAADM.sql

9.6

@restore_grants_on_tables_OPS_SAPSERVICE<target_SID>.sql

(if exists)
(if exists)

@restore_grants_on_tables_SAPJVADB.sql

Step 62 Delete RFC connections and other tables


Check schema user
ora> env|grep -i schema

Example output:

dbs_ora_schema=SAPR3

Create script to delete all entries in specified tables


ora> cd /usr/sap/<??>trans/bin
ora> vi <target_SID>_cleanup_tables.sql
ora> chmod 444 <target_SID>_cleanup_tables.sql

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:

delete from <dbs_ora_schema>.<table-name>;


and-so-on

Execute script

ora> sqlplus /as sysdba

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

Step 63 Import exported RFC connections


Create the import parameter file <target_SID>_imp_tables<clt>.ctl.
EXAMPLE of
ctl-file:

########################################
# RFC/EDI/TBDLS import
########################################
import
client = <client-number>
file = "/usr/sap/<??>trans/bin/data/<target_SID>_tables<client-number>.dat"

Import the RFC connections:

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

Step 64 Set to latest transport-number


Update the current database to the latest transport-number which has been saved before the refresh
in Step 19 Save Latest transport-number, increased by 1.
Check schema user
ora> env|grep -i schema

Example output:

dbs_ora_schema=SAPR3

Update to latest transport-number

ora> sqlplus /as sysdba


SQL> update <dbs_ora_schema>.E070L set TRKORR = <transport-number+1> where LASTNUM = TRKORR;
SQL> commit;
SQL> exit;

Example output saved before refresh:


LASTNUM TRKORR
---------- -------------------PROJECT DED_P00007
TRKORR
DEDK909905

Example update-command:

update sapr3.e070l set trkorr = DEDK909906 where lastnum = TRKORR;

Example output after updating transport-number:


LASTNUM TRKORR
---------- -------------------PROJECT DED_P00007
TRKORR
DEDK909906

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

Specify your SAP System ID:


SAP SYSTEM ID = MCQ
Specify your hardware key:

HARDWARE KEY = D0413031492


Specify your installation number:
INSTALLATION NO = 0020178366
Specify your expiration date:
EXPIRATION_DATE [YYYYMMDD] = 99991231
Specify your license key:
LICENSE_KEY 1...5....0....5....0...4
LICENSE_KEY = 3FTXXNSRYK986SA7TSHPXSYU
saplicense: License successfully installed

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

Step 66 Start newly refreshed target SAP system


adm> cd /appl/sap/bin
adm> SSD-sap <target_SID> start

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

Step 68 Check sapcheck-file


Note

Script /appl/sap/bin/SSD-oradbcheck which uses the brconnect-command normally


runs every day. So this step can be skipped, to save time.

ora> brconnect u / -f check


ora> /appl/sap/bin/SSD-oradbcheck <target_SID>

Read through .chk output noting any errors.


ora> cd /oracle/<target_SID>/sapcheck
ora> more <name_latest_checkfile>.chk

9.13

Step 69 Check oracle trace-file


ora> sqlplus /as sysdba
SQL> alter database backup controlfile to trace;
SQL> exit

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.

In case there are errors, check for invalid objects:

ora> sqlplus /as sysdba


SQL> select count(*) from dba_objects where status = 'INVALID';

Solution for found invalid objects:


Run script:

SQL> $ORACLE_HOME/rdbms/admin/utlrp.sql

9.14

Step 70 Lock users


For each customer there are different agreements regarding the locking of personal userids for each
customer client.

Customer specific => WML ALWAYS


WML locks users. Inform that that system is available for user locking.

Customer specific => DSM ALWAYS


ora> cd /oracle/<target_SID>/abin
ora> DSM-lock-users -c all -t <ticket> -l 2

(= lock-session 2)

Example:

ora> DSM-lock-users -c all -t UKC1234567 l 2

For script-details:

ora> DSM-lock-users -help

Customer specific => Philips Lighting ALWAYS


1. Logon to the target SAP system and perform following actions for each customer client.
2. Go to transaction ZLCK.
3. Fill in:
User group : *
4. Menu: Program -> Execute (F8).
5. Press button Lock.

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

1. Logon to client 000.

2. Execute following transactions:


SICK
SM51+SM50 (for CI and Application servers)
ST22
SM21
(if applicable ZDIR)

9.16

Step 72 Migration secure store of the ABAP stack


Starting from SAP 7.0 systems, the secure store of the ABAP stack needs to be migrated after a system
refresh. For more information, read SAP Note 816861.
For releases starting from SAP 7.0 systems
1. Go to transaction SECSTORE in the TARGET system in client 000.

2. Choose Check entries and press button Execute. A typical example is shown in the next figure:

3. Go to SAP Marketplace through URL http://service.sap.com/migrationkey logging on with the


customer account for which you are refreshing the system.
4. Request migration key via Request Migration Key button. Fill in the installation number, the source
SID and the target SID. As a result you will see the following screen. See 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. 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

Step 73 Activate/check instance profiles


1.
2.
3.
4.
5.

Logon to client 000.


Go to transaction RZ10.
Check if old profiles exist. If so, delete them all.
Menu: Utilities -> Import profiles -> Of active servers
Although the instance profile has not been changed by the refresh, it should be checked on errors
and be corrected if necessary:
adm> cdpro
(directory: /sapmnt/<target_SID>/profile/ )
adm> ls l
adm> sappfpar check pf=<profile_name> | more

9.18

Step 74 Transport Management System configuration: Post installation processing


For R/3 releases 4.x and higher
1. Logon to client 000.
2. Go to transaction SE06.
3. Select option Database copy or migration.
4. Select button Post-installation processing.
Do you want to reinstall CTO/CTS? Single system settings set
Source system of dbcopy
Change originals from <source> to <new>?
Delete TMS configuration?
Delete old versions of transport routes?

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

Step 76 Transport Management System configuration: Re-distribute TMS configuration from


domain controller
1. Log on to the domain controller in client 000.
2. Go to transaction STMS.
3. Menu: Overview -> Transport routes (Shift+F7)
Or click button Transport routes
4. Menu: Configuration -> Display<->Change (F5)
Or click button Display<->Change
5. Slightly reposition one of the system boxes (this will force the configuration to be redistributed)
6. Menu: Configuration -> Save (Ctrl+S)
Or button Save
7. Fill in short description, syntax: Updated STMS configuration/<initials>/<yyyymmdd>

8. Menu: Configuration -> Distribute and activate (F8) -> Yes (to distribute and activate configuration
across all systems).

Important 1
Important 2
Important 3

9.21

Make sure that the configuration is complete.


If the distribution and activation was done incompletely, redistribute again!
Before continuing, ensure that all transports in the transport queue of target SAP
system contain a destination client!
Before continuing, when the target SAP system uses TMS QA approval, check out note
397138 for additional actions.

Step 77 Unlock transport queue for the target SAP system


1.
2.
3.
4.
5.

Logon to client 000.


Go to transaction STMS.
Menu: Overview -> Imports (F5).
Go to the <target_SID> import queue by double clicking on it.
Menu: Queue -> Open (Ctrl+F2).

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

the transport queue must have a target/destination client assigned.


You can only open the transport queue if all transports in the transport queue of the
target SAP system point to a destination client.

9.22

Step 78 Setup Workload analysis


Enlarge the default settings for reporting purposes (read: SMONI).
For releases R/3 4.6C and higher
1. Go to transaction ST03N.
2. Press button Expert mode; see dropdown under "Administrator".
3. 4.6C: Follow path: Collector and Performance DB -> Workload collector -> Collector and reorg.
6.20: Follow path: Collector and Performance DB -> Performance database -> Reorganization
7.00: Follow path: Collector and Performance DB -> Performance database -> Monitoring database
-> Reorganization
4. Change the parameters:
- Days = 5
- Weeks = 4
- Months = 3
5. Save these values; e.g. press button Save values.

9.23

Step 79 Cleanup transactional RFC


1. Logon to client 000.
2. Go to transaction SM58.
3. Fill in:
Display period : 01.01.1997 to today
Username
:*
4. Menu: Program -> Execute (F8)
Or button Execute
5. Menu: Logfile -> Reorganize.
6. Fill in:
Date: : 01.01.1997 to today
Destination
:*
User name
:*
Tick ALL check boxes.
7. Menu: Program -> Execute (F8)
Or button Execute

9.24

Step 80 Change the operation modes


First delete all allocated operation modes in timetable.
1. Logon to client 000.
2. Go to transaction RZ04.
3. Menu: Operation mode -> Timetable
4. Choose normal operation mode (used 24 hours).
Menu: Operation mode -> Change (F6).

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. Delete ALL assignments in timetable.


Menu: Operation mode -> Delete assignment (F6).
6. Menu: Operation mode -> Save (Ctrl+S).
Normally only the production systems have operation modes.
All operation modes except DUMMY can be deleted.
1. Go to main screen of transaction RZ04.
2. Delete ALL operation modes with the following steps.
Menu: Operation mode -> Delete (Shift+F2).
In case the customer uses operation modes, as checked earlier, create these operation modes.
1. Go to transaction RZ04.
2. Button Create operation mode(F5) to create the operation mode(s).
3. Double click on the created operation mode.
4. Menu: Settings -> New instances -> Generate

9.25

Step 81 Recreate qRFC monitoring entries


Only applicable to clients WBA-100 and WCA-100:
1. Go to transaction SMQS
2. Delete all qRFC destinations that point to production systems
3. Recreate qRFC destinations for QA systems according to screenshot made in step 17 by clicking
on the Registration button
WBA-100 sceenshot:

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

Step 82 Adapt Unix directories

Customer specific => Philips Lighting ALWAYS


Not needed for WML
1. Logon to client 000.
2. Go to transaction SE38. Fill in program: ZCHPATH
3. Menu: Program -> Execute -> Direct processing (F8).
Or button Execute
4. Fill in:
Old system ID
: <source_SID>
New system ID : <target_SID>
5. Menu: Program -> Execute
Or button Execute

9.27

Step 83 Adapt EDI ports


Check and adjust the EDI ports according the saved EDI port definitions on beforehand for each client
on the target SAP system.
1. Go to transactions WE20, WE21 and RSA1.

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.

Customer specific => Philips Lighting ALWAYS


Not needed for WML
1. Logon to <target_SID> as user SAPMGR on client <T-CLIENT> (client specific).
2. Go to transaction SE38. Fill in program: ZCHEDIPOD
3. Menu: Program -> Execute -> Direct processing (F8).
Or button Execute
4. Fill in:
Old system ID
: <source_SID>
New system ID : <target_SID>
5. Menu: Program -> Execute
Or click button Execute
6. Go to transaction WE21, to check whether the ports have been changed.
Check under Ports -> File.
Double click on one or more ports and check to which system the directories are pointing.
Note

Transport request for program ZCHEDIPOD is DV2K933833.


Program code for program ZCHEDIPOD is:

zchedipod.txt

9.28

Step 84 Define Business Object authorizations

Customer specific => Philips Lighting Luminaires ONLY


Not needed for WML
ora> cd BUSINESS_OBJECTS
ora> sqlplus /as sysdba
SQL> alter user oraldc1 identified by <password>;
SQL>
SQL>
SQL>
SQL>
SQL>
SQL>

SQL> exit

9.29

(the password can be found in the Philips LiBac password-file)

exit
connect sapr3/<password>
@GRAN_SEL_2_LDC1.sql
exit
connect oraldc1/<password>
select table_name from all_tables;

(a list is given of all authorised tables for the oraldc1 userid)

Step 85 Change CRMRFCPAR table

Customer specific => Philips Lighting Luminaires ALWAYS


For WML this is only needed in WRA-client 100
The entries in table CRMRFCPAR refer the RFC connection to the CRM system
(in the Luminaires landscape, the RFC name syntax is CRM<target_SID><client> ).
1. Logon client 100 of the target SAP system.
2. Go to transaction SM30.
3. Maintain table CRMRFCPAR.
Button Maintain
4. Double click on an entry (to go to the details screen).
5. Copy the entry.
Menu: Edit -> Copy as (F6)

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).

7. Press Enter key.


8. Menu: Table view -> Save (Ctrl+S)
Or button Save
9. Go back to the overview screen with button Back (F3)
10. Click on original entry and Go to menu: Edit -> Delete (Shift+F2)
Or button Delete
11. Repeat for each entry in the table.

9.30

Step 86 Delete entries from SMQ1


In WRA-100 and WCA-100, the entries in the qrfc queue have to be deleted with transaction SMQ1.
Start SMQ1 and make a selection for client 100 and press Execute. Select all entries and press the
Delete button (garbage bin).

9.31

Step 87 Conversion of SAP logical system names


Before performing this step, make sure that a logical system name of each target client is
available/exists (on the target SAP system). Check out Appendix B and Appendix C. To improve
performance, also see Appendix C.
1. Logon to each (customer) client on the target SAP system.
2. Go to transaction BDLS.
3. Fill in:
- Old logical system name
: e.g. PR2CL400
- New logical system name
: e.g. PV2CLNT400
- Tick option Conversion of client-dependent and client-independent tables.
- Untick option Test run.
- Untick option Existence check on new names in tables.
- Number of entries per commit :
1.000.000
- Tables to be converted
: <leave empty>
Do not fill in * since no tables will be selected, and the conversion will fail.
Restricting the tables is also possible, but not advisable. For example, define several ranges,
like from TBD00 to TBDTPVT
4. Menu: Program -> Execute (F8).

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

Step 88 Change the client settings in SCC4


In SCC4, change the Description for client 100 to Quality and the Role to Test

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

Step 89 Configuration Logon groups and Server groups


1.
2.
3.
4.

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.

Step 90 Import printers

Not needed for WML as printers were not saved


For releases R/3 4.x and higher
1. Logon client 000.
2. Go to transaction STMS.
3. Menu: Overview -> Imports (F5).
Or button Import overview
4. If list of systems not visible refresh the screen.
Menu: Edit -> Refresh (F5).
Or button Refresh
5. Double click on system <target_SID>, to go to the import queue.
6. Find the transport request of exported printers and place the cursor on it.
7. Menu: Request -> Import (Ctrl+F11).

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

Or button Import request


8. After it has been imported correctly, delete it from the queue.

- Place cursor on request.


- Menu: Request -> Delete (Shift+F2).

9.36

Step 91 Check/Configure SAP housekeeping jobs


1. Logon client 000.
2. Go to transaction SM37 to check that the standard SAP housekeeping job(s) are running. If not,
check activity ERP-SAP011 (=SAP housekeeping job maintenance) which points to work instructions
NLW-SAP-0544 (overview) and NLW-SAP-0545 (details) to configure/schedule them.
Important

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).

Step 92 Import users


1. Logon client 000.
2. Go to transaction STMS.
3. Menu: Overview -> Imports (F5).
Or button Import overview
4. If list of systems not visible refresh the screen.
Menu: Edit -> Refresh (F5).
Or button Refresh
5. Double click on the SID of the target system, to go to the import queue.
6. Find the transport request of exported users and place the cursor on it.
7. Menu: Request -> Import (Ctrl+F11).
Or button Import request
8. After it has been imported correctly, delete it from the queue.
Right mouse click -> Delete (Ctrl+F2).
9. Go to transaction SCC7.
10. Press button Start immediately.
Important

9.38

Step 93 Check all rfc connections


1.
2.
3.
4.

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

Step 94 Reconfigure trusted and trusting rfc connections


1.
2.
3.
4.

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

Step 95 Reapply certificate

For WML this is only needed in WRA-client 000


1.
2.
3.
4.

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

Step 96 Rebuild corrupt indexes for BW info cubes

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

Step 97 Specific Manual Mobile Offline instructions for WMA

For WML system WMA only


Specific refresh activities for WMA only for the Manual Mobile Offline are described in appendix E.
Make sure these instructions are followed.

9.43

Step 98 Start SAP monitoring


Important

The monitoring is not always started automatically.


So always start the monitoring!

ora> cd /appl/sap/bin
ora> SSD-monitor <target_SID> start

9.44

Step 99 Re-apply settings BW systems

For BI, BIW and BW-systems ONLY


Re-apply the saved settings for starting the Planning Modeler in the following way:
1. Go to transaction RSPLSA.
2. Re-apply the saved URL (e.g. Free URL Prefix) for starting the planning modeler.

9.45

Step 100 Re-apply settings HR systems

For HR-systems ONLY


Re-apply the HR 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.
3. Under heading "Certificate" go to the import/upload button and upload the correct certificates
from OS-files.

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

OF SYSTEM FROM US TO CUSTOMER

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

Step 103 Create full backup of target SAP system


By default, create a full online backup of the target SAP system:
ora> cd /appl/sap/bin
ora> nohup SSD-backup <target_sid> online

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

Step 104 Perform full statistics run


To prevent tickets for missing statistics after the refresh, perform a full statistics run with the
following command:
ora> nohup /appl/sap/bin/SSD-orastatistics -oradbcheck <target_SID> full &

11.4

Step 105 Unlock users

Customer specific => DSM ALWAYS


For WML this is done by WML
Customer will inform us when users can be unlocked (after their post actions have been completed).
ora> cd /oracle/<target_SID>/abin
ora> DSM-lock-users -c all -t <ticket> -u 1

Example:

(= unlock-session 1)

ora> DSM-lock-users -c all -t UKC1234567 u 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

(example file name: UKC1234567.log)

For script-details:

ora> cd /oracle/<target_SID>/abin
ora> DSM-lock-users help

11.5

Step 106 Reattach the QA systems to CUA


How to attach the QA satellite systems to the CUA in Solution Manager is described in Appendix D.

11.6

Step 107 Document audit evidence


For all SAP systems document audit evidence in the customer request (meaning: USD ticket).
According the Atos Origin ERP SAP Quality Assurance team this audit evidence must contain the
following data (see syntax below):
SAP system <Target SID> on <target hostname> has been refreshed successfully from SAP system <Source SID> on <source
hostname>, according to change implementation plan CIP-ERP-SAP005 and work instruction NLW-SAP-0451:
SAP source system backup start date/time:
<dd-mon-yyyy hh24:mi:ss CET>
SAP source system backup end date/time:
<dd-mon-yyyy hh24:mi:ss CET>
SAP target system restore point in time:
<dd-mon-yyyy hh24:mi:ss CET>

Note: TimeZone should be customer-agreed TimeZone (default is CET).

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

System messages: Errors/Warnings

Message: Changes to Repository or cross-client Customizing are not permitted


If you see the message Changes to Repository or cross-client Customizing are not permitted, you
need to open the SAP system for cross-client changes; check out Appendix "Opening/Closing SAP
system for cross-client changes". Make sure to close the system afterwards.

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

Opening/Closing SAP system for cross-client changes

HowTo: Open SAP system for cross-client changes


1. Logon to client 000.
2. Go to transaction SCC4.
3. Menu: Display<->Change (Ctrl+F1).

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.

HowTo: Close SAP system for cross-client changes


1. Logon to client 000 on target SAP system.
2. Go to transaction SCC4.
3. Menu: Display<->Change (Ctrl+F1).

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

Creating/Changing SAP logical system name(s)

HowTo: Change logical system name


Important

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.

HowTo: Create logical system name


1. Logon to client 000 on target SAP system.
2. Go to transaction SALE.
3. Follow path:
Application Link Enabling (ALE) -> Sending and Receiving Systems -> Logical Systems -> Define
Logical System (or go directly to transaction BD54).
4. Click on the button
(before Define Logical System).
5. Enter at the message The table is cross-client.
Important

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.

6. Check that you are in change mode.


7. Menu: Table view -> Display<->Change (Ctrl+F1).
Or button
8. Create logical system for the name which you have written down earlier. If the logical sytem
already exists, skip this substep.
9. Menu: Table view -> Save (Ctrl+S).
Or button
For more details, check out change activity ERP-SAP021 (=Logical system creation).

HowTo: Improve performance of conversion of SAP logical system names

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

Example start times after first BDLS


Scheduling
for next
BDLS

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

D REATTACH SATELITE SYSTEMS (QA) TO CUA

Specific for WML

To add a system to CUA:


As sapadmin in WSP-360: transaction SCUA

Go to change mode Press button Add line


Add the Logical system you want to connect.

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

Press Back button and check whether RFC status is green.

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.

Go back and no message should be visible in screen anymore:

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

E SPECIFIC MANUAL MOBILE OFFLINE INSTRUCTIONS FOR WMA

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.

1.1. Adjusting the backend customizing


In the ECC system WRA go to transaction ZMAM_IMG and select MAM Online rapporten voor MAM:

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.

2. Configuration of NetWeaver Administrator


2.1. Manage j2ee engine
Before you can deploy files you must enter the j2ee-engine parameters to deploy the .sda files to the
j2ee-engine. These parameters are still pointing to the source system.
Logon to the NWA and click on the node: Mobile Archive Converter as displayed below:
Note that the entries in the following screenshots point to WMO, this should be WMA for our system
of course. If they point the WMP, change them the WMA.

Click on button:

to enter the parameters.

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

Check host and SDM port number, hereafter click on button

2.2. Check parameter set


Logon to the NWA and click on the node: Configuration Parameter Sets.
Click on button: Search to find the relevant parameter set and check the system parameters if they
are pointing to the correct system.
MobileEngine.Sync.Gateway.Host = wmacsz01
(adjusted parameter)
MobileEngine.Sync.Gateway.Port = 8000
MobileEngine.Sync.Gateway.Service = /sap/bc/MJC/mi_host
MobileEngine.Sync.Client = 100
MobileEngine.Sync.Gateway.Protocol = http
MobileEngine.Sync.Gateway.System = WMA
(adjusted parameter)
MobileEngine.Sync.Language = NL
MobileEngine.Security.SynchronizationPasswordHandlingOption = local
MobileEngine.Sync.ConnectionTimeout = -1
MobileEngine.Sync.Timezone = Europe/Amsterdam
MobileEngine.SmartSync.SendDataInDelete = true
MobileEngine.JSP.SerializeThreads = true
MobileEngine.Trace.Filesize = -1

2.3. Check download links of mobile components


Before you check the adjusted download links in chapter 5.10 , you have to reload the mobile
components. To do this proceed as following:
Logon to the NWA and go to Administration, Mobile Infrastructure and click on the node: Mobile
Components.
Click on button: Reload
Hereafter use the search help and search respectively for BDI* , DB* and LOCAL*
Select the mobile component from the search result.
Check the download link if it is pointing to the target system:
e.g: the BDI application :

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.

Please note the value of the Device ID and Userid.


Hereafter we want to check if the device ID is also present in transaction MEREP_PD.
With other words: are the device ID displayed in the NWA, the device ID from the source or the target
system?
Go to transaction MEREP_PD in the middleware of the target system.
Click on tab Mobile ID
Touch F4
Userid HOUBJ07
Mobile Component: BDI*

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.

You might also like