Saturday, October 12, 2013

Linux Fedora 19 Oracle XE 11g Uninstall failed

I just upgrade my fedora 14 to Fedora 19. Done with some rsync and moving stuffs.
And here come the new Oracle XE 11 g installation process, finished and run smooth.
Heh?! So what was the problem? The problem is i've messed up with these 

impdp  system/system_password full=Y directory=DUMP_DIR 
 dumpfile=DB10G.dmp logfile=expdpDB10G1.log
impdp  system/system_password directory=DUMP_DIR 
 dumpfile=DB10G2.dmp logfile=expdpDB10G1b.log

Which i followed from here which guide me to migrating the whole data
of my Oracle XE 10g. The full expdp of XE 10g did not include the whole
users tablespace, forgive me i am not that familiar with this thing,
so to copy or just create new tablespace or something were not taken
or even tested. Since i've frustated Ctrl-C the import process and
ended up with broken database. The Oracle refused to start! Ok calm down 
lets just uninstall, i did the sudo yum remove oracle-xe...rpm, done!

Fresh localinstall with yum and the prompt says that i have to execute the init
script as root. Script run by root and set the port and it shows configuring the
database and done and load the listener and finish! I open my sqlplus / as sysdba.
It shows me idle connection prompt and hey! I did a little test, i queried

sql> select * from cat;

And it returns me that the oracle is shutting down in progress. I run this query

sql> shutdown immediate;

Run well, and then

sql> startup mount;

Unable to mount since there is no controll file??? Alright did some googling and
found that the previous yum uninstall did not remove the post-init oracle generated
files. What and where are the files you could have a very good reference here.
I run these commands:

rm -Rf /usr/lib/oracle/xe
rm -Rf /etc/oratab
rm -Rf /etc/init.d/oracle-xe
rm -Rf /etc/sysconfig/oracle-xe

Then yum uninstall and re-install and now everything work as expected. Hope
that this article could help you to solve the same problem. Actually you could
do re-init or re-configure without reinstall the oracle-xe. Just remove these files
/etc/sysconfig/oracle-xe, /etc/oratab. And as root run /etc/init.d/oracle-xe configure.
The controll files and database will be refreshed.

Hope it helps.

No comments: