My Presentations at DOAG & BGOUG: EMCLI Crash Course

Last week, I gave presentations at DOAG (German Oracle User Group) conference and BGOUG (Bulgarian Oracle User Group) autumn conference about Oracle Enterprise Manager Command Line Interface. It was my first time at these conferences, and both of them were wonderful.

Before each session at DOAG Conference, there was a video showing “how they prepared the last year’s DOAG conference”. What a professionalism! What a great team work! You know Germany is known for their high quality standards, and you could see it everywhere at DOAG conference. I feel privileged to speak there. I had chance to meet lots of people I know from Twitter, face to face.

ACE Dinner DOAG

I was very lucky to join to the ACE Dinner which was organized for the first time at DOAG!

Using EMCLI List Verb to Get Detailed Information of EM Targets

After the presentation about EMCLI at DOAG 2015, someone asked me how we can list database targets based on their operating systems. In my presentation, I told that there are more than 70 verbs which starts with “get_” and help you fetch information about EM objects, and if you can’t find what you’re looking for, you can use the “list” verb which is probably the most powerful verb of EMCLI. Now I try to show how we can use the list verb to fetch detailed information about EM targets.

Let’s say we want to list the databases running on Linux. The original question was how we can list the databases running on Windows but thanks God, I don’t have any databases running on Windows. So I changed the question. First let’s see what we can get by using “get_targets”:

emcli get_targets -target=”oracle_database”:

Screen Shot 2015-11-18 at 13.32.28

EMCLI Python Script File to Create Users

I’ll give presentations at DOAG 2015 on Tuesday (tomorrow), and at the BGOUG Autumn Conference on Saturday. My presentation will be about EMCLI (Enterprise Manager Command Line Interface). I will try to explain the basics of EMCLI, its terminology, the important points, and how we can use it with bash for scripting. I’ll also speak about EMCLI Python scripting, very short but useful into to Python and then share some sample scripts. Because of the time limit of the session, I need to be picky about sample scripts and put only a few ones (which points important points). I’ll share more sample scripts on my blog. The following script shows how you can write an EMCLI script which will read usernames, passwords and roles from a CSV file and then create these users as EM administrators. This script must be used with “EMCLI with Scripting Mode” (aka advancedkit):

How to Download EM12c R5 Installation Files Using Wget

Although EM12c R5 (12.1.0.5) was released about 2.5 months ago, I couldn’t find time to upgrade our EM12c system until now. I have decided to dedicate my day for upgrading our EM12c. I’m not planning to write a step by step document because it’s already documented well by other bloggers. I’ll just share my notes if I encounter any problem.

I have probably told several times that EM12c should have some internet access, at least, it should be able to reach My Oracle Support website. Luckily, our server has direct-access to the internet (not accepting any incoming connection requests), so I’ll download the installation files directly to the server. Because I like tricky things, I’ll use “wget” instead of an internet browser. I got a sample wget script from Oracle Support Website to download patches, and then modified it to download EM12c files. The script may be helpful if you’re planning to install EM12c to a remote server which you do not have X windows access.

Monitoring MongoDB using Oracle Enterprise Manager Cloud Control

Scott Wardrop from AIDEV told me that they produced a plugin for Oracle Enterprise Manager Cloud Control 12c to monitor MongoDB. We use MongoDB in our production systems, so I decided to examine the plugin and write a blog post about it. Unfortunately version of our MongoDB databases are too old (2.4.x series) so the plugin didn’t work. Of course, it didn’t stop me. We created a simple MongoDB Cluster environment to test the MongoDB plugin for EM12c.

Becasue the installation is well documented by the vendor, I will not give a step by step installation guide. You can find the installation document on the download page. By the way, you need to manually download and deploy the plugin using EMCLI. Before you start deployment, send an email to info@aidev.uk for the unlock password (of the zip file). After you receive the password, download the latest plugin zip file, unzip it and run EMCLI:

After the installation is done, you need to deploy it to the OMS, and to the agents running on MongoDB servers.

mongoagent

Before you add the MongoDB targets using “Add Targets Declaratively by Specifying Target Monitoring Properties”, you also need to make some preparation on target MongoDB database and server. First you need to create a “monitoring” user. Login to target MongoDB database and run the following scripts: