1      Preparation for system copy of PRD as DEV on

1.1   Source system preparation

Ø      SM13- Cleanup all pending updates. – Checked - No pending updates

Ø      DB02 - Check ABAP – Database Consistency. – Checked No inconsistencies

Ø      SE10 - Release all transport requests. – Checked –

Ø      RZ04 - Ensure no Operation Mode switch is defined.  – No opmode switch at the timetable

Ø      SM37 - Deactivate jobs. Run BTCTRNS1 (to activate use BTCTRNS2)

Ø      Deactivate cron jobs.

Ø      Run Backup controlfile to trace as oraprd

Ø      oraprd>Sqlplus /

Ø      sqlplus> connect /as sysdba

Ø      sqlplus> alter database backup controlfile to trace;

Ø      This will produce the snapshot of the database controlfile in a readable format at the following location and format :

Ø      /oracle/PRD/saptrace/usertrace/prd_ora_XXXX.trc

Ø      Replace the PRD with DEV in this file.

Ø      Remove all lines from top to the second “STARTUP NOMOUNT”, we want to have RECOVER DATABASE UNTIL CANCEL part of this document. Save this file as “create_DEV cntrlfile.sql” under /oracle/DEV. (See appendix 1. for an example)

Ø      Backup of the DB and filesystems.

1.2   Target system preparation

1-      Determine the size of the source DB.

2-      Plan and create the file systems on the target systems.

3-      Create oradev and devadm users on the target system.

4-      Define ports in /etc/services

sapmsDEV

3600/tcp

 

5-      Update /var/opt/oracle/oratab.

oracle:/oracle/DEV/920_64:N

SID:/oracle/DEV/920_64:N

6-      Restore the source system DB, and SAP and Oracle kernel filesystems.

*   Make sure that /oracle/DEV/saparch  on target system is empty.

*   Delete  the control files listed in initPRD.ora from target system.

*   Copy /oracle/PRD/saptrace/usertrace/prd_ora_XXXX.trc to target system.

*   Copy /oracle/PRD/sapbackup/bXXXXX.aff file of 12/11 offline backup of PRD to/ oracle/DEV/sapbackup on target system.

*   Run brrestore as follows as oradev on target system:

        cd /oracle/DEV/sapbackup

        brrestore –m full –b bXXXX.aff

*   To monitor the restore:

        tail –f /oracle/DEV/sapbackup /xxxxxx.rsb

*   as oradev at /oracle/DEV issue the following

        chown –R ora$dev:dba sapdata*

 

7-      Copy the following files from devadm and oradev home directories from source to target system and rename them as follows in the oradev and devadm home. Check the contents of these files and correct the hostname if hard coded.

1

.dbenv_<oldhostname>.sh

.dbenv_<newhostname>.sh

2

.dbenv_<oldhostname>.csh

.dbenv_<newhostname>.csh

3

.sapenv__<oldhostname>.sh

.sapenv_<newhostname>.sh

4

.sapenv__<oldhostname>.csh

.sapenv_<newhostname>.csh

5

startsap_<oldhostname>_NN

startsap_<newhostname>_NN

6

stopsap_<oldhostname>_NN

stopsap_<newhostname>_NN

 

 

NN is the system number.

 

8-     Copy SAP profile parameters from source system to /sapmnt/DEV/profile and replace the hostname with the new one. Rename hostname within the profiles if hardcoded.

9-     Copy init* files from sbysap02 $ORACLE_HOME/dbs. change any hostname which  is hard coded.

10- Copy TPPARAM from source system to  /usr/sap/trans/bin and adjust DBHOST and BATCHHOST according to the new hostname.

11- Edit /etc/tnsnames.ora and listener.ora by replacing SBX as DEV.

12- Request saplicense for the new server & SID (You may need to delete the previous licenses and reapply the new license) –

2      Database rename

2.1   Create controlfile & complete recovery

Connect as orasid and run the /oracle/DEV/create_DEVcntrl.file:

 

*   Sqlplus /

*   Sqlplus> connect /as sysdba

*   Sqlplus> @/oracle/DEV/create_DEVcntrl.sql

2.2   Create new ops$ users

Create OPS$DEVADM and OPS$ORADEV as follows. (use upper case):

 

*   > Sqlplus /

*   Sqlplus> connect /as sysdba

*   Sqlplus> create user OPS$DEVADM identified externally default tablespace PSAPUSER1D temporary tablespace PSAPTEMP2;

*   Sqlplus> create user OPS$ORADEV identified externally default tablespace PSAPUSER1D temporary tablespace PSAPTEMP2;

*   Sqlplus> grant connect, resource, sapdba to OPS$DEVADM with admin option;

*   Sqlplus> grant connect, resource, sapdba to OPS$ORADEV with admin option

*   Sqlplus> Create table OPS$DEVADM.sapuser as select * from OPS$PRDADM.sapuser;

*   Sqlplus> drop user OPS$PRDADM cascade;

*   Sqlplus> drop user OPS$ORAPRD cascade;

2.3   Verify the SAP to database connection

Run R3trans as devadm:

*   cdexe

*   R3trans –d

If there are any problems first check the syntax of /oracle/PRD/920_64/network/admin/listener.ora and tnsnames.ora. Make sure that the listener is started.

3      Post DB Rename & System Copy

3.1   Install SAP license

You may need to delete previous licenses. As devadm:

*   > cdexe

*   saplicense –install

 

3.2   Deactivate rdisp/btctime

Deactivate the following parameter to make sure when SAP istarted up background jobs are not going to kick off.

At /sapmnt/DEV/profile/DEFAULT.PFL set rdisp/btctime = 0

3.3   RFC connections at SM59

Change the RFC connections and adjust hostnames, delete unnecessary RFC connections. Compare and create the same RFC connections as original DEV.

3.4    Cleanup SM58

SM58 à Log fileà Reorganize execute

3.5   SE06

Configure CTS select database copy (Do not change original system of the objects. )

3.6   Configure STMS

Do any configuration if needed. Make sure local /usr/sap/trans is accessible

3.7   SE14

Delete entries from DBSTATHORA, DBSTAIHORA, DBSTATIORA, DBSTATTORA

Delete entries from MONI, PAHI, OSMON, DBSNP, SDBAH, SDBAD

Delete entries from TPFET, TPFHT, TLOCK, DDLOG

3.8   RSBTCDEL to cleanup job logs

Run RSBTCDEL to cleanup all finished and cancelled joblogs .

3.9   SM37

Delete all ALE jobs.

Check all released jobs  to see if hostname is hard coded. You can check that in SE16àTBTCO BTCSYSREAX field

Reschedule all jobs SE38- run  BTCTRNS2

3.10  SPAD

Adapt definition of the printers

3.11  SM28 and SICK consistency check

3.12  SM65

Go to à Alerts background processing

3.13  CCMS Configuration

Adapt SMLG groups

RZ10 Delete the old profiles and import the new profiles

RZ04 Adapt the new instances and profiles

RZ12 Adapt the new hostname

Sm21 Check system logs

DB02 check  and sapdba check

SM51 check servers

SM61 delete control objects with the old server name

 

3.14  Run BDLS transaction

Run BDLS in each client to convert the logical system name

3.15  SCC3 cleanup client copy logs

Perform client copies. Use no archivelog mode.

3.16  SCC4 and SE06 client setting and system change options.

3.17  Remove the rdisp/btctime=0 from DEFAULT.PF and make sure the database is in the archive log mode

3.18  Increase the transport number at E070L!

3.19  Get an offline backup!

 

DONE J

 

 

 

Hosted by www.Geocities.ws

1