OEM Agent Core directory deleted/re-add–What Happen? (EXADATA)
Ever have one of those days when someone calls and says “We/I accidently deleted the whole directory; can you get it back for me”? Well, over the weekend I had that happen with an OEM 12c agent on an Exadata, where the core directory for the agent was deleted by mistake. Before I could evaluate the situation, I had to reassure the end user that the removal of the core directory under the agent home wasn’t a major issue. The agent was still running in memory and reporting to OEM. For all intensive-purposes the agent was still monitoring the Exadata node.
After the end user was assured that the problem could be fixed, the question became: How can the missing core directory be replaced?
The simplest way is to do a reinstall of the agent silently; however, this takes a lot of time and effort to get it working again. I wanted the shortest possible way to recover the directory so there would not be a huge window of unmonitored time.
In this post, what I want to show you how I recovered the agent’s core directory and didn’t loose any targets or have to resync the agent from OEM afterwards.
Note: I have a good post on agent silent installs located here which is helpful to understand some of the process that was used. Although, I cover every environment in my post for silent installs, Maaz Anjum covers silent installs for windows pretty well too; check it out here.
As I mention in the note above, I needed to pull the correct agent binaries from the OMS library (outlined in the silent install post). Once I had the binaries extracted to a temporary location, I needed to edit the response file (agent.rsp). The response file was edited according to the silent install post.
The values that were changed within the response file were for:
OMS_HOST
EM_UPLOAD_PORT
AGENT_REGISTRATION_PASSWORD
AGENT_INSTANCE_HOME
AGENT_PORT
ORACLE_HOSTNAME
s_agentHomeName
All the values for these variables need to match what the existing agent had (information can be found in OEM under Setup –> Manage Cloud Control –> Agents).
With the response file ready, before I can run a silent install; the currently running agent needs to be stopped. With the core directory gone, the only way to stop the running agent is to using “ps –ef | grep agent” and “kill –9 <process id>”.
Reminder: there will be two (2) process that need to be killed; one which is a Perl process and the other a Java process. Once the processes are killed the agent that was running is down.
Once the agent is down, installing the agent software using the silent install method can be done. Now, here is where the install process becomes different from a normal agent installation. Earlier I said the core directory under the agent home was deleted. This means that everything else is still in place; only have to relink the core directory of the binaries. How can I get only the core directory out of the binaries?
In trying to answer this question, I used the -help option with the agentDeploy.sh script. The –help option provides a few examples on how to use the agentDeploy.sh script. I have listed these examples below:
Example1:
agentDeploy.sh AGENT_BASE_DIR=/scratch/agent OMS_HOST=hostname.domain.com EM_UPLOAD_PORT=1000 INVENTORY_LOCATION=/scratch AGENT_REGISTRATION_PASSWORD=2Bor02B4
This command is expected to do the complete agent install and configuration with the provided inputs.
Example2:
agentDeploy.sh AGENT_BASE_DIR=/scratch/agt RESPONSE_FILE=/scratch/agent.rsp -softwareOnly -invPtrLoc /scratch/agent/oraInst.loc -debug
This command is expected to copy the agent bits to the agent base directory.
Example3:
agentDeploy.sh AGENT_BASE_DIR=/scratch/agent OMS_HOST=hostname.domain.com EM_UPLOAD_PORT=1000 -forceConfigure
This command is expected to do the agent install and also force the agent configuration even though the oms host and port are not available.
Example4:
agentDeploy.sh AGENT_BASE_DIR=/scratch/agent AGENT_INSTANCE_HOME=/scratch/agent/agent_inst -configOnly
This command is expected to do the agent configuration only with the provided inputs.
Example5:
agentDeploy.sh AGENT_BASE_DIR=/scratch/agent s_agentHomeName=myAgent -ignorePrereqs
This command is expected to skip the prereqs and then continue with the agent deployment also notice in the inventory that instead of the default home name, myAgent home name will be assigned for the agent home.
As I looked at the examples, I noticed Example 2; a software only install. I decided to give that a try. Keep in mind all I needed was the core directory. The command I used to do a software only install was:
./agentDeploy.sh AGENT_BASE_DIR=/u01/app/oracle/product/agent12c RESPONSE_FILE=/tmp/agent_12030/agent.rsp –softwareOnly
As the deployment started, I noticed that the rebuilds and relinks for all the binaries was be performed on the the agent home. Once the deployment is done updating all the dependences, the deployment completes successfully and returned me to the command problem.
The software only deployment of the silent install replaced the missing core directory in the agent home. Now the only question left was will the agent start?
To test if the agent would start, I needed to go into the agent home:
$ cd /u01/app/oracle/product/agent12c/core/12.1.0.3.0/bin
$ ./emctl status agent
In running the above commands, I was expecting to see the agent status as being down since I have just completed the agent deployment. What I received instead is an unusual error. The error was:
$ ./emctl status agent
EM Configuration issue. #DEFAULT_EMSTATE# not found.
In researching this error (#DEFAULT_EMSTATE#) in My Oracle Support (MOS), there were only two notes that were found (1607805.1/1543473.1). From reading the notes and reviewing the emctl
file under the core directory, I identified that the problem was a configuration problem. In order to fix this configuration problem, what needed to be done?
To make a long story short, the simplest way to fix this issue was to copy an emctl from another Exadata node. The reason why this was the simplest is due to all the nodes have the same agent home configurations. Once the updated emctl was put in place, I was able to start and get all the information I wanted from the agent.
With the agent running, my next question was what was OEM’s reaction to the agent being reconfigured/built this way? To my surprise, OEM didn’t have a problem. The agent was able to upload with no issues and OEM reported that no re-syncing was needed. The only thing I can conclude from this is that the configuration files were never deleted and when the core directory was relinked, OEM thinks everything is as it was before the core directory was deleted.
Enjoy!
twitter: @dbasolved
blog: http://dbasolved.com
Current Oracle Certs

Bobby Curtis
I’m Bobby Curtis and I’m just your normal average guy who has been working in the technology field for awhile (started when I was 18 with the US Army). The goal of this blog has changed a bit over the years. Initially, it was a general blog where I wrote thoughts down. Then it changed to focus on the Oracle Database, Oracle Enterprise Manager, and eventually Oracle GoldenGate.
If you want to follow me on a more timely manner, I can be followed on twitter at @dbasolved or on LinkedIn under “Bobby Curtis MBA”.

you’re in point of fact a good webmaster. Thhe website loading pace is
incredible. It seems that you’re doing any unique trick.
Moreover, The contents are masterpiece. you haqve
perfrmed a wonderful activity on this matter! https://www.waste-ndc.pro/community/profile/tressa79906983/
buy propecia finasteride australia Dosage Adjust according to patient s condition and age
Undeniably believe that which you said. Your favorte justification seemed to be
on the web the simplest thing to be aware of. I say too you, I definitely
get irked while people consider worries that they just don’t know about.
Yoou managed to hit the nail upon the top and defined out the whole thing without having side-effects , people could take a signal.
Will probabnly be back to geet more. Thanks https://livesoccerbets.mystrikingly.com/
I really like itt when people get together and share ideas.
Great site, stick with it! https://sportdraws.blogspot.com/2025/01/how-to-predict-draws-in-soccer.html
Because the admin of this web site is working,
no uncertainty very soon it will be renowned, due too its feature contents. https://wakelet.com/wake/xWblwzyaw5JFTW9IzP0OF
Awesome! Itts actually amazing paragraph, I have got much clear idea concerning from
this post. https://caramellaapp.com/milanmu1/230AKFi_C/how-to-calculate-expected-value
Ahaa, its nice discussion on the topic of this paragraph here at this web site, I have read all that, so at this time me also comjmenting
here. https://gogobetting.mystrikingly.com/
If some one needs expert viesw concerning blogging
and site-building after that i advise him/her to pay a
visit this webpage, Keep up the good work. https://gogetmushrooms.wordpress.com/
generic augmentin cost Here, response time was derived from psychomotor vigilance test to objectively quantitate the tiredness of the subject
I know this if off topic but I’m looking into starting my own blog and was wonering what all is requuired to get set up?
I’m assuming having a blog like yours would cost a pretty penny?
I’m not very internet savvy so I’m not 100% sure. Any tips or addvice would
be greatly appreciated. Thank you https://spain-integradom.mystrikingly.com/
Hi friends, how is the whole thing, and what you desire to sayy on the topic of this piece
of writing, in my view its in fact amazing in support of me. https://www.nepris.com/app/user/2044781
Generally I don’t read article on blogs, but I wish
to say that this write-up very pressured me to take a look at andd do so!
Your writing taste has been amazed me. Thanhk you, very great article. https://www.muvizu.com/Profile/gameaviator/Latest
Your method of telling all in this article iis genuinely nice, evbery oone can without difficulty be aware of it, Thanks
a lot. https://medium.com/@Alvin3Lee/the-high-flying-humor-of-chaos-aviator-where-comedy-meets-aviation-fb07a2b0c735
Hello to all, as I am in fact eager of reading this web site’s post to be updated regularly.
It contwins good stuff. https://aviatorgamecomin.wordpress.com/2024/10/14/aviator-game-by-spribe-play-online-crash-game-in-india/?_gl=1%2A1u6qro0%2A_gcl_au%2AMjgzMTI1NjQuMTcyODg0ODkzNA..
I’m extrtemely inspired tgether with your writing talentfs and also with the layout for your blog.
Is this a paid subject or did youu modify it yourself?
Either way keep up the nice high quality writing, it’s uncommon to look a
great weblog like this one today.. https://www.myvipon.com/post/1436220/How-Play-Guide-for-Beginners-amazon-coupons
I have fun with, lead to I iscovered just what I was having a look
for. You have ended my four day lengthy hunt! Good Bless you man. Have a
great day. Bye https://slides.com/wardtaylor/risk-management-strategies-to-minimize-potential-losses-in-aviator
It’s the best time to make a few plans for the long run and it is
time to be happy. I’ve learn this publish and if I may jus I
wish to recommend you some attention-grabbing things or suggestions.
Perhaps you could write nexst articles regarding this article.
I desure to learn even more issues about it! https://www.intensedebate.com/people/aviatorgame5
Having read this I believed iit was really enlightening.
I appreciate you finding the time and effort to put this shlrt article
together. I once again find myself spending a significant amount of time both reading and
posting comments. But so what, it was still worthwhile! https://www.astrobin.com/users/Aviator/
There’s certainly a great deal to fiind oout about this topic.
I love all the points you’ve made. https://teampages.com/teams/2017957-StephineMetz–other–team-website/announcements
Wonderful website. Plenty of helpful information here.
I amm sending it to a few friends ans addiitionally shuaring
in delicious. And obviously, thanks for your sweat! https://schoolido.lu/user/aviatorcas/
Hi there, I found your blog vvia Googhle whilst looking
for a comparable subject, your ssite got here up, it seems to be good.
I’ve bookmarked it in my google bookmarks.
Hello there, ust became aware oof your blog thru Google, aand located thhat it is really informative.
I am going to watch out for brussels. I’ll appreciate if you happen to proceed this inn future.
Many people will likely be benefited out of your writing. Cheers! https://psychonautwiki.org/wiki/User_talk:AngelaRunion
Wow! Finally I got a web site from where I be
capable of in fact take useful data concerning my study
and knowledge. https://afterpad.com/forums/viewtopic.php?pid=214228
Hi there would you mind letting me kno which hosting company you’re working
with? I’ve loaded your blog in 3 different browsers aand I mustt ssay thjs blog loafs a lot faster
then most. Can you recommend a good interenet hosting provider at a honest price?
Thanks, I appreciqte it! https://www.merchantcircle.com/blogs/aviator-east-tallassee-al/2024/1/Online-Gambling-and-Data-Security-Threats-and-Protective-Measures/2647920
I am in fact grateful to the owner of this web page
wwho has shaed this impressive article att here. https://portfolium.com/entry/free-demo-games-the-best-way-to-get-to-know-new-g
naturally like youur web site but you have to take a look at the spelling
on quite a few of your posts. A number of them are rife with spelliing iszsues and I find it very troublesome to infom the truth nevertheless I’ll surely come
again again. https://www.notebook.ai/users/764351
Hello, i thinnk that i noticed you visited my
weblog so i got here to go back the prefer?.I am trtying too find thinggs to enhance my website!I assume its adequate to use a few of your ideas!! https://www.easyhits4u.com/profile.cgi?login=m94506650&view_as=1
Hello! Someone in my Facebook group shared this website with us
so I came to look it over. I’m definitely enjoying the information. I’m
book-marking and wwill bee tweeting this to my followers!
Terrific blog and great design. https://community.usa.canon.com/t5/media/gallerypage/comment-id/50220/image-id/54535iC3A94033955148AF/user-id/241513
Heya i am for the first time here. I found this
board and I find It truly useful & it helped me out much.
I hope to give something back and aid others luke you helped me. https://linktr.ee/aviator15
Definitely imagine that that you stated. Your favourite reason seemd to be at the internet the easiest thing to take into accout of.
I ssay to you, I definitely get irked even as people think
about issues tthat they just don’t know about.
You managed to hit thee nail upon the top and defined out the entire thing without
having side effect , other people can take a signal.
Will likely be agai to gett more. Thanks https://niadd.com/article/1303192.html
hey there and thank you forr your information – I’ve definitely picked up something new from right here.
I did however expertise some technical issues using this
web site, sincee I experienced to relkad the site a lot of times
previous to I could get it to load correctly. I had been wondering if your
web hosting is OK? Not that I’m complaining, but slow loading instances times will very frequently
affect your placement in google and can damage youyr high quality score if advertising and marketing with Adwords.
Anyway I am adding this RSS to my e-mail and couhld look out forr a lot
more of your respective exciting content. Ensure that you update this again very soon. https://niadd.com/article/1321453.html
Hi, Neat post. There is a problem together with yyour website in web
explorer, would check this? IE nonetherless is the market leader and a large portion of other people
will miss your greatt writing due to this problem. https://pbase.com/whitekira
Hi! I know this is kinda off topic but I
was wondering if you knew where I could find a captchaa plugin for myy comment form?
I’m using the sawme blog platform as yours and I’m having trouble
finding one? Thanks a lot! https://www.walkscore.com/people/329000949391/aviator-game
Its like you read my mind! You seem to know a lot
about this, like you wrote thee book in it or something.
I think that you could do with a few pics to drive the
message home a bit, but other than that, this is wonderful
blog. A fantastic read. I will definitely be back. https://www.livinlite.com/forum/index.php/topic,3454.0.html
This article offers clear idea for the new viewers of blogging,
that in fact how tto do blogging. https://doodleordie.com/profile/aviatorcasino
I used to be suggested this website through my cousin. I amm not poisitive whhether tbis put up
is written through him ass no one else understand such targeted about my trouble.
You’re wonderful! Thank you! https://wakelet.com/wake/xGZ0hevx8Du3vghz7lCHE
Mighty Dog Roofing
Reimer Drive North 13768
Maple Grove, MN 55311 United Տtates
(763) 280-5115
affordable flat roofing systems
Wonderful work! That is the type of information that are
supposed to be shared around the net. Shame on the search engines for not positioning
this submit upper! Come on over and consult with my web site
. Thanks =)
Thankfulness to my father who informed me about this web site, this
website is truly amazing.
Wonderful web site. A lot of useful info here.
I am sending it to some pals ans also sharing in delicious.
And obviously, thanks to your effort!
Aw, this was a very nice post. Spending some time and actual effort to create a really good article… but what can I say… I put things off a whole lot and don’t manage to get nearly anything done.
I used to be suggested this blog by means of my cousin.
I am now not positive whether or not this post is written through
him as no one else understand such detailed approximately
my problem. You are amazing! Thanks!
Wonderful beat ! I would like to apprentice while
you amend your site, how could i subscribe for a blog web
site? The account aided me a acceptable deal. I had been a
little bit acquainted of this your broadcast provided
bright clear idea
Ahaa, its nice dialogue about this post here at this website,
I have read all that, so now me also commenting at this place.
My brother recommended I might like this website. He used to be entirely right.
This put up actually made my day. You cann’t believe just how much time I had spent for this information! Thank you!
Valuable information. Fortunate me I found your website by chance, and
I am stunned why this twist of fate did not came about earlier!
I bookmarked it.
What i do not realize is in reality how you’re not actually a lot more neatly-favored than you may be now.
You’re so intelligent. You already know thus significantly relating to this subject, produced me
for my part imagine it from numerous various angles. Its like women and men don’t
seem to be involved unless it’s something to accomplish with
Girl gaga! Your personal stuffs excellent. At all times take care of it up!
I know this web page gives quality depending articles or reviews and additional information, is there
any other web site which offers these kinds of
data in quality?
Does your blog have a contact page? I’m having trouble locating it but, I’d like to shoot you an email.
I’ve got some ideas for your blog you might be interested in hearing.
Either way, great blog and I look forward to seeing it improve over time.
Thanks for your marvelous posting! I truly enjoyed reading it, you will be
a great author. I will ensure that I bookmark your
blog and will eventually come back from now on. I want to encourage continue your great job, have a nice
weekend!
I loved as much as you will receive carried out right here.
The sketch is tasteful, your authored subject matter
stylish. nonetheless, you command get bought an impatience over
that you wish be delivering the following. unwell unquestionably come more
formerly again since exactly the same nearly very often inside case you shield this hike.
What’s up mates, its wonderful article on the topic of educationand completely defined, keep it up all the time.