Book Review: Oracle Database Cloud Cookbook with Oracle Enterprise Manager Cloud Control 13c

13cCoverLatest Last week, I had a chance to read the latest book of my friend Porus Homi Havewala. If you’re interested in Oracle Enterprise Manager, you already knew him or at least read one of his articles/blog posts. He’s a Subject Matter Expert (SME) on Oracle Enterprise Manager Technology, Oracle Certified Master (OCM) and Oracle ACE Director. Porus created one of the world’s first blogs dedicated to Enterprise Manager (http://enterprise-manager.blogspot.com), and he is the author of the books, “Oracle Enterprise Manager Grid Control (published by Rampart)” and “Oracle Enterprise Manager Cloud Control 12c: Managing Data Centre Chaos (published by PACKT)”.

His latest book also focus about Oracle Enterprise Manager and titled as “Oracle Database Cloud Cookbook with Oracle Enterprise Manager Cloud Control 13c“. It’s a cookbook so the readers will get fast recipes to build your Hybrid Database Cloud using EM13c.

The book has 382 pages and there are 8 chapters:

1) Consolidation Planning for the Cloud: This chapter focuses on two tools offered by the Enterprise Manager: The Host Consolidation Planner and the Database Consolidation Workbench. In this chapter, you’ll see sample usage of both tools.

Oracle Enterprise Manager Plugin for PostgreSQL

Oracle Enterprise Manager supports 3rd party plugins which can help you to extend its monitoring and manageability capabilities. There are already developers and companies specialized in plugin development. Blue Medora is one of them (and probably the most famous one). In this blog post, I’ll show you how we can use Blue Medora’s EM PostgreSQL plugin, which is part of their True Visibility Suite for Oracle. I’ll download and deploy the plugin on the OMS (management servers), then deploy the plugin on the agent(s) and at the end, I’ll add a PostgreSQL target to our Enterprise Manager system.

The PosgteSQL plugin is not available on Self-Update, so we need to download and register it manually to our Enterprise Manager. To download the trial version of the plugin, I go to their website, click “download trial”, and fill a form to request trial version. Blue Medora will see our form and send us an email with download link of the plugin. After I download the zip file to my OMS server (ie into the temp folder), I issue the following commands:

postgres1

Installing EM13c Agents on Microsoft Windows Target Hosts

If your EM13c OMS installed on Unix-based OS, and want to deploy agents to Windows servers, you need to install Cygwin to target windows server to use regular deployment process. You can also use PsExec utility but in this case, you need a Microsoft Windows staging server. Installing Cygwin to enable SSH on Windows may sound like an unnecessarily complex solution at first, but Cygwin is easy to install and it comes with lots of useful utilities. So It’s worth installing. In this blog, I’ll show how to deploy EM agent on Microsoft Windows target. I’ll download and install Cygwin to the target server, enable SSH service and create user for SSH. After these steps, I’ll use Enterprise Manager Add Host page to deploy Enterprise Manager agent to the target Windows server like it’s just another Linux host.

First login to the target Windows server with administrator user and download Cygwin from https://www.cygwin.com/install.html. Depending on your CPU architecture (is there any one still using 32bit?) you need to download setup-x86.exe or setup-x86_64.exe from the installation page. These are very small executables, and they will download the required packages from the internet.

cygwin2

When you run the setup-x86_64.exe, you see the welcome screen. You click NEXT to choose a download source. If your target server has no internet access, you can install packages from a local directory. That means, you can use the packages downloaded by another Cygwin installation on another server. All you need is to use a shared location or copy files from other server which is already Cygwin installed. Click NEXT to continue.

cygwin3

How to Modify the Retention Time for Metric Data in EM13c

Some Enterprise Manager customers, complain about the high volume of data stored in OMS repository. Enterprise Manager agents collect metric data of targets they monitor, and upload these “raw” metric data to OMS. Depending on your metric collection periods and number of targets, the volume required to keep these data can be very huge. Enterprise Manager has already a mechanism to minimize the size of the Management Repository. Once a day, the previous day’s metric data (which is stored in em_metric_values) is aggregated into a one-hour and a one-day table (em_metric_values_hourly, em_metric_values_daily). According to the retention settings, both raw metric data and aggregated data are purged.

The default retention time for raw metric data is set to 7 days. The default retention time for hourly aggregate metric data is set to 31 days, and the default retention time for daily aggregate data is set 12 months. You can check the current retention using get_retention function in the gc_interval_partition_mgr package:

Reading Data From Oracle Data Files (without Connecting Database)

I attended the BGOUG Spring Conference last week as a speaker. While in BGOUG Conference, I had a chance to listen Kamil Stawiarski’s session about hacking Oracle. Kamil spoke about potential security issues of high level privileges such as create any index and create directory. At the end of the session, he also showed a tool written by himself. The tool (I do not remember its name right now), reads a datafile, searches for object ID (of a table) and parse and list the rows of the table.

I am aware that Oracle Support has a similar utility, and as I heard it’s called “DUL” (Data UnLoader). DUL is used to export data from data files in case there’s no possibility to open the database because of corruption. So the concept wasn’t new to me, but seeing the tool in action, made me want to write my own tool which is capable of extracting data from data files.