1、删除数据库【RAC】
[root@whepi1 ~]# su - oracle
[oracle@whepi1 ~]$ sqlplus / as sysdba
SQL> alter system set cluster_database=FALSE scope=spfile;
SQL> exit
2、关闭数据库
$ srvctl stop database -d epimes
3、节点1操作启动到独占模式
$ sqlplus / as sysdba
SQL>shutdown immediate;
SQL>startup mount exclusive;
SQL>alter system enable restricted session;
SQL>drop database;
----删除注册信息【root用户】
#cd /u01/grid/11.2.0.4/bin
# ./srvctl remove instance -d epimes -i epimes1
# ./srvctl remove instance -d epimes -i epimes2
# ./srvctl remove database -d epimes
4、删除数据库软件/[ORACLE/GIRD]
【root】
节点1:
/u01/grid/11.2.0.4/crs/install/rootcrs.pl -deconfig -verbose -force
节点2:
/u01/grid/11.2.0.4/crs/install/rootcrs.pl -deconfig -lastnode -force
两节点
# rm -f /etc/init.d/init.ohasd
# rm -f /etc/inittab.crs
# rm -rf /etc/ora*
# rm -f /usr/tmp/.oracle/*
# rm -f /tmp/.oracle/*
# rm -f /var/tmp/.oracle/*
#rm -rf /u01/*
# rm -rf /usr/local/bin/ora*
---ASM磁盘组格式
# dd if=/dev/zero of=/dev/mapper/ocr3 bs=1M count=100
# dd if=/dev/zero of=/dev/mapper/ocr2 bs=1M count=100
# dd if=/dev/zero of=/dev/mapper/ocr1 bs=1M count=100
# dd if=/dev/zero of=/dev/mapper/mes1.1 bs=1M count=100
# dd if=/dev/zero of=/dev/mapper/mes1.2 bs=1M count=100
# dd if=/dev/zero of=/dev/mapper/mes1.3 bs=1M count=100
# dd if=/dev/zero of=/dev/mapper/mes1.4 bs=1M count=100
# dd if=/dev/zero of=/dev/mapper/arch1 bs=1M count=100
# dd if=/dev/zero of=/dev/mapper/mes2.1 bs=1M count=100
# dd if=/dev/zero of=/dev/mapper/mes2.2 bs=1M count=100