26 January, 2014

SYSTEM REFRESH OVERVIEW


PRE REFRESH STEPS:
1. Screen Shot Of some transaction to compare after Refresh
1. STMS: Transport Domain, System Overview, Transport Configuration,   Transport Parameter
2. SCC4: Client status open / close. 
3. AL11: Transport directory location othe location.
4. RZ03: Operation Mode, Current work process status, instance and startup profile location from instance status 
5. RZ12:
6. SMLG:
7. WE20: Partner profile.
8. SM59:
9. SS02:
10. SLICENSE For later use of Hardware Key
11. DB13
12. FILE
13. SLDAPICUST note which system
14. STRUSTSSO2 see which tickets are active
15. SECSTORE
2. Screen Shot Of some table using SE16
1. EDPP1
2. RSBASIDOC
3. USR02 Number of entries (to compare after import)
4. V_TBDLS
5. RSLOGSYSDEST
6. RSLOGSYSMAP
7. TVARVC
8. V_CONVERTER
3. SM37: download all BTC info into .XLS
4. SPAD: Printer Export as .txt format
5. Export Background Jobs:
Export tables :exp : then put in a dump file
TBTCA
TBTCB
TBTCCNTXT
TBTCCTXTT
TBTCCTXTTP
TBTCI
TBTCJSTEP
TBTCO
TBTCP
TBTCR
TBTCS
VARID
VARI
VARIT
VARIS
6. RFC export: 
RFCATTRIB
RFCCHECK
RFCDES
RFCSYSACL
RFCTRUST
7. Export AL11 table USER_DIR
8. SCC8 User Master Data Export
users master data of that client exported so the user of production not reflect to the target system.
Up to 3 requests are created,depending on the data selected and available:
1.  "XXXKO00012" for transporting cross-client data, if you have selected this
2.  "XXXKT00012" for transporting client-specific data
3.  "XXXKX00012" for transporting client-specific texts, provided texts are            available in this client
STEPS:
1.SCC8
2.choose profile SAP_USER and Target system as same client.
3.schedule job immediately with no printer Dialog
4.continue
5.SCC3 go to Export 
6.Wait till finished.
REFRESH ACTIVITY :
Removing data files of XXX & coping PRD data (user orasid)
cd /oracle/XXX/ 
rm -r sapdata1
rm -r sapdata2
rm -r sapdata3
rm -r sapdata4
rm -r origlogA
rm -r origlogB
rm -r mirrlogA
rm -r mirrlogB
cd /oracle/XXX/ (we are here only so no need to do it (user orasid))
scp -pr /tmpmount/sapdata1 . &
scp -pr /tmpmount/sapdata2 . &
scp -pr /tmpmount/sapdata3 . &
scp -pr /tmpmount/sapdata4 . &
scp -pr /tmpmount/origlogA . &
scp -pr /tmpmount/origlogB . &
scp -pr /tmpmount/mirrlogA . &
scp -pr /tmpmount/mirrlogB . &
POST REFRESH STEPS:
1. Create Control File on Source System
su – ora<Target SID>
sqlplus / nolog
connect / as sysdba
alter database backup controlfile to trace;
cd /oracle/SID/saptrace/usertrace
cp <latest-file>.trc SIDcontrol.sql
scp SIDcontrol.sql to Source system
2. Edit Control File on Target System
chown orasid:dba SIDcontrol.sql
3. Login to database & recover the database from controlfile.
 STEPS:
 1. oraxxx>Sqlplus / as sysdba;
 2. startup nomount
 3. @/xxx/xxx.sql
 4. Recover database using backup controlfile until cancel;
 5. alter database open resetlogs;
 6. alter tablespaca PSAPTEMP add tempfile '/oracle/XXX/sapdata1/temp_1/temp.data1' size 540M reuse autoextend on next 20000000 maxsize 10000M;
 7. Shutdown Immediate;
 8. startup mount;  
 9. alter database noarchivelog;
 10. alter database open;
 11. alter database rename global_name to XXX
 12. @/oracle/post_copy.sql
4. We need to drop the “ OPS$ ” users of PRD system & need to create the users with current SID.
STEPS:
 1. select username from dba_users; (it will show list of all OPS$ user and create this user again with XXX sid and provide the role related to it)
  SYSTEM 
SYS
OPS$SAPSERVICEXXP
OPS$ORAXXP
OPS$SR3ADM
OPS$XXPADM
SAPSR3
OUTLN
ORACLE_OCM
DIP
DBSNMP
APPQOSSYS
2. Drop user OPS$ORAXXP cascade;
3. Drop user OPS$XXPADM cascade;
4. Drop user OPS$SAPSERVICEXXP cascade;
5. Create user OPS$ORAXXX identified externally externally default tablespace SYSTEM temporary Tablespace PSAPREMP;
6. Create user OPS$XXXADM identified externally externally default tablespace SYSTEM temporary Tablespace PSAPREMP;
7. Create user OPS$SAPSERVICEXXX identified externally externally default tablespace SYSTEM temporary Tablespace PSAPREMP;
8. Grant DBA, Connect, Resource to OPS$XXXADM;
9. Grant exp_full_database to OPS$ORAXXX;
10.Create SYNONYS "OPS$SERVICEXXX".SAPUSER for "OPS$XXXADM".SAPUSER;
11.Create table "OPS$XXXADM".SAPUSER (USERID VAARCHAR2 (256), PASWORD VARCHAR (256));
12 INSERT INTO "OPS$XXXADM".SAPUSER ('SAPSR3', '*******');
13.cOMMIT;
14.@Sapmnt/xxx/exe/sapconn_role.sql (it will disconnect SQLPLUS)
15.sqlplus / as sysdba;
16.@Sapmnt/xxx/exe/sapdba_role.sql SR3 (it will disconnect SQLPLUS)
17.logout
18.su - xxxadm
20.R3Trans -d
5. Drop PRD tables & reimport the exported tables of the old system.
 STEPS:
 1.sqlplus / as sysdba;
 2.@/oracle/xxx/batch-table-drop.sql;
 3.Drop table sapsr3.USER_DIR;
 4.imp
 5.sapsr3
 6.*******
6.After importing Old table data login to SAP & do post steps.
SE06 
Database copy or database migration
Do u want to reinstall CTS--> yes
Source system of Database copy--> XXP
Change original from XXP to XXX
Change the transport System not configured--> ok
Do u want to Change original from XXP to XXX --> YES
Delete TMS Configuration--> NO
  Delete the original version of transport routes--> NO
7.STMS : Restore as old system
System: XXX
Description: XXX SAndbox
Save
8.BDLS: New logical system Name: xxxclnt300 
Convertion of client dependent and client independent Tables
Table to be converted: COEP
Continue with convertion Anyway. YES

4 comments:

  1. Well Prepared !!
    My question is above mentioned steps would be same for every system refresh ?

    ReplyDelete
  2. Hi Kunal, your blog is awesome. Thanks for describing

    ReplyDelete
  3. nice steps , great appreciation
    Thanks Brother
    Sureshch
    hyderabad

    ReplyDelete
  4. hi KUNAL RAI,

    would you please share any step by step sap db refresh tutorial if you have thanks.

    ReplyDelete