SAP - System Copy
ABAP+JAVA
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
1
System Refresh Contents
Target System ................................................................................................................................................................................................................................. 4
ABAP Pre-Steps ........................................................................................................................................................................................................................... 4
JAVA Pre-Steps.......................................................................................................................................................................................................................... 17
Source System .............................................................................................................................................................................................................................. 22
Database Backup....................................................................................................................................................................................................................... 22
JAVA Export .............................................................................................................................................................................................................................. 23
Target System ............................................................................................................................................................................................................................... 27
Database Restore...................................................................................................................................................................................................................... 27
Start SAP ................................................................................................................................................................................................................................... 33
SAP ABAP Post Steps ................................................................................................................................................................................................................. 35
SAP JAVA Import ....................................................................................................................................................................................................................... 43
JAVA Post-Steps ........................................................................................................................................................................................................................ 51
SSO Setup (BEx Configuration) .................................................................................................................................................................................................. 54
ADS Setup ................................................................................................................................................................................................................................. 60
BIA Steps................................................................................................................................................................................................................................... 62
BPC Setup ................................................................................................................................................................................................................................. 62
BOBJ Setup ............................................................................................................................................................................................................................... 62
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
2
System Refresh Details
Source System Target System
BI 7.01 (ABAP+JAVA) BI 7.01 (ABAP+JAVA)
Solaris 10 Solaris 10
Oracle 10.2 Oracle 10.2
DB Size 3.6 TB
Backup Setup Type: BCV Online Backup BCV Restore
Type: DB Backup and Java Export DB Restore and JAVA Import
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
3
Target System
ABAP Pre-Steps
SLICENSE
SMLG & RZ12
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
4
RZ04
SM61
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
5
SWU3 / RZ70
SLDAPICUST
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
6
SCCL
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
7
SE06
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
8
SALE / BD54
WE20 / WE21
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
9
SCOT
SMQS
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
10
SMQR
Table: RSBASIDOC
SAP System Copy (ABAP+JAVA)
STMS
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
11
STRUSTSSO2
Tables Export RFC Tables R3TR TABU SE03 – System R3TR TABU DLV_SYSTC
RFC, Logon Groups, Server R3TR RFCATTRIB Change Option R3TR TABU TRNSPACE
Groups, Logical Systems, System R3TR TABU R3TR TABU TRNSPACEL
Change Options, User RFCCHECK R3TR TABU TRNSPACET
Directories R3TR TABU RFCDES
R3TR TABU SALE – Logical R3TR TABU TBDLS
R3TR RFCDESSECU systems R3TR TABU TBDLST
R3TR TABU RFCGO R3TR TABU PATH
R3TR TABU RFCTA STRUSTSSO2
R3TR TABU SNCSYSACL
SAP System Copy (ABAP+JAVA)
R3TR RFCSYSACL SSF_PSE_D
R3TR TABU RFCDOC SSF_PSE_H
TWPSSO2ACL
USRACLEXT
AL11 – User directory R3TR TABU SM69 R3TR TABU SXPGCOSTAB Y* & Z*
entries R3TR USER_DIR
SMLG/RZ12 R3TR TABU RZLLITAB BI Specific Tables R3TR TABU RSLOGSYSDEST
R3TR TABU RSLOGSYSMAP
R3TR TABU RSSOURSYSTEM
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
12
Created Transport of copies for
above tables
User Master Export Login to Business Client SCC8
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
13
Spool device export (SPAD)
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
14
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
15
Transport Request (E070L)
RSA1
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
16
JAVA Pre-Steps
Login to Target System as sidadm
Cd /usr/sap/SID/DV*/j2ee/configtool
./configtool.sg
Copy server0 memory setting on notepad
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
17
Configtool Configuration Editor CTC
property sheet System Properties
Configtool Configuration Editor
Cluster_data server cfg Services
SAP System Copy (ABAP+JAVA)
Open below file in change mode.
“Property sheet
com.sap.security.core.ume.service”
Visual Administrator /usr/sap/BT2/DVEBMGS00/j2ee/admin
./go
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
18
SLD Data Supplier
Take screenshots from both HTTP and CIM
Client Settings.
JCO RFC Provider
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
19
Destinations WebSerivice (of ADS)
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
20
Destinations HTTP (of ADS)
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
21
Source System
Database Backup
Backup has been taken with BCV policy Coordinate with Netbackup team to start BCV Sync / Split. Sync will take around 1- 2 hours.
BCV will do online backup including origlog* Customer will give green signal to take snapshot for 30 mins. This is actually Split time. So, inform NB team to
and mirrlog*. Recovery can be done by start Sync early and ready for customer confirmation. Once customer confirmed for snapshot, inform NB team
applying online archivelog files. to kick-off split.
Backup sync / split done
Split took around 30 mins and taken tape
backup.
Media Service team will ship tapes to target
location by UPS courier. Shipping will take
day or 2.
Alert log during split end. This is required
while recover Database on target system.
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
22
Backup generated control file with
command on above screenshot.
Or
SQL> alter database backup controlfile to
trace;
Copy control file to target location Amend Control file on target system. Check steps in target system.
Optional: Login as orasid
Backup using brtools Orasid> brbackup –u / -c –f <online_cons or offline_force> -t all
JAVA Export
Login to server as root Create directory javaexp_0315 and provide full permissions
Start SAP Installation Master Set Environment Variables.
Select system copy export on source
system
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
23
Choose profile directory
&
Choose JDK directory path
Choose option “DB Specific tools”
We already have taken DB BCV backup.
Uncheck “Stop Running system” and
provide export path which has already
been created.
Parameters Summary
Check settings and click on “Next”
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
24
JAVA Export running
JAVA Export Completed successfully.
Sometimes, it will give error that SDM is
running. We can stop SDM manually by
using JCMON and continue. There will
be no issues with business operation
even SDM is down.
Once export done, Start SDM from
JCMON.
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
25
Export size is 1.6 GB
Copy JAVA export to target location
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
26
Target System
Database Restore
Take Full offline backup before restore with Stop Running Target SAP / DB
Prod backup Perform Offline backup
Required Data on Target System Database Backup – Tapes shipment
JAVA Export – Copy from Source system to Target System Manually
NW701 Installation Master
JAVA Components DVD
Kernel DVD
Oracle Client DVD
Take Backup of SAP & Oracle files /sapmnt/SID/profile, initSID.ora, initSID.sap, tnsnames.ora listener.ora
Cleanup DB File systems Login as root
# rm –rf /oracle/SID/sapdata*/*
# rm –rf /oracle/SID/origlog*/*
# rm –rf /oracle/SID/mirrlog*/*
# rm –rf /oracle/SID/oraarch
SAP System Copy (ABAP+JAVA)
DB Restore Inform Netbackup team to start Restore from tapes to Target system file systems
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
27
Change Ownership and Permissions of
restored DB files
Login as root
#chown –R orabt2:dba /oracle/BT2/*
#chmod –R 755 /oracle/BT2/*
(Screenshot Ownership command is wrong)
Amend Control File
Copied controlfile from source to target
system and amend it.
Change below values
Remove all lines before STARTUP
REUSE – TO – SET
NOMOUNT and after CHARACTER SET UTF8;
BWP – TO – BT2
NORESETLOGS – TO – RESETLOGS
ARCHIVELOG – TO – NOARCHIVELOG
After Changes, file should be like below
SAP System Copy (ABAP+JAVA)
Start Database With amended control file
Login as orabt2
Sqlplus / as sysdba
SQL>@control.sql
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
28
Recover Database SQL> recover database using backup controlfile until cancel;
Based on the offline or online log file, Note: Check alertSID.log when backup done on Source System, apply offline redolog files till (n-1) prior to
recovery can be done. “alter database backup controlfile to trace.
(As it is BCV backup, online redo log files
also will be restored.) SQL> recover database using backup controlfile until cancel;
(Apply online redo log file based on alertSID.log of source system)
Media Recovery completed by applying online redo log file. Check above screen.
Open Database
Restart Database
SAP System Copy (ABAP+JAVA)
Drop Source System OPS$ User accounts DROP USER OPS$ORABWP CASCADE;
DROP USER OPS$BWPADM CASCADE;
commit;
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
29
Create OPS$ user accounts with target SID CREATE USER "OPS$ORABT2" PROFILE "DEFAULT" IDENTIFIED EXTERNALLY DEFAULT TABLESPACE
"PSAPSR3USR" TEMPORARY TABLESPACE "PSAPTEMP" ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO "OPS$ORABT2";
GRANT "CONNECT" TO "OPS$ORABT2";
GRANT "RESOURCE" TO "OPS$ORABT2";
CREATE USER "OPS$BT2ADM" PROFILE "DEFAULT" IDENTIFIED EXTERNALLY DEFAULT TABLESPACE
SAP System Copy (ABAP+JAVA)
"PSAPSR3USR" TEMPORARY TABLESPACE "PSAPTEMP" ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO "OPS$BT2ADM" WITH ADMIN OPTION;
GRANT "CONNECT" TO "OPS$BT2ADM" WITH ADMIN OPTION;
GRANT "RESOURCE" TO "OPS$BT2ADM" WITH ADMIN OPTION;
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
30
Create SAPUSER Table CREATE TABLE "OPS$BT2ADM".SAPUSER (USERID VARCHAR2(256), PASSWD VARCHAR2(256));
Update OPS$ user password in SAPUSER INSERT INTO "OPS$BT2ADM".SAPUSER VALUES ('<sapowner>', '<password>');
Table
Check Connection between SAP and DB
Login as bt2adm
# R3trans –d
# R3trans -x
Truncate Tables truncate table sapsr3.dbstathora REUSE STORAGE;
truncate table sapsr3.dbstaihora REUSE STORAGE;
truncate table sapsr3.dbstatiora REUSE STORAGE;
truncate table sapsr3.dbstattora REUSE STORAGE;
truncate table sapsr3.moni REUSE STORAGE;
truncate table sapsr3.pahi REUSE STORAGE;
SAP System Copy (ABAP+JAVA)
truncate table sapsr3.osmon REUSE STORAGE;
truncate table sapsr3.dbsnp REUSE STORAGE;
truncate table sapsr3.sdbah REUSE STORAGE;
truncate table sapsr3.sdbad REUSE STORAGE;
truncate table sapsr3.sdbap REUSE STORAGE;
truncate table sapsr3.sdbar REUSE STORAGE;
truncate table sapsr3.alconseg REUSE STORAGE;
truncate table sapsr3.alsystems REUSE STORAGE;
Run DB Stats brconnect -u system/password –c –f stats –t all –d –f allsel -g 8 -p 8
brconnect -u system/password -c -f stats -t system_stats
brconnect -u system/password -c -f stats -t oradict_stats
brconnect -u system/password -c -f stats -t all -g 8 -p 8
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
31
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
32
Start SAP
Change below parameter to value “0” Login as sidadm
rdisp/wp_btc_no 0 sidadm> startsap r3 sapsid
Login to SAP as SAP* and change BTC jobs Select all released jobs and turn them to schedule from SM37
and disable SCOT
Suspend Background jobs: alternately, run
report “BTCTRNS1” from SA38 to suspend
all released jobs.
Select all & Schedule
SCOT Uncheck “Node in Use”
SAP System Copy (ABAP+JAVA)
Change below parameter to value “0” Login as sidadm
rdisp/wp_btc_no 8 Startsap r3 sapsid
Restart SAP System
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
33
Apply SAP License
Applied SAP License
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
34
SAP ABAP Post Steps
SMLG / RZ12 Setup as like Prior to refresh pg no: 4
SM61 Setup as like Prior to refresh pg no: 5
SE06
Continue with “YES” in all pop-ups.
STMS Local
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
35
SA38 RDDNEWPP
Import User Master
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
36
Perform Post-Processing of User Master
Import
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
37
Import Transport Request (Tables)
SECSTORE for RFC Destinations
Login to Service Market Place key
Migration Keys
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
38
618C779176AF55CCB650895EFCDE6370
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
39
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
40
Run Reports from SA38 and delete old logs RSBTCDEL
of source system RSNAPDL
SP12 Perform Consistency Check
RZ04 / SM63 Adjust Operation as like prior to refresh pg: 5
RZ70 / SLDAPICUST Setup as like Prior to refresh pg: 6
ST03N
Delete Source system entries
SWU3 Setup as like Prior to refresh pg: 6
SMQR Reorganize Table
SAP System Copy (ABAP+JAVA)
SMQS Reorganize Table
SPAD Import Printers
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
41
SAP System Copy (ABAP+JAVA)
BDLS Run BDLS for required logical systems
SCOT Adjust as like prior to refresh
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
42
SAP JAVA Import
Import JAVA by using Installation Master Setup Environment variables
Execute sapinst from installation master by login as root
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
43
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
44
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
45
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
46
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
47
Amend control file which has been
generated during backup on source system
Or
Generate new control file on target system
and amend the file.
SAP System Copy (ABAP+JAVA)
SQL> alter database backup controlfile to
trace;
Copy control file to installation directory
logs
Note: If JAVA import failed when creating Amend Control as like below
DB, amend CONTROL.SQL file and retry
Then Retry on SAP INST screen and check log. Result would be like below and java import will be continued.
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
48
Uncheck All and Continue. If there are any
other OPS$ user accounts related to Source
system, select and continue. Installation will
remove accounts from DB
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
49
JAVA Importing running.
JAVA Import completed successfully.
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
50
JAVA Post-Steps
Overview 1. Adjust Configtool settings and restart JAVA system
2. Adjust Settings in visual admin as like prior to refresh
3. Setup SSO (BEx Configuration)
4. ADS Configuration.
Configtool Configuration Editor CTC
Pro*
Replace Source SID, Source System name
and source instance number with Target
system respectively.
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
51
Configtool Configuration Editor
Cluster_data Server cfg services
Double Click on
com.sap.security.core.ume.service.
Change property of “Master Password”.
Master User is SAPJSF. Update Password
and same password should be there in
ABAP.
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
52
Backend Master System is ABAP system
Logical system name.
Update Logical system name with Target
system LS.
SAPJSF is default user. No action required.
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
53
Check Memory parameters and update.
Save / Apply and restart JAVA system
Visual Admin Settings Visual Admin Server Services
SLD Data Supplier
SLD Data Supplier Update HTTP and CIM settings as like Pre-Steps screenshot.
SSO Setup (BEx Configuration)
Certificates (JAVA Certificate) Visual Admin Services Key Storage Trusted CAs Create
SAP System Copy (ABAP+JAVA)
Create ABAP and JAVA certificate, export
and import vice versa.
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
54
Click on “Generate”
Note: Do not click on “Select CA Key” (Screenshot is Wrong)
JCO RFC Provider Visual Admin Services JCO Provider
Create RFC destiantion to ABAP system with name of ABAP RFC “Registerd Program” name
Security Provider Adjust CN settings on Ticket and Evaluate Cerficate
trustedsys1 BT2, 300
trusteddn1 CN=BT2
trustediss1 CN=BT2
trustedsys2 BT2, 000
trusteddn2 CN=BT2
trustediss2 CN=BT2
System Settings Login to portal
http://FQDN:5<IstanceNo>00/irj/portal
System Administration System Configuration Portal Content System landscape SAP_BW
Replace all soruce system details with target system details including alias name
JCO Destinations http://hostname:50000/index.html Web Dynpro Tools Content Administrator Maitain JCO
Destination
Create HTTP RFC Login to business client SM59
SAP System Copy (ABAP+JAVA)
Create HTTP RFC and with Registred Program
Make sure that “Send Assertion Ticket” should be active under Logon & Security..
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
55
ABAP Certificate (ABAP Certificate) TX: STRUSTSSO2 Generate PSE Certificate
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
56
SAP System Copy (ABAP+JAVA)
\
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
57
Update Portal entry in table SM30 RSPOR_T_PORTAL
Maitain URL, SAP_BW, RFC Destination Name and KW Data
Update Table with HTTP Details SE16 HTTPURLLOC Enter
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
58
Result should be Green. http://sapbt2.corp.ebay.com:50000/irj/servlet/prt/portal/prtroot/com.sap.ip.bi.supportdesk.default
Use Diag Tool to confirm the setup is good.
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
59
ADS Setup
Create / reset password of user accounts User Account: ADS_AGENT User Account: ADSUSER
Roles: SAP_BC_FP_ICF Roles: SAP_BC_FP_ICF
Create ADS RFC
SM59 Create G type RFC Destination
Web Service Destination Visual Admin Services Destnations Web Service
Create Below 2 RFCs
FP_ICF_DATA
SAP System Copy (ABAP+JAVA)
Url: http://hostname:50000
User ID: ADS_AGENT
Password: *******
FP_ICF_DATA_BT2
Url: http://hostname:50000
User ID: ADS_AGENT
Password: *******
HTTP Destination Visual Admin Services Destnations HTTP
FP_ICF_DATA_BT2
Url: http://hostname:8000
User ID: ADSUSER / Password: *******
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
60
Test Result SA38 FP_TEST_00
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
61
BIA Steps
NA This is Project System. No need to setup
BPC Setup
NA This is Project System. No need to setup
BOBJ Setup
NA This is Project System. No need to setup
SAP System Copy (ABAP+JAVA)
THANK YOU
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
62
SAP System Copy (ABAP+JAVA)
Sekhar Kota, Sr SAP Basis & Netweaver Consultant
63