UNIXSteps:

Step 2

UnMount all DVP dir and Mount them as DRD. (This has to be done on UNIX by TAG Team)

Example:

umount /oracle/DVP/sapdata8

umount /oracle/DVP/sapdata9

umount /oracle/DVP

mkdir -p /oracle/DRD

mkdir -p /oracle/DRD/sapdata8

mkdir -p /oracle/DRD/sapdata9

mount /dev/fslv05 /oracle/DRD

mount /dev/fslv19 /oracle/DRD/sapdata8

mount /dev/fslv20 /oracle/DRD/sapdata9

Note: Similarly we need to for all DIR where DVP is there and also we need to change the DIR called sapmnt/DVP to sapmnt/DRD.

File Template for Umount and MountDIR’s:

Step 3

Create new <sid>adm, ora<sid> and add them to groups of which old <sid>adm, ora<sid> are members of. . ( This has to be done on Unix by TAG Team)

Step 4

Change environment variables. [.dbenv files] (Path: /home/dvpadm)

a) Login as orasid, edit files .dbenv_hostname.csh, .dbenv_hostname.sh, .sapenv_hostname.csh and .sapenv_hostname.sh.

Replace all occurrences of old sid with the new sid

b)Login as sidadm, edit files .dbenv_hostname.csh, .dbenv_hostname.sh, .sapenv_hostname.csh and .sapenv_hostname.sh. Replace all occurrences of old sid with the new sid

c)Login as orasid, edit the files .kshrc, .cshrc, .profile, .login. Replace all occurrences of old sid with new sid, old instance number with new instance number

d)Login as sidadm, edit the files .kshrc, .cshrc, .profile, .login. Replace all occurrences of old sid with new sid, old instance number with new instance number

(Edit above file names and change the SID with below Command [Ex: vi .dbenv_hostname.csh ] : :1,$ s/DVP/DRD/g)

Step #

a)Rename Instance profile name DVP_DVEBMGS04_endwell to DRD_DVEBMGS04_endwell

Step 6

b)Change init<sid>.sap/.ora/.dba

(Command to rename the above files: mv init<OldSid>.sap init<NewSid>.sap)

c)Remove soft links from the below path and create the new soft link under.

Cd /usr/sap/DRD/SYS

Eg:rm /sapmnt/DVP/profile (This will remove the old soft link)

ln –s /sapmnt/DRD/profile (This will create the new soft link)

rm /sapmnt/DVP/gui (This will remove the old soft link)

ln –s /sapmnt/DRD/gui (This will create the new soft link)

rm /sapmnt/DVP/global (This will remove the old soft link)

ln –s /sapmnt/DRD/global (This will create the new soft link)

Cd /usr/sap/DRD/SYS/exe

Eg: rm /sapmnt/DVP/exe (This will remove the old soft link)

ln –s /sapmnt/DRD/exe dbg (This will create the new soft link)

rm dbg (This will remove the old soft link)

ln –s dbg run (This will create the new soft link)

Also change oldSid name in /etc/hosts

Step 7

Change oldSid name in tnsnames.ora,listener.ora(Path: /oracle/DRD/network/admin)

ORACLE Steps:

Step 1

Create control files with new path.

a) Sqlplus> alter database backup controlfile to trace;

Statement processed.

Note :- Backup control file will generate in user dump destination (/oracle/DVP/saptrace/usertrace) . Check for the latest command on unix ls –ltr will give you Ora<xxxxx>.trc . Rename this file to Control.sql and copy the same to SAPQA system at same location i.e (/oracle/DRD/saptrace/usertrace)

b) sqlplus> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down

c) sqlplus> lsnrctl stop

Step 5

a) You have to edit control.sql file to be able to use on target system(DRD).

Open file to edit using VI (UNIX)

b) From the newly created control file

Remove all lines before "STARTUP MOUNT" line.

Delete all commented "#" lines.

Also remove all lines after CHARACTER SET WE8DEC;" line.

c) With the help of below mentioned command Change all Source SID's to Target SID.

UNIX (VI): 1,$ s/<SSID>/<TSID>/g

Eg: (:1,$ s/DVP/DRD/g) this will replace all SID DVP to DRD.

d)Change the below mentioned line in control file as per our requirement.

