agent经常在upload的时候, 会遇到各种问题. 常见的方法, 清理一下日志, 或者secure。整理了一个脚本. 这个脚本适用单机与rac的环
agent经常在upload的时候, 会遇到各种问题. 常见的方法, 清理一下日志, 或者secure。
整理了一个脚本. 这个脚本适用单机与rac的环境。
注意配置好环境变量.
#!/bin/bash
$agent_home/bin/emctl stop agent
sleep 2
rm -fr $agent_home/$hostname/sysman/log/*
rm -fr $agent_home/$hostname/sysman/emd/collection/*
rm -fr $agent_home/$hostname/sysman/emd/state/*
rm -fr $agent_home/$hostname/sysman/emd/upload/*
rm -f $agent_home/$hostname/sysman/emd/lastupld.xml
rm -f $agent_home/$hostname/sysman/emd/agntstmp.txt
rm -f $agent_home/$hostname/sysman/emd/sqlnet.log
rm -f $agent_home/$hostname/sysman/emd/protocol.ini
$agent_home/bin/emctl resettz agent
sleep 2
$agent_home/bin/emctl clearstate agent
sleep 2
$agent_home/bin/emctl secure agent
sleep 2
$agent_home/bin/emctl start agent
sleep 4
$agent_home/bin/emctl status agent
sleep 2
$agent_home/bin/emctl upload agent
相关阅读:
oracle em grid control 不能连接agent问题
创建oracle 11g数据库后脚本文件执行及相关配置
oracle data guard (rac+dg) 归档删除策略及脚本
oracle 11g新特性:rman脚本中使用替换变量
初始化oracle用户以及表空间的bash shell脚本
,