Reinstall Oracle database

Pre-installation steps

Check free space. For installation of oracle you will need at least following space:

  • 4GB at $ORACLE_HOME (etc. /oracle/YDQ/102_64/)
  • 100MB at DBSID (etc. /oracle/YDQ/)
  • 5GB at stage (etc. /oracle/stage/)
  • 400MB at temp (etc. /tmp/)

You have to stop all SAP processes, all Oracle processes. Example of UNIX commands:

stopsap all
lsnrctl stop LISTENER_YDQ
wiki sap reinstall oracle database
wiki sap reinstall oracle database

Check if every process was finished and if not kill it. Example of UNIX commands:

ps -ef | grep oraydq
ps -ef | grep ydqadm
kill 23456

Backup/remove $ORACLE_HOME directory. To be on safe side instead of removing you can rename it. Example of UNIX command:

mv /oracle/YDQ/102_64 /oracle/YDQ/102_64_old

Clean Oracle inventory settings by backuping/removing or renaming oraInventory and oraInst.loc files. Example of UNIX commands:

mv /oracle/YDQ/oraInventory /oracle/YDQ/oraInventory_old
mv /var/opt/oracle/oraInst.loc /var/opt/oracle/oraInst.loc_old

Move installation files to stage. When installing SAP, Oracle installation files are copied to stage folder (etc. /oracle/stage/). You can probably find the previous installation files here. If they are not there please copy installation files here from your source. Copy patchset and SBP installation files here too.

Set DISPLAY variable. If you are using remote x-windows you have to set properly environment DISPLAY variable. Example of UNIX commands:

#example of C shell (csh) command
setenv DISPLAY
#example of Korn shell (ksh) and Bourne shell (sh) command


Download files from installation medium or get them from SAP marketplace. Afterwards install database using OUI (Oracle Universal Installer) tool. More details how to do it can be found in following articles:

Post-installation activities

Relink the database binaries with following UNIX command:

$ORACLE_HOME/bin/relink all

Start the listener by executing following UNIX command:

lsnrctl start LISTENER_YDQwiki sap reinstall oracle database

Start the database by executing following SQL command:

STARTUPwiki sap reinstall oracle database

Test DB connection with following UNIX command:

R3trans -dwiki sap reinstall oracle database

Start SAP with following UNIX command:

startsap allwiki sap reinstall oracle database

Leave a Reply