Common Oracle script Agent problem handling script

Source: Internet
Author: User
Agent often encounters various problems during upload. Common methods are to clean up logs or secure. A script has been compiled. This script applies to the environment of standalone and RAC.

Agent often encounters various problems during upload. Common methods are to clean up logs or secure. A script has been compiled. This script applies to the environment of standalone and RAC.

Agent often encounters various problems during upload. Common methods are to clean up logs or secure.

A script is compiled. This script applies to the single-host and RAC environments.

Configure environment variables.

#! /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

Related reading:

Oracle EM Grid Control cannot connect to the agent

Script File Execution and related configuration after Oracle 11g database is created

Oracle Data Guard (RAC + DG) archive deletion policies and scripts

Oracle 11g new feature: replace variables in the RMAN script

Initialize the bash shell script for Oracle users and tablespaces

,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.