Home > Database > Mysql Tutorial > body text

Linux下删除Oracle实例

WBOY
Release: 2016-06-07 16:56:17
Original
1229 people have browsed it

/u01/app/oracle/product/10.2.0/db_1/dbs/orapwtestdb/u01/app/oracle/product/10.2.0/db_1/dbs/spfiletestdb.ora2.4、最重要的

前两天远程重建Oracle实例过程中遇到的问题,记录如下:
1、vnc遭遇常见错误
[root@db1 bdump]# vncserver
You will require a password to access your desktops.
Password:
Verify:
New 'db1.bts.com:1 (root)' desktop is db1.bts.com:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/db1.bts.com:1.log
运行dbca出现下面错误:
[oracle@Text bin]$ ./dbca
Xlib: connection to "192.168.8.157:0.0" refused by server
Xlib: No protocol specified
java.lang.NoClassDefFoundError
处理:在root用户下执行xhost +后,su - oracle切换到oracle用户下运行dbca建库即可。

2、删除oracle实例记录
方法一、从图形界面运行dbca,选择删除,按提示一路next;
方法二、我用的方法
2.1、关闭所有oracle进程,其实只要shutdown abort即可。因我的机器oracle没设置为开机自动启动,所以重启机器后oracle进程一个也没有,,系统很是干净。
2.2、删除实例数据文件和dump文件;
find $ORACLE_BASE/ -name $ORACLE_SID
在我系统里面显示如下,将这些目录直接删除;
/u01/app/oracle/admin/testdb
/u01/app/oracle/oradata/testdb
/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/testdb
/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/dbca/testdb
2.3、删除其他配置文件
find $ORACLE_BASE/* -name '*[Bb][Tt][Ss][Dd][Bb]2*' | grep -v admin| grep -v  oradata
将查找结果出现的文件也一一删除,当然你可以用xarg结合rm删除。
我find结果如下:
 /u01/app/oracle/flash_recovery_area/testdb
/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/testdb
/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/dbca/testdb
/u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_host_testdb
/u01/app/oracle/product/10.2.0/db_1/rdbms/log/alert_testdb.log
/u01/app/oracle/product/10.2.0/db_1/host_testdb
/u01/app/oracle/product/10.2.0/db_1/host_testdb/sysman/emd/state/A190EE260BF6B09EB580580728916A3B.alert_testdb.log
/u01/app/oracle/product/10.2.0/db_1/host_testdb/sysman/log/nmctestdb1521
/u01/app/oracle/product/10.2.0/db_1/dbs/alert_testdb.log
/u01/app/oracle/product/10.2.0/db_1/dbs/lktestdb
/u01/app/oracle/product/10.2.0/db_1/dbs/hc_testdb.dat
/u01/app/oracle/product/10.2.0/db_1/dbs/orapwtestdb
/u01/app/oracle/product/10.2.0/db_1/dbs/spfiletestdb.ora
2.4、最重要的一步,如果你要重建的实例和刚删除实例的实例名一样的话,删除/etc/oratab文件最后一行。
至此,已干净删除Linux系统的Oracle实例!

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template