Migrate/Upgrade to Oracle 8.0.4
Unix Operating System Version
O/S must have at least version 4.0.
R/3 Release
Before the ORACLE migration your R/3 System must be one
of the following Release : 3.0D, 3.0E, 3.0F, 3.1G, 3.1H
Restricting DBA Authorization
  - Change to UNIX groups and UNIX users.
 
  As user root : 
  
    - Create new UNIX group oper.
 
    - Assign the users <sapsid>adm and ora<sapsid> to this group.
 
    The assignment then appears like this :
    <sapsid>adm : sapsys, oper, dba.
    ora<sapsid> : dba, oper 
  
  - Setting up OPS$ Connect Mechanism.
 
  Log : $ORACLE_HOME/dbs/chdbpass.log.
  
    
    - Mount CD SAP KERNEL.
 
    - Log on as user ora<sapsid> at the UNIX level.
 
    - Shutdown sap r3 system.
 
    - Copy tool chdbpass from the CD to directory $ORACLE/dbs with :
 
    cd $ORACLE_HOME/dbs
    cp /<CD-Dir>/UNIX/COMMON/INSTALL/CHDBPASS chdbpass
    - Start chdbpass with : ./chdbpass
 
    - Enter password for ORACLE user SYSTEM.
 
    
    - You will first be prompted for the password for the new user
      OPS$<sapsid>adm, and then new password for the user SAPR3. You can enter the old
      password again for SAPR3.
 
  
Storage Requirements
Digital UNIX :
/oracle/<SAPSID> : 950 MB
/oracle/stage : 500 MB
/tmp : 50 MB.
Requirements Specific to the
Operating System
Make sure file /etc/sysconfigtab contain following entries :
ssm-threshold=0
Preparing for Migration
Shutdown the R/3 System
Proceed as follows to read in the data and to prepare for orainst :
  - Create a Staging Area.
 
  Log on as user ora<sapsid>
  If the following directories already exist, delete their contents:
  /oracle/stage
  /oracle/stage/stage_723
  /oracle/stage/stage_733
  Create an empty /oracle/stage/stage_804 directory.
  - Read data from the CD to staging area. 
 
  Enter the following commands :
  cd /oracle/stage/stage_804
  ./<CD-Dir>/UNIX/UPGRADE.ORA
  - Copy the orainst directory to the home directory belonging to ORACLE user of database
    that is to be installed.
 
  Enter commands :
  cd $ORACLE_HOME
  rm rf orainst
  cp r /oracle/stage/stage_804/orainst orainst
  cp r /oracle/stage/stage_804/orainst orainst_sap
  - Make the following modification to the database :
 
  
    - Change system rollback segment :
 
    svrmgrl
    SVRMGRL> connect internal
    SVRMGRL> alter rollback segment system storage (next 1M maxextents 100);
    - Extend the tablespace SYSTEM by 300 MB (use sapdba add datafiles).
 
  
  - Shut down database.
 
  - Check the following enviroment variables :
 
  ORACLE_HOME=<ORACLE_HOME>
  ORACLE_SID=<SAPSID>
  TWO_TASK à may not be set
  - Set new environment variables :
 
  Make sure all new variables are set permanently in profile of users <sapsid>adm
  and ora<sapsid>.
  To do this edit files .dbenv_<host>.sh and .dbenv_<host>.csh in home directory
  of <sapsid>adm and ora<sapsid>
  For csh, edit : .dbenv_<host>.csh both in <sapsid>adm and ora<sid> with
  setenv STAGING_AREA /oracle/stage/stage_804
  setenv LIBRARY_PATH $ORACLE_HOME
  setenv LD_LIBRARY_PATH $ORACLE_HOME/lib
  setenv SAPDATA_HOME $ORACLE_HOME
  - Stop the orasrv and listener process for Oracle 7.2.3. For Oracle 7.3.3 only stop the
    listener process.
 
  Check using the command :
  ps ef | grep orasrv or ps axu | grep orasrv
  ps ef | grep tnslsnr or ps  axu | grep tnslsnr
  To stop the orasrv process, enter the following command :
  $ORACLE_HOME/bin/tcpctl stop
  To stop the listener process, enter the following command :
  $ORACLE_HOME/bin/lsnrctl stop
  - Check whether any ORACLE processes are active for this SAPSID. To do this, enter command
    :
 
  
    ps afe | fgrep <SID>
  
Set the following environment variable (C shell):
setenv DISPLAY <host_name>:0
Set the following environment variables in the newly opened window (C shell):
setenv ORACLE_TERM vt100
setenv TERM vt100
setenv ORACLE_DOC $ORACLE_HOME
 
Migration
Installing the Migration Utility
 
As user ora<sid> proceed as follows :
  - $STAGING_AREA/migrate_prepare.sh
 
  - cd $ORACLE_HOME/orainst_sap
 
  - ./orainst
 
  - Confirm all screens with ENTER.
 
  - Exit orainst.
 
Migrating the ORACLE Dictionary
 
Make sure that when performing the migration step that you have 1.5 GB of free
disk space in the dictionary $ORACLE_HOME/saparch.
As user ora<sid> proceed as follows :
  - Set the following environment variables (C shell):
 
  setenv ORA_NLS32 $ORACLE_HOME/ocommon/nls/admin/data
  setenv ORA_NLS33 $ORACLE_HOME/migrate/nls/admin/data
  - $STAGING_AREA/migrate_dbfiles.sh
 
  - cd $ORACLE_HOME/orainst_sap
 
  ./orainst 
  - Confirm all screen with ENTER.
 
  - Install Migration Utility : ORACLE7, Enter.
 
  - Exit orainst with Exit.
 
Following Up the Migration of the ORACLE-Dictionary
  - Check file install.log, make.log, sql.log, and os.log à
    dont contain any error messages.
 
  - Make sure the database has been shutdown by checking the file alert_<SID>.log
    This file is in the directory $ORACLE_HOME/saptrace/background. The last entry should read
    : COMPLETED : ALTER DATABASE DISMOUNT.
 
  - Move all control file from its directory.
 
  - Check whether the file conv<SID>.dbf exists in the directory
    $ORACLE_HOME/dbs.
 
  
    Caution : You cannot continue with the migration if this file does not exist.
    First remove the cause of the error, and then continue with this migration step.
  
  - cp /oracle/<SID>/dbs/conv<SID>.dbf
    /oracle/<SID>/orainst_sap/conv<SID>.dbf\
 
  - Move all control file from their directories.
 
Installing Version 8.0.4 of the ORACLE Software
As user ora<sid> proceed :
  - cd $ORACLE_HOME/orainst_sap
 
  ./del_ora.csh
  - $STAGING_AREA/migrate_software.sh
 
  - cd $ORACLE_HOME/orainst_sap
 
  ./orainst
  - Confirm all screens with Enter.
 
  - Enter Oracle workdir : can be /tmp or /usr/tmp
 
  Note : Oracle workdir must have at lease 50MB free storage.
  - Exit orainst with Exit.
 
Converting the Database to ORACLE 8.0.4
 
Modify the file $ORACLE_HOME/dbs/init<SID>.ora as follows :
  - Remove the following parameters, if they exist :
 
  checkpoint_process
  COMPATIBLE
  ccf_io_size
  Replace db_writers with dbwr_io_slaves.
  Mark db_writers if it is not mark.
  Insert the following parameter. if it already exists, adjust the value :
  db_file_multiblock_read_count = 8
  - Start the conversion as user ora<sid> :
 
  - cd $ORACLE_HOME/orainst_sap
 
  svrmgrl
  SVRMGR> connect internal
  SVRMGR> @convert
  SVRMGR> shutdown
  SVRMGR> exit
Action after the Migration
  - Log on as user ora<sid> at operating system level.
 
  - Execute the following commands to follow up the migration :
 
  svrmgrl
  SVRMGR> connect internal
  SVRMGR> startup
  SVRMGR> @postinst_migrate
  SVRMGR> exit
  You can find the log in directory $ORACLE_HOME/orainst_sap in file postinst.txt (read
  note 101449)
  - Enter the following command as user ora<sid> :
 
  $ORACLE_HOME/bin/lsnrctl start
  - chmod 755 $ORACLE_HOME
 
  - SAPDBA role must be created.
 
  - Insert CD ORACLE RDBMS 8.0.4.
 
  cd $ORACLE_HOME/dbs
  cp /sapcd/UNIX/COMMON/DBA_ROLE.SQL sapdba_role.sql
  cd $ORACLE_HOME/dbs
  sqlplus internal @sapdba_role <SID> UNIX
  - Logon as user <sid>adm
 
  - cd /usr/sap/<SID>/SYS/exe/run
 
  rm sapdba brarchive brbackup brconnect brrestore brtools
  CAR xvf /sapcd/UNIX/DEC/DBATOOLS.CAR .
  su root
  chown ora<sapsid> sapdba brarchive brbackup
  chown ora<sid> brconnect brtools
  chmod 4775 sapdba brarchive brbackup brconect brtools
  exit
  - Remove user <sid>adm from group dba.
 
You must then adjust the environment for all users <sapsid>adm and
ora<sapsid>, proceed as follows :
  - Adjustment for all users <sapsid>adm.
   
  Reset the following variables :
  setenv ORACLE_HOME /oracle/<SAPSID>
  setenv ORA_NLS /oracle/<SAPSID>/ocommon/NLS_723/admin/data
  setenv ORA_NLS32 /oracle/<SAPSID>/ocommon/NLS_733/admin/data
  setenv ORA_NLS33 /oracle/<SAPSID>/ocommon/NLS_804/admin/data
  
  - Adjustments for the user ora<sid>.
 
  The following variable must be reset :
  setenv ORA_NLS33 /oracle/<SAPSID>/ocommon/nls/admin/data
  - Make sure that the new variables in profiles of the users <sapsid>adm and
    ora<sapsid> are set permanently. Edit file .dbenv_<host>.sh and
    .dbenv_<host>.csh in home directories of <sapsid>adm and ora<sid>.
 
Enter the following commands as user ora<sid> :
cd $ORACLE_HOME/network/lib
make f ins_network.mk tnsping
mv tnsping ../../bin