Checklist Change SID
CHECKLIST CHANGE SID
Followings all the abbreviation used in this procedure/checklist
= SAP SID
SSID
= Source SID
TSID
= Target SID
= Host name
= SAP Instance number
= SAP Instance name (e.g. DVEBMGS00)
= Home directory of SAP Oracle user
= Home directory of SAP Administrator
= Directory containing SAP profiles
= Directory containing oracle TNS control files
= Oracle Home
Related Notes :
Metalink Oracle :
15390.1 How to Determine and Change DB_NAME or ORACLE_SID
131321.1 How to Relink Oracle Database Software on UNIX
SAP :
SAP R3 Homogenous System Copy Guides 4.6cSR2
NoActivitiesScript/Notes/AppStart TimeEnd TimeStatus/Remark
Stop all instance & database (if instance is up). For Flashcopy approach, do not shutdown the instance
Saplicense temp (installed new temp license as different hardware key)
Change hostname refer note 8307
1. /usr/sap/TCP/SYS/profiles (DEFAULT.PFL, TCP_DV*, START_*)
2. /home/tcpadm (stopsap* & startsap*)
3. .dbenv* .sapenv* (/home/tcpadm & /oracle/TCP)
4. TPPARAM & TPPARAM_TNB.PFL
5. tnsnames.ora & listener.ora
6. adapt table INSTVERS
Create new group (if not exist)
sapsys
dba
oper
Create new userid for new instance (if not exist)
ora (group : dba, oper)
adm (sapsys,dba,oper)
Reconfigure the mount point (Veritas) to accommodate the SID nameAppendix A
Change owner/group for following files/directories
Directory
/usr/sap/ ( adm:sapsys
/export/sapmnt/ ( adm:sapsys
/usr/sap/trans ( adm:sapsys
/oracle ( oraadm:dba
/oracle/ ( oraadm:dba
/oracle//sapreorg ( oraadm:dba
/oracle//saparch ( oraadm:dba
/oracle//sapdata ( oraadm:dba
/oracle//orilog ( oraadm:dba
/oracle//mirrlog ( oraadm:dbachown: runInstaller: A file or directory in the path name does not exist.
chown: libnavhoa.a: A file or directory in the path name does not exist.
chown: hsdb_ora.so: A file or directory in the path name does not exist.
chown: hsdb_odbc.so: A file or directory in the path name does not exist.
chown: hsdb_syb.so: A file or directory in the path name does not exist.
chown: ldflags: A file or directory in the path name does not exist.
chown: JRE: A file or directory in the path name does not exist.
chown: libctxx9.so: A file or directory in the path name does not exist.Remove softlink and create new link with new location
Change ownership
Ms
co
Se
dw
Rename the following files or the contents (database)
/init.ora
/init.sap
/init.dba
/init.utl
/init.bki
/.dbenv_.csh
/.dbenv_.sh
/.sapenv_.csh
/.sapenv_.sh
/tnsnames.ora & listener.ora Appendix B
Rename the following files/contents (SAP Instance)
/startsap__
/stopsap__
/.dbenv_.csh
/.dbenv_.sh
/.sapenv_.csh
/.sapenv_.sh
/__
/START__
/DEFAULT.PFL
/usr/sap//
Relinking Oracle
Only needed if :
An OS upgrade has occurred.
A change has been made to the OS system libraries. This can occur during the application of an OS patch.
A new install failed during the relinking phase.
Individual Oracle executables core dump during initial startup.
An individual Oracle patch has been applied (However, explicit relink instructions are usually either included in the README or integrated into the patch install script)
# su ora
# relink all
Dump control file to trace from source instance
sqlplus /as sysdba
alter database backup controlfile to trace;
Rename trace file to control.sql
# cd /oracle/TCC/saptrace/usertrace
# ls ltr
rename the last trace file to control.sql
Ftp control.sql from source to target instance
(location : /oracle/
Edit control.sql
1. change all source to new TSID
a. vi control.sql
b. :%s///g
2. change location of datafiles to accommodate new SID
a. (1st step already do that)
3. set database to resetlogs noarchivelog
a. vi control.sql
b. change CREATE CONTROLFILE REUSE DATABASE SSID NORESETLOGS ARCHIVELOG;
to
CREATE CONTROLFILE SET DATABASE TSID RESETLOGS ARCHIVELOG;Refer Appendix C for sample of control.sql
Remove existing controlfiles
Startup database with new control.sql
# sqlplus /as sysdba
SQL > startup nomount
SQL > @control.sql
SQL > RECOVER DATABASE USING BACKUP CONTROLFILE;
SQL > alter database open resetlogs;
exec(): 0509-036 Cannot load program oracleTCC because of the following errors:
0509-150 Dependent module libjox9.a(shr.o) could not be loaded.
0509-022 Cannot load module libjox9.a(shr.o).
0509-026 System error: A file or directory in the path name does not exist.
ERROR:
ORA-12547: TNS:lost contact
The global database name may also need to be changed:
SQL > alter database rename global_name to .
Change entry in /etc/services
sapms to sapms
Check sap license and hardware key
Change NFS setting /usr/sap/trans to point to production server
Start up SAP & oracleermsr3stg02:tccadm 26> startsap r3
Starting SAP-Collector Daemon
------------------------------
******************************************************************************
* This is Saposcol Version COLL 20.79 03/08/22 46D - AIX v4.14 5L-64 bit 031027
* Usage: saposcol -l: Start OS Collector
* saposcol -k: Stop OS Collector
* saposcol -d: OS Collector Dialog Mode
* saposcol -s: OS Collector Status
* Starting collector (create new process)
******************************************************************************
/usr/sap/tmp/dev_coll moved to /usr/sap/tmp/dev_coll.old
saposcol on host ermsr3prd03 started
Checking SAP R/3 TCC Database
------------------------------
Database is running
rm: 0653-609 Cannot remove /tmp/o.
Operation not permitted.
Could not remove directory /tmp/o
Remove this directory manually and restart again
Starting SAP R/3 Instance
------------------------------
Startup-Log is written to /home/tccadm/startsap_ermsr3stg02_00.log
Startup of Instance failed
See /home/tccadm/startsap_ermsr3stg02_00.log for details
Check ORACLE_SID and DB_NAME
SQL> select instance from v$thread;
INSTANCE
DB_SID
To find the current value of DB_NAME:
SQL> select name from v$database;
NAME
DBNAME
Check SAP
SM21 (System Logs)
ST22 (Abap dump)
SM51 (Instance Information)
SMLG (remove load balancing group)
SM37 (remove all jobs belongs to old SID)
Post Installation
SE06 Choose database copy or migration
Click post installation processing
Reconfigure STMS
- delete old STMS configuration and create new TMS
- change /etc/hosts to accommodate new IP
Change database to noarchivelog mode
Start client copy
Appendix A
Unmounting Old Filesystem
#!/bin/sh
echo "Start /sbin/helpers/vxfs/bin/umounting Veritas File Systems..."
umount /export/sapmnt/TCP
umount/usr/sap/TCP
umount /export/usr/sap/trans
umount /oracle
umount /oracle/TCP
umount /oracle/TCP/sapreorg
umount /oracle/TCP/origlogA
umount /oracle/TCP/origlogB
umount /oracle/TCP/mirrlogA
umount /oracle/TCP/mirrlogB
umount /oracle/TCP/saparch
umount /oracle/TCP/sapdata1
umount /oracle/TCP/sapdata2
umount /oracle/TCP/sapdata3
umount /oracle/TCP/sapdata4
umount /oracle/TCP/sapdata5
umount /oracle/TCP/sapdata6
umount /oracle/TCP/sapdata7
umount /oracle/TCP/sapdata8
umount /oracle/TCP/sapdata9
/sbin/helpers/vxfs/bin/umount -o suid /dev/vx/dsk/sapprddg/intf /export/intf
/sbin/helpers/vxfs/bin/umount -o suid /dev/vx/dsk/sapprddg/ixosexchange /export/ixos-exchange
/sbin/helpers/vxfs/bin/umount -o suid /dev/vx/dsk/sapprddg/infastage /export/infastage
Mounting New Filesystem
#!/bin/sh
echo "Start /sbin/helpers/vxfs/bin/mounting Veritas File Systems..."
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/sapmnt /export/sapmnt/TCC
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/saphome /usr/sap/TCC
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/saptrans /export/usr/sap/trans
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/oracle /oracle
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/orahome /oracle/TCC
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/sapreorg /oracle/TCC/sapreorg
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/origlogA /oracle/TCC/origlogA
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/origlogB /oracle/TCC/origlogB
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/mirrlogA /oracle/TCC/mirrlogA
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/mirrlogB /oracle/TCC/mirrlogB
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/saparch /oracle/TCC/saparch
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/sapdata1 /oracle/TCC/sapdata1
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/sapdata2 /oracle/TCC/sapdata2
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/sapdata3 /oracle/TCC/sapdata3
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/sapdata4 /oracle/TCC/sapdata4
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/sapdata5 /oracle/TCC/sapdata5
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/sapdata6 /oracle/TCC/sapdata6
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/sapdata7 /oracle/TCC/sapdata7
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/sapdata8 /oracle/TCC/sapdata8
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/sapdata9 /oracle/TCC/sapdata9
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/intf /export/intf
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/ixosexchange /export/ixos-exchange
/sbin/helpers/vxfs/bin/mount -o suid /dev/vx/dsk/sapprddg/infastage /export/infastage
Appendix B
Parameters need to be changed
init.ora
db_name = TSID
control_files = new location
background_dump_dest = new location
user_dump_dest = new location
core_dump_dest = new location
log_archive_dest = new location
IFILE = new location (where applicable)
init.sap
backup_root_dir = new location
stage_root_dir = new location
compress_dir = new location
archive_copy_dir = new location
archive_stage_dir = new location
volume_archive = new naming convention
volume_backup = new naming convention
util_par_file = new location
initTCP.utl
BACKUPIDPREFIX = TSID_
CONFIG_FILE = new location
Appendix C
Sample of control.sql
#
# Set #2. RESETLOGS case
#
# The following commands will create a new control file and use it
# to open the database.
# The contents of online logs will be lost and all backups will
# be invalidated. Use this only if online logs are damaged.
STARTUP NOMOUNT
CREATE CONTROLFILE SET DATABASE "TCC" RESETLOGS ARCHIVELOG
-- SET STANDBY TO MAXIMIZE PERFORMANCE
MAXLOGFILES 255
MAXLOGMEMBERS 3
MAXDATAFILES 254
MAXINSTANCES 50
MAXLOGHISTORY 18151
LOGFILE
GROUP 15 (
'/oracle/TCC/origlogA/log_g15m1.dbf',
'/oracle/TCC/mirrlogA/log_g15m2.dbf'
) SIZE 80M,
GROUP 16 (
'/oracle/TCC/origlogB/log_g16m1.dbf',
'/oracle/TCC/mirrlogB/log_g16m2.dbf'
) SIZE 80M,
GROUP 17 (
'/oracle/TCC/origlogA/log_g17m1.dbf',
'/oracle/TCC/mirrlogA/log_g17m2.dbf'
) SIZE 80M,
GROUP 18 (
'/oracle/TCC/origlogB/log_g18m1.dbf',
'/oracle/TCC/mirrlogB/log_g18m2.dbf'
) SIZE 80M,
GROUP 19 (
'/oracle/TCC/origlogA/log_g19m1.dbf',
'/oracle/TCC/mirrlogA/log_g19m2.dbf'
) SIZE 80M,
GROUP 20 (
'/oracle/TCC/origlogB/log_g20m1.dbf',
'/oracle/TCC/mirrlogB/log_g20m2.dbf'
) SIZE 80M,
GROUP 21 (
'/oracle/TCC/origlogA/log_g21m1.dbf',
'/oracle/TCC/mirrlogA/log_g21m2.dbf'
) SIZE 80M,
GROUP 22 (
'/oracle/TCC/origlogB/log_g22m1.dbf',
'/oracle/TCC/mirrlogB/log_g22m2.dbf'
) SIZE 80M
-- STANDBY LOGFILE
DATAFILE
'/oracle/TCC/sapdata1/system_1/system.data1',
'/oracle/TCC/sapdata1/roll_1/roll.data1',
'/oracle/TCC/sapdata1/roll_2/roll.data2',
'/oracle/TCC/sapdata1/roll_3/roll.data3',
'/oracle/TCC/sapdata1/roll_4/roll.data4',
'/oracle/TCC/sapdata2/temp_1/temp.data1',
'/oracle/TCC/sapdata2/temp_2/temp.data2',
'/oracle/TCC/sapdata2/temp_3/temp.data3',
'/oracle/TCC/sapdata2/temp_4/temp.data4',
'/oracle/TCC/sapdata5/stabi_1/stabi.data1',
'/oracle/TCC/sapdata5/stabi_2/stabi.data2',
'/oracle/TCC/sapdata5/stabi_3/stabi.data3',
'/oracle/TCC/sapdata2/stabd_1/stabd.data1',
'/oracle/TCC/sapdata2/stabd_2/stabd.data2',
'/oracle/TCC/sapdata4/stabd_3/stabd.data3',
'/oracle/TCC/sapdata4/stabd_4/stabd.data4',
'/oracle/TCC/sapdata5/btabi_1/btabi.data1',
'/oracle/TCC/sapdata5/btabi_2/btabi.data2',
'/oracle/TCC/sapdata6/btabi_3/btabi.data3',
'/oracle/TCC/sapdata6/btabi_4/btabi.data4',
'/oracle/TCC/sapdata1/btabi_5/btabi.data5',
'/oracle/TCC/sapdata1/btabi_6/btabi.data6',
'/oracle/TCC/sapdata1/btabi_7/btabi.data7',
'/oracle/TCC/sapdata4/btabi_8/btabi.data8',
'/oracle/TCC/sapdata4/btabi_9/btabi.data9',
'/oracle/TCC/sapdata4/btabi_10/btabi.data10',
'/oracle/TCC/sapdata7/btabi_11/btabi.data11',
'/oracle/TCC/sapdata2/btabd_1/btabd.data1',
'/oracle/TCC/sapdata2/btabd_2/btabd.data2',
'/oracle/TCC/sapdata2/btabd_3/btabd.data3',
'/oracle/TCC/sapdata3/btabd_4/btabd.data4',
'/oracle/TCC/sapdata3/btabd_5/btabd.data5',
'/oracle/TCC/sapdata3/btabd_6/btabd.data6',
'/oracle/TCC/sapdata3/btabd_7/btabd.data7',
'/oracle/TCC/sapdata3/btabd_8/btabd.data8',
'/oracle/TCC/sapdata4/btabd_9/btabd.data9',
'/oracle/TCC/sapdata4/btabd_10/btabd.data10',
'/oracle/TCC/sapdata4/btabd_11/btabd.data11',
'/oracle/TCC/sapdata5/btabd_12/btabd.data12',
'/oracle/TCC/sapdata5/btabd_13/btabd.data13',
'/oracle/TCC/sapdata5/btabd_14/btabd.data14',
'/oracle/TCC/sapdata6/btabd_15/btabd.data15',
'/oracle/TCC/sapdata6/btabd_16/btabd.data16',
'/oracle/TCC/sapdata6/btabd_17/btabd.data17',
'/oracle/TCC/sapdata7/btabd_18/btabd.data18',
'/oracle/TCC/sapdata7/btabd_19/btabd.data19',
'/oracle/TCC/sapdata7/btabd_20/btabd.data20',
'/oracle/TCC/sapdata7/btabd_21/btabd.data21',
'/oracle/TCC/sapdata8/btabd_22/btabd.data22',
'/oracle/TCC/sapdata8/btabd_23/btabd.data23',
'/oracle/TCC/sapdata8/btabd_24/btabd.data24',
'/oracle/TCC/sapdata8/btabd_25/btabd.data25',
'/oracle/TCC/sapdata8/btabd_26/btabd.data26',
'/oracle/TCC/sapdata6/pooli_1/pooli.data1',
'/oracle/TCC/sapdata1/poold_1/poold.data1',
'/oracle/TCC/sapdata1/clui_1/clui.data1',
'/oracle/TCC/sapdata2/clud_1/clud.data1',
'/oracle/TCC/sapdata5/clud_2/clud.data2',
'/oracle/TCC/sapdata4/ddici_1/ddici.data1',
'/oracle/TCC/sapdata1/ddicd_1/ddicd.data1',
'/oracle/TCC/sapdata6/docui_1/docui.data1',
'/oracle/TCC/sapdata2/docud_1/docud.data1',
'/oracle/TCC/sapdata4/el46ci_1/el46ci.data1',
'/oracle/TCC/sapdata6/el46cd_1/el46cd.data1',
'/oracle/TCC/sapdata5/loadi_1/loadi.data1',
'/oracle/TCC/sapdata1/loadd_1/loadd.data1',
'/oracle/TCC/sapdata2/proti_1/proti.data1',
'/oracle/TCC/sapdata3/protd_1/protd.data1',
'/oracle/TCC/sapdata6/es46ci_1/es46ci.data1',
'/oracle/TCC/sapdata7/es46cd_1/es46cd.data1',
'/oracle/TCC/sapdata1/sourcei_1/sourcei.data1',
'/oracle/TCC/sapdata4/sourced_1/sourced.data1',
'/oracle/TCC/sapdata2/user1d_1/user1d.data1',
'/oracle/TCC/sapdata3/user1i_1/user1i.data1',
'/oracle/TCC/sapdata3/protd_2/protd.data2',
'/oracle/TCC/sapdata8/ybmci_1/ybmci.data1',
'/oracle/TCC/sapdata8/ybmcd_1/ybmcd.data1',
'/oracle/TCC/sapdata8/bmcd_1/bmcd.data1',
'/oracle/TCC/sapdata9/ybmci_2/ybmci.data2',
'/oracle/TCC/sapdata9/ybmcd_2/ybmcd.data2',
'/oracle/TCC/sapdata9/clud_3/clud.data3'
CHARACTER SET WE8DEC
;
# Recovery is required if any of the datafiles are restored backups,
# or if the last shutdown was not normal or immediate.
# RECOVER DATABASE USING BACKUP CONTROLFILE
# Database can now be opened zeroing the online logs.
# ALTER DATABASE OPEN RESETLOGS;
# No tempfile entries found to add.
#