Client Copy from Production to Quality  Server

How to do client copy from production to quality server?

It depend on system size and available time.
For small system you can do remote client copy.
Another option is to make client export on PRD system, then client import in Quality system.

For the large system is not any other way - just do system copy.
In few words:
make backup, remove Quality system from transport system and from CUA, restore on Quality system, re-create control files - to change the SID( Oracle), startup DB, several post-copy steps.

Here is plan that I follow :

Generally – follow note 147243. The difference in this procedure is that DB Load is not interrupted as is proposed in the note,  but I wait for the initial installation to fully complete and then do the next steps.

1. Adjust memory parameters (Oracle, SAP) and page file of source system. If necessary adjust also number of work processes. This step is optional. Most often it is not done, instead of it the adjustments of the profiles are done later in the target system.
2. Trace the control file Control<SID>.sql of source system – note 147243
3. Adjust created control file as for the target system – note 147243
4. Create new user with admin rights (put this user in ORA_DBA group)
5. Logon as this user (local/domain) and perform a new installation as per inst. guide
6. Do this only if this is a second SAP instance installed on the same host:
See note 576919 (Ora-12505). Oracle listener is changed during the installation. Adjust listener.ora
- if system fails on DBCONNECTTEST step (can occur if you install more than one instance on the same host), check if environment variable Local is defined. If it is, it should have the correct value for the SID and it must be defined as User variable, not as System variable. Also restart the computer. Then start the database of the new SID.
- Terminal services also can impact this error – note 441518. Note 556232 explains the environment settings.
- If error occurs on DIPGNTAB_NT see  note 162266 and especially note 400241 (ora-1403 or ora 1017)
7. Patch Oracle of the target system, if necessary (to have the same patch level as in the source system)
8. Update Kernel of Target system (use the newest kernel available)
9. Stop Oracle <SID> Service
10. Delete on Target system <DRIVE>:\ORACLE\<SID> (Online redo log directories must stay, just the files in them have to be deleted). Redo log directories must be on the same drives as they are on the Source system (because Online Redo logs are recreated by the Control<SID>.SQL). Otherwise adjust appropriate the traced control file from the source system
11. Copy or restore  <DRIVE>:\ORACLE\<SID> (SAPDATA 1-6) from Source to the target system.
12. Delete all copied in previous step Control files on the Target system !
13. Copy Oracle init<SID>.ora , .sap , .dba from source system and adjust them to the situation in Target system (<SID>, paths, etc.)
14. Adjust SAP profiles to the status of Target system (memory parameters, number of work processes, language parameters, etc.)
15. Start Oracle Services
16. Modify Control<SID>.sql as per Guide (Note 147243)
17. Database must be down. Execute Control<SID>.sql . This must recreate the control file and open that database
18. Start DB, Start SAP
19. If the system does not start, delete old OPS$ user and create it again (Note 50088) – only for R/3 4.6C

Only for BW (or system based on WAS 6.20):
- Use note 659509 in combination with 400241. Use the newest oradbusr.sql script to create new OPS$ user– it is attached to current version of  note 50088.  Change password/owner of SAPUSER table as described in 659509 – use old SID for the “ops$<sapsid>adm.sapuser” and new SID for “SCHEMAOWNER”:
ora<dbsid>% sqlplus /nolog
> connect / as sysdba
> insert into ops$<sapsid>adm.sapuser values
  ('<SCHEMAOWNER>', '<password>');
-        Grant SAPDBA role to new OPS$ user:
GRANT CONNECT, RESOURCE TO “OPS$<DOMAIN>\<SID>ADM”;

In the examples below IPW is the source system, GRB is the target system.

-  Give to the user default and temporary tablespace, for example:
ALTER USER "OPS$GRATHDB1\GRBADM" DEFAULT TABLESPACE PSAPIPWUSR
TEMPORARY TABLESPACE PSAPTEMP IDENTIFIED EXTERNALLY;
-  Grant the necessary roles to new SAP<SID> user, for example:
GRANT CONNECT, RESOURCE, SELECT_CATALOG_ROLE TO SAPGRB;
-  Apply note 534765 to change dbs_ora_schema environment to the old SID (SID which owns SAP tables in the schema)
-  Create OPS$SAPService user (example):
create user "OPS$GRATHDB1\SAPSERVICEGRB" DEFAULT TABLESPACE SYSTEM
TEMPORARY TABLESPACE SYSTEM IDENTIFIED EXTERNALLY;
-  Grant necessary rights to OPS$SAPService user:
GRANT CONNECT, RESOURCE, SAPDBA TO "OPS$GRATHDB1\SAPSERVICEGRB";
-  Create the synonym:
CREATE SYNONYM "OPS$GRATHDB1\SAPSERVICEGRB".SAPUSER FOR
"OPS$SAPBW\IPWADM".SAPUSER;
- Grant select update onto the SAPUSER table for SAPService user:
GRANT SELECT, UPDATE ON "OPS$SAPBW\IPWADM".SAPUSER TO "OPS$GRATHDB1\SAPSERVICEGRB”;
-  Drop the old synonym:
DROP SYNONYM "OPS$SAPBW\SAPSERVICEIPW".SAPUSER;
- Start SAP system.

