如何清除 oracle rac log trc trm
1个回答
2015-01-15 · 知道合伙人互联网行家
关注
展开全部
如果直接把OracleHome删掉,杀掉所有相关进程,重启机器也可以解决问题,不过我认为这是一种比较粗暴的方式。
1. stop and delete RAC instance, drop the database
2. stop and delete ASM instance
3. stop and delete listener
4. stop crs stack and clean related resource
5. clean ocr context
6. change permission and remove related ORACLE directory and Clusterware directory 其中4,5都可以直接利用Clusterware 目录install下面的脚本进行,所以这里主要介绍1,2,3,6.1. stop and drop database#!/bin/kshdb=`srvctl config database`
echo “db=$db”
nl=`srvctl config databaes -d $db | awk ‘{print $2}’`
echo “nl=$nl”srvctl stop database -d $db
srvctl remove database -d $db -ffor n in $nldoecho “stop and remove instance on instance $n”
srvctl stop instance -d $db -i $n
srvctl remove instance -d $db -i $n -fdone
echo “stop and remove database instance done”2. stop and drop asm instance#!/bin/kshnl=`olsnodes`for n in $nldosrvctl stop asm -n $n
srvctl remove asm -n $ndone
echo “stop and remove asm done”3. stop and drop listenerlsnr=`crs_stat |grep lsnr | cut -d= -f2`
for l in $lsnrdocrs_stop $l
crs_unregister $ldone
echo “stop and remove listener done”4. stop crs stack and clean related resource 这里需要注意的是,这里的操作必须一个节点一个节点的执行,不能并行操作,就如同安装的时候执行root.sh一样!切记切记.on local node:
$ORA_CRS_HOME/install/rootdelete.sh local nosharedvar nosharedhomeon remote nodes:
$ORA_CRS_HOME/install/rootdelete.sh remote nosharedvar nosharedhome5. clean ocronly execute this on local node:
$ORA_CRS_HOME/install/rootdeinstall.sh6. change permission and remove directory
这里之所以要更改权限是因为安装后期运行root.sh的时候会把ORA_CRS_HOME的父目录改为root权限,下次安装的时候必须修改为oracle用户chown -Rf ractest:oinstall $ORA_CRS_HOME/../../../
1. stop and delete RAC instance, drop the database
2. stop and delete ASM instance
3. stop and delete listener
4. stop crs stack and clean related resource
5. clean ocr context
6. change permission and remove related ORACLE directory and Clusterware directory 其中4,5都可以直接利用Clusterware 目录install下面的脚本进行,所以这里主要介绍1,2,3,6.1. stop and drop database#!/bin/kshdb=`srvctl config database`
echo “db=$db”
nl=`srvctl config databaes -d $db | awk ‘{print $2}’`
echo “nl=$nl”srvctl stop database -d $db
srvctl remove database -d $db -ffor n in $nldoecho “stop and remove instance on instance $n”
srvctl stop instance -d $db -i $n
srvctl remove instance -d $db -i $n -fdone
echo “stop and remove database instance done”2. stop and drop asm instance#!/bin/kshnl=`olsnodes`for n in $nldosrvctl stop asm -n $n
srvctl remove asm -n $ndone
echo “stop and remove asm done”3. stop and drop listenerlsnr=`crs_stat |grep lsnr | cut -d= -f2`
for l in $lsnrdocrs_stop $l
crs_unregister $ldone
echo “stop and remove listener done”4. stop crs stack and clean related resource 这里需要注意的是,这里的操作必须一个节点一个节点的执行,不能并行操作,就如同安装的时候执行root.sh一样!切记切记.on local node:
$ORA_CRS_HOME/install/rootdelete.sh local nosharedvar nosharedhomeon remote nodes:
$ORA_CRS_HOME/install/rootdelete.sh remote nosharedvar nosharedhome5. clean ocronly execute this on local node:
$ORA_CRS_HOME/install/rootdeinstall.sh6. change permission and remove directory
这里之所以要更改权限是因为安装后期运行root.sh的时候会把ORA_CRS_HOME的父目录改为root权限,下次安装的时候必须修改为oracle用户chown -Rf ractest:oinstall $ORA_CRS_HOME/../../../
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询