Muitas vezes nos deparamos com problemas ao instalar a versão do Oracle 10g ou 11g Express Edition no Linux (normalmente no Ubuntu), e precisamos remover toda instalação para tentar re-instalar novamente.
Abaixo segue um Script para Limpeza total do Oracle XE na sua maquina, basta copiar e colar em seu prompt de comando com usuário SUDO para ter as permissões necessárias para executar os comandos.
Abaixo segue alguns dos erros que normalmente ocorrem ao instalar o Oracle:
Erro 1:
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Erro 2:
Erro ao desinstalar pelo Synaptic
Erro 3:
Starting Oracle Database 10g Express Edition Instance.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 2: No such file or directory
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cataserver)(PORT=1521)))
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed because target host or object does not exist
Abaixo segue o script para resolver todos os seus problemas:
sudo dpkg -r oracle-xe-universal
sudo dpkg -r oracle-xe
sudo dpkg -r oracle-xe:i386
sudo dpkg –purge oracle-xe-universal
sudo dpkg –purge oracle-xe
sudo dpkg –purge oracle-xe:i386
sudo rm -rf /usr/lib/oracle/xe
sudo rm -rf /etc/oratab
sudo rm -rf /etc/init.d/oracle-xe
sudo rm -rf /etc/sysconfig/oracle-xe
cd /
sudo rm -rf ./usr/lib/openoffice/program/openintro_ubuntu_oracle.bmp
sudo rm -rf ./usr/lib/openoffice/program/openabout_ubuntu_oracle.bmp
sudo rm -rf ./usr/lib/oracle
sudo rm -rf ./tmp/.oracle
sudo rm -rf ./etc/rc6.d/K20oracle-xe
sudo rm -rf ./etc/rc0.d/K20oracle-xe
sudo rm -rf ./etc/rc2.d/S20oracle-xe
sudo rm -rf ./etc/rc3.d/S20oracle-xe
sudo rm -rf ./etc/default/oracle-xe
sudo rm -rf ./etc/rc4.d/S20oracle-xe
sudo rm -rf ./etc/xdg/menus/oraclexe.menu
sudo rm -rf ./etc/rc1.d/K20oracle-xe
sudo rm -rf ./etc/rc5.d/S20oracle-xe
sudo rm -rf ./var/tmp/.oracle
sudo rm -rf ./var/lib/update-rc.d/oracle-xe
sudo rm -rf ./var/lib/dpkg/info/oracle-xe-universal.postrm
sudo rm -rf ./var/lib/dpkg/info/oracle-xe-universal.list
sudo rm -rf /usr/lib/oracle/xe
sudo rm -rf /etc/oratab
sudo rm -rf /etc/init.d/oracle-xe
sudo rm -rf /etc/sysconfig/oracle-xe
cd /
sudo rm -rf ./usr/lib/openoffice/program/openintro_ubuntu_oracle.bmp
sudo rm -rf ./usr/lib/openoffice/program/openabout_ubuntu_oracle.bmp
sudo rm -rf ./usr/lib/oracle
sudo rm -rf ./tmp/.oracle
sudo rm -rf ./etc/rc6.d/K20oracle-xe
sudo rm -rf ./etc/rc0.d/K20oracle-xe
sudo rm -rf ./etc/rc2.d/S20oracle-xe
sudo rm -rf ./etc/rc3.d/S20oracle-xe
sudo rm -rf ./etc/default/oracle-xe
sudo rm -rf ./etc/rc4.d/S20oracle-xe
sudo rm -rf ./etc/xdg/menus/oraclexe.menu
sudo rm -rf ./etc/rc1.d/K20oracle-xe
sudo rm -rf ./etc/rc5.d/S20oracle-xe
sudo rm -rf ./var/tmp/.oracle
sudo rm -rf ./var/lib/update-rc.d/oracle-xe
sudo rm -rf ./var/lib/dpkg/info/oracle-xe-universal.postrm
sudo rm -rf ./var/lib/dpkg/info/oracle-xe-universal.list
sudo rm -rf ./root/.sqldeveloper/system1.5.5.59.69/oracle.javatools.cache
sudo rm -rf ./usr/share/vim/vim72/syntax/sqloracle.vim
sudo rm -rf ./var/lib/dpkg/info/oracle-xe.list
sudo rm -rf ./var/lib/dpkg/info/oracle-xe.postrm
sudo rm -rf ./etc/rc3.d/S20oracle-xe
sudo rm -rf ./etc/rc4.d/S20oracle-xe
sudo rm -rf ./etc/rc0.d/K20oracle-xe
sudo rm -rf ./etc/rc5.d/S20oracle-xe
sudo rm -rf ./etc/rc6.d/K20oracle-xe
sudo rm -rf ./etc/rc1.d/K20oracle-xe
sudo rm -rf ./etc/init.d/oracle-xe
sudo rm -rf ./etc/rc2.d/S20oracle-xe
sudo rm -rf ./etc/default/oracle-xe
sudo rm -rf ./etc/xdg/menus/oraclexe.menu
sudo rm -rf ./usr/lib/oracle
sudo rm -rf ./usr/lib/oracle/xe/app/oracle
sudo rm -rf ./var/tmp/.oracle
sudo rm -rf ./var/lib/dpkg/info/oracle-xe.list
sudo rm -rf ./var/lib/dpkg/info/oracle-xe.postrm
sudo rm -rf ./var/lib/update-rc.d/oracle-xe
Abraços e até a Próxima
/:-D