20. If the system does not start yet, apply note 8179

21. Post Implementation steps
These steps are derived from Homogeneous copy guide, section “post copy activities”
- Delete all irrelevant in SM59
- Delete old CUA settings, if exists (SCUA, BD64)
- SPAD – adjust printers
- Delete entries in tables:
sqlplus
   connect sapr3/sap;
   delete from DBSTATHORA;
   delete from DBSTAIHORA;
   delete from DBSTATIORA;
   delete from DBSTATTORA;
   delete from MONI;
   delete from PAHI;
   delete from OSMON;
   delete from DBSNP;
   delete from SDBAH;
   delete from SDBAD;
   delete from SDBAP;
   delete from SDBAR;
   delete from DDLOG;
   delete from TPFET;
   delete from TPFHT;
   delete from TLOCK;
   commit;
   exit;

For systems based on WAS 6.20 check in Homogeneous Copy Guide for the tables, which entries must be deleted.

-  Delete all unnecessary in SM37
-  Execute SICK, SM28 (Installation check)
-  SE06 (Choose DB Copy)
Start transaction SE06 and choose ‘Database copy or migration’. Click now the button Processing after installation [Execute].
Accept the given source system.
SAP will now ask if the originals have to changed from source system name to target system name. Only answer this question with yes if this installation doesn't stay within the same landscape.

- SE38 -> execute report RSBTCDEL (mark field delete with force mode). This deletes old batch jobs by your criteria
- SP12 – Tempse Consistency
- Execute DB02
- Configure STMS
- RZ10 – import new profiles
- SE61 – adapt the logon text
- Adapt the picture after logon
- Delete unnecessary clients
- Import necessary requests
- Add the system CUA ?
- Install Documentation

Additional steps for BW only – follow closely note 184754
a)  In the target BW, change the contents of field "target host" in all RFC connections (destinations) for R/3 and DataMart source systems (Transaction SM59) to a nonsensical, nonexistent address (such as 'nowhere'). Then delete ALL R/3 and DataMart source systems in the Administrator Workbench source system tree. Caution: This step deletes all PSA tables of these source systems - the data are lost! A message is generated stating that the source system cannot be accessed (since you deleted the host of the RFC connection). Select "Ignore".
Confirm on the request, until all transfer structures are not deleted – track this on “Transfer structure”. This operation deletes the transfer structures and transfer rules for the affected source systems. It asks also if you want to delete RFC destinations and Logical systems of the source systems (SALE).
“MySelf” Logical system (based on old <SID>) can not be deleted.
Release the request created during this procedure.
b)  DO NOT create new Logical system (e.g. GRGRB400). In BDLS step this will be done automatically by the report RBDLSMAP
c)  Follow note 121163
d)  Before running BDLS, adapt ROLLBACK segments (if necessary)
 

Question:

What is the difference between Client Import/Export and Remote Client Copy? 

Answer:

Remote client copy is performed between the systems in the same landscape whereas if the systems are not in the same landscape we can perform client export if there is no direct connection between two systems.

When we perform client export three type of files are generated. naming convention of the files are:

<sid>KO<nnnnnn>  Cross client object,
<sid>KT<nnnnnn>  Client dependent tables and <sid>KX<nnnnnn>  Client dependent long text.

The KO and KT files are imported in target system using STMS then we have to run transaction SCC7 in the target system for postprocessing in which KX files are automatically imported.

SAP Basis

Copy User Role and Master
Client Copy with only user master and roles

SAP Basis Reference Books:
SAP Basis Components, System Administration, Security, ALE and iDoc Books

Back to Basis Menu:
SAP BC (Basis Components) Hints and Tips

Return to :-
SAP ABAP/4 Programming, Basis Administration, Configuration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.  The site www.gotothings.com is in no way affiliated with SAP AG.
Any unauthorised copying or mirroring is prohibited.