CREATE CONTROLFILE REUSE DATABASE 'SSID' NORESETLOGS ARCHIVELOG;

as follow

CREATE CONTROLFILE REUSE SET DATABASE'TSID'RESETLOGS ARCHIVELOG;

Eg:(CREATE CONTROLFILE REUSE SET DATABASE "DRD" RESETLOGS ARCHIVELOG;)

Step 8

2) After CONTROL.SQL script preparation, following commands must be run to create

CONTROLFILE of target system:

a)su - oraDRD

b) sqlplus>username/passwd

c) sqlplus> @/<path_to_file>/control.sql

Note:(In our case it will be @/oracle/DRD/saptrace/usertrace/control.sql)

> lsnrctl start

>sqlplus

SQL*Plus: Release 9.2.0.6.0 - Production on Thu Aug 17 11:03:27 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Enter user-name: sys as sysdba

Enter password:

Connected to an idle instance.

SQL> @/oracle/DRD/saptrace/usertrace/control_xxxxxx.sql

ORACLE instance started.

Total System Global Area 858277672 bytes

Fixed Size 743208 bytes

Variable Size 469762048 bytes

Database Buffers 386449408 bytes

Redo Buffers 1323008 bytes

Control file created.

Database altered.

3) Open the database in resetlog mode as follows.

a) sqlplus> alter database open resetlogs;

Statement processed.

c) Sqlplus>shutdown

d) Sqlplus> startup mount exclusive;

e) Sqlplus> alter database archivelog;

f) Sqlplus> archive log start;

g) Sqlplus> alter database open;

Example:

SQL> startup mount exclusive;

ORACLE instance started.

Total System Global Area 858277672 bytes

Fixed Size 743208 bytes

Variable Size 469762048 bytes

Database Buffers 386449408 bytes

Redo Buffers 1323008 bytes

Database mounted.

SQL> alter database archivelog;

Database altered.

SQL> archive log start;

Statement processed.

SQL> alter database open;

Database altered.

SQL> shutdown

Database closed.

Database dismounted.

ORACLE instance shut down.

Step 9

Sql> Create user OPS$ORADRD identified by system; (Where system is the password for Oracle level).

Sql> Create user OPS$DRDADM identified by system; (Where system is the password for Oracle level).

Sql> grant create session to OPS$ORADRD;

Sql> grant create session to OPS$DRDADM;

Sql> @ sapdba_role.sql (run this command before running BR tools. Path :)

Sql> create table SAPR3.SAPUSER( USERID VARCHAR2(256), PASSWD VARCHAR2 (256));

Sql> insert into SAPR3.SAPUSER values ('SAPR3', ‘sap’);

Sql> alter user sapr3 identified by sap;

Sql> select owner, object_name from all_objects where object_name like 'SAPUSER';

Sql> create user OPS$SAPSERVICEDRD default tablespace psapuser1d temporary tablespace psaptemp identified externally;

Sql> grant connect, resource to OPS$SAPSERVICEDRD;

Sql> create public synonym sapuser for OPS$DRDADM.SAPUSER;

Sql> grant select on sapuser to OPS$SAPSERVICEDRD;

Sql> brconnect -u system/manager -f chpass -o sapr3 -p sap

Drop OPS$ORADVP.SAPUSER;

Drop OPS$DVPADM.SAPUSER;

You can verify that the database was renamed to DRD by querying from V$DATABASE:

SQL> select name from v$database;

NAME

------

DRD

1 row selected.

4) To open SAP system, use the following commands.

su - DRDadm

startsap all

5)Apply temp license

Saplicense –temp.

SAP Steps:

1)Get saplicense for new SID.

2)Change SID in se06,stms, smlg, rz04, rz10, rz12, in any variants in standard basis jobs, sm59, spad

a.Run installation check: SICK/SM28
b. Install SAP License
c. Execute SE06
d. Execute STMS
e. Run Rz10 – Import Profiles
f. Create operation modes Rz03/Rz04
g. Execute SALE to create new logical system
h. Execute BDLS to change mapping from old logical system to new logical system
i. Create necessary RFC through SM59
j. Adapt all jobs needed in the target system –change target Host
k. Adapt Printer Deftn – SPAD –change spool servers
l. Check SMLG and change groups assignment
m. Check SM21/ST22/SM51/SM50/DB02/DB01 transactions