Tuesday Apr 08, 2014

Consolidated Database Replay: Playing Nice Together

Here is a great article from resident Oracle ACE, Arup Nanda, who details insight into predicting the impact of consolidating separate database workloads into one. The article outlines a typical consolidation scenario and explains how Oracle Real Application Testing's Consolidated Database Replay capabilities can help measure the impact of the workload consolidation. A must read for those considering a consolidation project in the near future. Read the article.


Database work load patterns of two applications.


Stay Connected:
Twitter |
Facebook | YouTube | Linkedin | Newsletter
Download the Oracle Enterprise Manager 12c Mobile app

Friday Apr 04, 2014

Webcast: Database Cloning in Minutes using Oracle Enterprise Manager 12c Database as a Service Snap Clone

April 10 — 7:00 a.m. PT | 10:00 a.m. ET | 4:00 p.m. CET
April 24 — 10:00 a.m. PT | 1:00 p.m. ET
May 8 — 7:00 a.m. PT | 10:00 a.m. ET | 4:00 p.m. CET
May 22 — 10:00 a.m. PT | 1:00 p.m. ET

Since the demands from the business for IT services is non-stop, creating copies of production databases in order to develop, test and deploy new applications can be labor intensive and time consuming. Users may also need to preserve private copies of the database, so that they can go back to a point prior to when a change was made in order to diagnose potential issues. Using Snap Clone, users can create multiple snapshots of the database and “time travel” across these snapshots to access data from any point in time.

Join us for an in-depth technical webcast and learn how Oracle Cloud Management Pack for Oracle Database's capability called Snap Clone, can fundamentally improve the efficiency and agility of administrators and QA Engineers while saving CAPEX on storage. Benefits include:

  • Agile provisioning (~ 2 minutes to provision a 1 TB database)
  • Over 90% storage savings
  • Reduced administrative overhead from integrated lifecycle management

Register Now!


Stay Connected:
Twitter |
Facebook | YouTube | Linkedin | Newsletter
Download the Oracle Enterprise Manager 12c Mobile app

Wednesday Apr 02, 2014

Cloud Odyssey in London

The Cloud Odyssey event happened in London recently. Here is the Storify from the event. Enjoy!

Stay Connected:
Twitter |
Facebook | YouTube | Linkedin | Newsletter
Download the Oracle Enterprise Manager 12c Mobile app

Tuesday Apr 01, 2014

Managing Pluggable Database as a Service: Questions and Answers

Since the launch of Oracle Enterprise Manager 12c Release 3, we have received tons of questions around managing Oracle Multitenant, an Oracle Database 12c Enterprise Edition option, and pluggable databases (PDBs)—more specifically; questions about pluggable database as a service (PDBaaS). In this blog, we provide answers to some of the common questions from people.

Question: What qualifies a database to be pluggable?
Answer: A pluggable database must be a current Oracle Database 12c database, configured for multitenant through a new enterprise edition option called Oracle Multitenant. It delivers a new architecture that allows a multitenant container database (CDB) to hold many pluggable databases (PDBs). An Oracle Database in the old architecture (a “non-CDB”) may be upgraded to the multitenant architecture via a simple process known as “adopting the non-CDB as a PDB”. A PDB is a self-contained, fully functional Oracle Database, and includes its own system, sysaux and user tablespaces. You can learn more about Oracle Multitenant and pluggable database in this whitepaper.

Can the pluggable databases be plugged and unplugged across multiple platforms such as Solaris, AIX, and Linux?
The pluggable database must be endian compatible. Cross endian operations require OGG, Data pump or restore from backup.

In terms of database consolidation, what are the differences between using VMs, dedicated schemas and pluggable databases?
To describe the advantages of using pluggable database vs. other consolidation methods, it can be best illustrated in a simply comparison table.


Comparison of Database as a Service Consolidation Models

Pluggable database combines the best of all the other models and offers excellent consolidation, isolation, manageability and is suitable for any application that is certified to run on Oracle Database 12c. With the other models, we see certain shortcomings. For example, server virtualization offers good isolation but creates compliance and administrative headaches. Schema based consolidation offers ease of management and patching, but limited isolation.

How do you track configuration drift with a pluggable database? I certainly understand drift in the container database, but in what ways would a pluggable database drift from its standard baseline?
This pertains to Configuration Drift Tracking via Oracle Enterprise Manager 12c. One can compare any two Enterprise Manager targets or a complete system such as an Oracle Exadata Database Machine. When you compare at the PDB level, they can differ in the tablespace names, the storage settings of tablespace with same name, or users, etc. Using Oracle Enterprise Manager to track drift, it is particularly useful in comparing difference in your development, testing, and production environments. It is even useful for comparing your standby systems to set standards for compliance requirements.

What is a zone? Is it physical? Regional?
The Oracle Enterprise Manager 12c Cloud resource model involves pooling the same target types where it’s combining similar hosts, databases, hardware or other similar resources in to a zone. Zones can therefore be defined by the boundary of the Cloud and exposed through Oracle Enterprise Manager 12c’s self-service portal. In terms of the pluggable database as a service model, you can create Oracle Multitenant container databases and group them to form a database pool that users can then draw from. When the self-service user provisions a pluggable database, they need to simply specify the Zone where they want to deploy. Internally, Oracle Enterprise Manager uses load or configuration driven algorithms to place the PDB in the right CDB.

What will be the DBA and SYSADMIN role in the pluggable DBaaS environment?
With pluggable databases you have common users and local users as well as common roles and associated privileges and local roles and associated privileges. You can isolate user/role/privilege to the PDB by defining only local user/role/privilege. To leverage the manage many as one, you would define common user/role/privilege to act on all PDBs or a subset of PDBs where the common user has create session privileges within the PDB. You would define DBA roles and SYSADMIN roles based on common and/or local user roles.

What if you need custom configurations on a pluggable database? Once the database is deployed via self-service how do you make changes?
Some parameters are modifiable at the PDB level. You would check v$parameter ISPDB_MODIFIABLE value to determine what can be changed. Some customization can be done at the CDB level; however, they would affect all PDBs for that CDB. Oracle Enterprise Manager’s self-service provides a TNS Connect string to connect to the PDB with the right privilege and execute “ALTER SYSTEM” for the parameters that are permissible to change.

If I'm an application developer and I request a database with a certain pre-defined service level, what level of permissions should I expect with that database? Am I getting DBA or SYSDBA privileges with that request?
It depends on what was negotiated as part of the service definition and associated user/role/privileges defined for that service.

Are the pluggable database as a service capabilities for Oracle Database 12c included in Oracle Enterprise Manager 12c? Do we need a plug-in? Do we need to license Oracle Enterprise Manager 12c Database Management Packs?
You need the Oracle Enterprise Manager 12c database and cloud plug-ins. License-wise; the self-service provisioning from Oracle Enterprise Manager is licensed as part of Cloud Management Pack for Database. The Oracle Multitenant option must be licensed if two or more PDBs are plugged into a single CDB.
Watch this short demo called “Using Pluggable Database as a Service (PDBaaS) Self-Service Portal” for a better understanding of deploying PDBaaS using Oracle Enterprise Manager 12c.

Which Oracle Enterprise Manager 12c Management Packs are required to be able to provide DBaaS?
You need the Oracle Enterprise Manager 12c Cloud Management Pack for Database and Oracle Enterprise Manager 12c Lifecycle Management Pack for Database to do database as a service. Both of which must be licensed.

If you have shared memory and background processes in the container database, how do you allocate server resources to a particular pluggable database? Can you assign specific amount of CPU cycles, RAM and IOPS for a given pluggable database?
SQL execution is scoped to the PDB as identified by the con_id created during session create. In Oracle Database 12c, Resource Manager (RM) has been extended to include support for Oracle Multitenant. Policies may be defined at the PDB level in terms of the simple-yet-powerful concepts of “caps” and “shares” to determine the allocation of resources between PDBs. In this way, resource manager can control allocation of CPU, sessions and parallel execution servers. Additionally, on Oracle Exadata, Resource Manager can also manage IO and network. Memory management currently is implicitly managed through SGA LRU algorithms and CPU share management.

What is the largest number of pluggable databases you can deploy on Oracle Exadata?
Currently the PDB limit per CDB is 252 PDBs. In Oracle Real Application Clusters environments such as Oracle Exadata, the density of PDB consolidation greatly increases as you may have multiple CDBs per physical server and 252 PDBs per CDB. The maximum limit would be bound by compute resource constraints/limits. And as mentioned in the question on Zone, Oracle Enterprise Manager gives an ability to combine multiple CDBs into a Pool and handle transparent placement. The Oracle Enterprise Manager self-service user therefore won’t be exposed to the underlying limit.

Can I use pluggable database as a service if the target database is 9i or 10g?
You would need to migrate the Oracle Database 9i, 10g and 11g databases to Oracle Database 12c non-CDB and convert them into pluggable databases. The architectural changes within Oracle Database 12c are not backward compatible.

Can Active Data Guard be configured for selective pluggable databases from a container database? I do not want all pluggable databases to have a standby.
In the current release, Oracle Active Data Guard operates at the container level, however, PDB annotations are tagged in the redo stream, so PDB operations on the primary are reflected on the standby.

Does RMAN support pluggable databases?
Scheduled backups are at the CDB layer and include all PDBs. Ad-hoc backups can be executed on individual PDBs. Individual PDBs can be restored from backup.

For complete details of managing pluggable database as a service, be sure to watch this webcast: Delivering Pluggable Database as a Service

Stay Connected:
Twitter |
Facebook | YouTube | Linkedin | Newsletter
Download the Oracle Enterprise Manager 12c Mobile app

Monday Mar 31, 2014

Munhowen to Reduce Maintenance Costs and TCO by More Than 50 Percent

Munhowen, a leading Luxembourg beverage distributor, decided to replace its existing IT environment. By selecting Oracle technology, including Oracle Real Application Clusters, Oracle Enterprise Manager, Oracle Linux and Oracle ZFS Storage Appliances, the company was able to enhance system performance and reduce maintenance costs associated with sustaining an optimal hardware environment.

Jean-Pierre Rasquin, CIO, Munhowen, explains: “Implementing Oracle Real Application Clusters, Oracle Enterprise Manager, and Oracle ZFS Storage Appliance helped us to significantly increase our IT environment’s availability, scalability, and manageability—providing superior support, tailored to our business needs, while helping us to reduce maintenance costs.” Read the press release.

Stay Connected:
Twitter |
Facebook | YouTube | Linkedin | Newsletter
Download the Oracle Enterprise Manager 12c Mobile app

Thursday Mar 27, 2014

Cisco Improves Service Quality with Self-Managing Automation

Learn how Cisco improves its database application service delivery using Oracle Enterprise Manager.


Stay Connected:
Twitter |
Facebook | YouTube | Linkedin | Newsletter
Download the Oracle Enterprise Manager 12c Mobile app

Wednesday Mar 26, 2014

Infographic: Database Manageability—Getting Ahead of the Curve

As a DBA, getting ahead of the demands of the job are challenging enough, day in and day out. A recent IOUG survey on database management sheds new light on some of the top challenges facing administrators. Here's an infographic breakdown on what you need to know.

Download the IOUG Survey.

Stay Connected:
Twitter |
Facebook | YouTube | Linkedin | Newsletter
Download the Oracle Enterprise Manager 12c Mobile app

Tuesday Mar 25, 2014

Demo: Setting Up a Database Cloud Self Service Portal for Data Cloning Using Snap Clone

This demo shows how to setup a database cloud self service portal for data cloning using Snap Clone in Oracle Enterprise Manager 12c.

Stay Connected:
Twitter |
Facebook | YouTube | Linkedin | Newsletter
Download the Oracle Enterprise Manager 12c Mobile app

Friday Feb 14, 2014

WEBCAST: Accelerate Database Testing for Improved Agility

Accelerate Database Testing for Improved Agility and Cost Savings


Wednesday, February 26, 2014
10:00 AM PST | 1:00 PM EST


Join us in a webcast to learn how Oracle Real Application Testing—an Oracle Database 12c, Enterprise Edition option and Oracle Enterprise Manager 12c—work together to provide an easy-to-use solution for making changes to your mission-critical database. Learn from Oracle experts about the new Oracle Real Application Testing capability, SQL Performance Analyzer (SPA) Quick Check. It lets DBAs run quick validations on production databases for any system change.

Discover how SPA Quick Check helps to:

  • Safely test and deploy system changes using real workloads
  • Test consolidation scenarios for better resource management
  • Improve the quality of service for business agility and uptime
  • Reduce administrative effort and risks for database changes

Register now.

Stay Connected:
Twitter |
Facebook | YouTube | Linkedin | Newsletter
Download the Oracle Enterprise Manager 12c Mobile app

Friday Feb 07, 2014

VIDEO: Nationwide Deploys Database Applications 600% Faster

Watch the latest Nationwide video to see how they saved administrative time and effort using Oracle Enterprise Manager.



Stay Connected:
Twitter |
Facebook | YouTube | Linkedin | Newsletter
Download the Oracle Enterprise Manager 12c Mobile app

Thursday Jan 30, 2014

Oracle Enterprise Manager Helps Manage Systems for Gaia Mission

The Italian National Institute of Astrophysics (INAF) has selected Oracle to store, analyze and manage scientific data generated from the European Space Agency's Gaia mission. The mission sets out to provide in-depth 3-D mapping of the Milky Way galaxy over the course of the next 5 years. An estimated 1 petabyte of astronomical data (equivalent to 1 million gigabytes) will be collected and stored in Oracle Database with Oracle Enterprise Manager entrusted to manage the system.

The goal of the Gaia mission will give researchers a better understanding into how the Milky Way was formed and how it has evolved over time. According to Roberto Morbidelli, Scientific Operation Manager at INAF, "Our activity within the Gaia mission will provide a huge volume of information, a very precious heritage of astronomical data that will have to be stored for the whole 21st century and beyond. Oracle has demonstrated in other research contexts that it would be the ideal technological partner to manage scientific projects of this kind of size. Thus we are sure that it will be a successful choice for INAF too. Oracle has been selected for its technology’s reliability, scalability, availability and the appropriate technological evolution planned in the next years; also key was the competence showed by Oracle experts in the development of features useful to our research.”

Oracle Enterprise Manager will be deployed to help manage the multiple Oracle Database instances and Oracle Real Application Clusters. Oracle Enterprise Manager will be used to ensure reliable access to Gaia mission data, allowing for numerous third-party applications and systems that control and verify the correct functioning of satellites and astronomical instruments.

“We are proud to offer our technology to the Gaia mission, an international research project that is of both major importance and high ambition,” said Xavier Verhaeghe, Vice President, Technology & Big Data Oracle EMEA. “INAF’s choice is another confirmation of Oracle’s ability to easily manage the extreme challenges involved in processing petabytes of Big Data."

Follow the Gaia Mission on Facebook.
Read the press release.


Stay Connected:
Twitter |
Facebook | YouTube | Linkedin | Newsletter
Download the Oracle Enterprise Manager 12c Mobile app

Wednesday Aug 21, 2013

WEBCAST: Managing Oracle Database 12c


Thursday August 22
10:00 a.m. PST / 1:00 p.m. EST

Discover Oracle’s Next-Generation Database Management Solution

Don’t miss this opportunity to learn first-hand how Oracle Database 12c and Oracle Enterprise Manager 12c bring together the next evolution in self-manageability—so you can plug into the Cloud faster using the power of Oracle Database 12c.

Join us for this live webcast to discover new groundbreaking management capabilities for:

  • Real-time performance diagnostics and application tuning
  • Embedded database self-manageability
  • Managing many pluggable databases as one
  • Delivering reliable database cloud services

Only Oracle Enterprise Manager 12c offers customers maximum performance, enhanced automation, and total control for Oracle Database 12c.

Register Now!

Stay Connected:
Twitter |
Facebook | YouTube | Linkedin | Newsletter
Download the Oracle Enterprise Manager Cloud Control12c Mobile app

Friday Aug 02, 2013

Managing Oracle Database 12c

Oracle recently announced new management capabilities for Oracle Database 12c, providing customers with even more enhancements to improve productivity and manageability. The new Oracle Enterprise Manager 12c features are supported out-of-the-box with Oracle Database 12c. So whether you want to take advantage of the new Data Redaction capabilities at the security layer, or whether you want to take a look at some of the heat map capabilities in our Information Lifecycle Management or leverage the new performance management features, such as, Database Operations Monitoring or Enhanced Real-Time ADDM, you can use Oracle Enterprise Manager 12c to manage them all.

These new capabilities can be integrated with your standard monitoring and management that you already have in your environment without having to undertake any additional tools or any additional training. Simply install or upgrade to Oracle Enterprise Manager 12c and Oracle Database 12c and together these two products will let you plug into the Cloud.

Here is a quick summary of all the new Oracle Enterprise Manager 12c capabilities for Oracle Database 12c:

  • Complete lifecycle management of multitenant databases: Support for the entire lifecycle operations of multitenant databases that comprise migration, creation, cloning, patching and tracking for compliance
  • Consolidated database replay: Allows customers to test and plan their consolidation using Oracle’s multitenant container and pluggable database technology
  • At-source data masking: Allows customers to maximize compliance and security by masking data in-flight as it is being copied from production
  • Enhanced diagnostics: Improvements to Automatic Database Diagnostic Monitor (ADDM) for real-time and proactive problem detection, especially designed for catching short, transient performance issues
  • Real-time business operations monitoring: Monitors composite business operations such as; batch jobs and ETL operations, providing real-time reports on all SQLs and PL/SQLs executed inside the job
  • Performance hub: Newly redesigned performance home page that provides administrators with a single, at-a-glance view of all performance data and advisors
  • New Oracle Enterprise Manager Database Express 12c: An out-of-the-box, lightweight, easy-to-use web-based management solution for managing individual databases
  • Schema as a Service: This ultimate consolidation of databases lets administrators host multiple application schemas within a single database and offer database as a service to hundreds of application users without creating database sprawl
  • Snap Clone: Instant database cloning allows administrators to create fully functional copies of databases using the copy-on-write capabilities of the underlying storage layer

To learn more about all the latest capabilities, be sure to register for our upcoming webcast: Managing Oracle Database 12c with Oracle Enterprise Manager 12c.

Stay Connected:
Twitter |
Facebook | YouTube | Linkedin | Newsletter
Download the Oracle Enterprise Manager Cloud Control12c Mobile app

Tuesday Jul 16, 2013

Harness the power of Configuration Search to know what's out there and drive automation

Oracle Enterprise Manager collects and monitors configuration information for every target it manages and layers support for sophisticated lifecycle operations on top of this foundation. Within the configuration management area itself Enterprise Manager has formalized support for Drift Management, Inventory Management, Topology visualization and Compliance Management. Although these features cover a good segment of configuration management use cases there will always be additional uses for this important information. Enterprise Manager makes it easy to leverage this valuable information both inside and outside the product using the Configuration Search feature.

Within the Enterprise Manager UI, users can build sophisticated queries against Enterprise Manager’s configuration management repository to generate reports without writing even one line of SQL. If the Oracle provided Search library does not already contain a matching search a user can build a search to their exact specification completely graphically.

Outside of the Enterprise Manager UI, users can find and run saved searches using the EMCLI in both interactive and the new script mode. When used in a script, configuration search results can be used to drive other lifecycle operations like patch automation and provisioning.

In this article we will take a closer look at the Configuration Search feature using some common real world examples.

Arguably one of the most important configuration items collected by Enterprise Manager is applied patches. Finding the location of applied patches can cause some confusion at first owing to the new target model introduced in Enterprise Manager 12c. Oracle Home is now a separate and proper target with its own configuration collection which includes patch information. This makes great sense as patches are in fact applied to the Oracle Home and not the software running out of it.

The question is how can you figure out which targets ( ie databases ) are using which Oracle Homes? The answer is using relationships. Enterprise Manager 12c now discovers and collects relationships between targets. These relationships include both physical (observed) and logical (inferred from configuration). As an example, all databases running out of a given Oracle Home will have an “Installed At” relationship to its specific Oracle Home target. These relationships can be graphically viewed using the topology viewer available under the configuration menu of all targets. They can also be used when building a Configuration Search when starting with a well known target like database instance.

Find all single instance databases with Advanced Compression option that do not have a patch applied. – Step by Step

Let’s build a configuration search to find all single instance databases with Advanced Compression option that do NOT have a patch applied to their Oracle Home. Since patches are typically specific to a version let’s narrow it down to version 11.2.0.3 databases and patch 14275605. ( Database Patch Set Update : 11.2.0.3.4 )

1. Start by navigating to the Configuration Search Library. Enterprise->Configuration –>Search…

2. Click Create to start building a new Configuration Search.

3. Select Database Instance from the Target Type list of value.

Next we need to narrow the list of databases to those of version 11.2.0.3 and single instance. To do this we will use the target model to choose properties which contain this data so we can filter it further.

4. Click Properties on the Database Instance row.

5. Open the Target Properties and Instance Information folders and Select Property Name, Property Value,Version, Name and Selected as shown.

6. Click OK.

To filter down the results, we enter criteria into the text boxes to the right of the properties.

7. Enter 11.2.0.3 next to Version.

8. Enter ‘Advanced Compression’ for Name and ‘TRUE’ for Selected under Database Options

9. Select ‘Metric Scope’ for property Name and Enter ‘DB’ for value. ( Metric scope can have a value of DB for single instance and RACINST for RAC instances. )

Your search should look something like this:

At any point while you are creating a Configuration Search, you can see how your search is coming along by clicking Search. Doing so at this point will show results similar to the results shown here. ( Note: If you are not interested in seeing the results of a column you can uncheck the property to remove it from the results. )

At this point we need to pull the Oracle Home target into the picture to get at the applied patches configuration information.

10. Click Relationships on the Database Instance row.

11. Choose “Oracle Home” as the Destination Target Type then Click Search. This should result in one relationship type “Installed At”. Select this row and click OK.

We now have something that looks like this:

To add collected patch information from the Oracle Home target we need to use the target model again.

12. Click Properties on the Oracle Home row.

13. Open the “Patches installed in Oracle Home” folder and select “Patch ID” property.

14. Click OK.

15. Enter 14275605 in the text box next to “Patch ID” to narrow the results to this patch.

16. Click Search. You should see something similar to the results below.

But wait, this shows the databases that HAVE patch 14275605 installed. We are after databases that DON’T have this patch installed.

Fortunately we can achieve this result by using the “Advanced Options” capabilities.

17. Click the “Advanced Options” button on the “Patches installed in Oracle Home” row. ( Be sure to select the correct one! )

18. Change the Condition in the resulting dialog box to “NOT EXISTS”. ( The explanatory text shown just happens to use patch search as an example. )

19. Click OK.

Notice the addition of “Condition : NOT EXISTS” on the “Patches installed in Oracle Home” row. This will show targets in which none of the targets matches the criteria. In our case, an Oracle Home may have hundreds of patches applied. Only if none of the patch IDs equal 14275605 will the target be in the results.

20. Click Search.

This time, the results finally display what we are after. That is “11.2.0.3 Single Instance database with Advanced Compression option that do NOT have patch 14275605 applied.”

21. Click ‘Save As’ to save the search with the name “11.2.0.3 SI AC DBs without patch 14275605”.

22. Click OK.

The library now shows our new search. You or any other user can run the search by selecting it and clicking Run. You can modify it by using Edit or make a copy with Create Like to continue to refine it without affecting the original.

Running Configuration Search using Interactive EMCLI

As mentioned at the opening, Enterprise Manager Release 3 now supports the execution of saved Configuration Search from the EMCLI. There are two verbs with which you can run configuration searches: get_targets and run_configuration_search

The get_targets verb has been available since Release 1 but now has an additional switch to specify a configuration search. This results in a standardized result containing the Target Name, Target Type and Status.

Here is an example using the configuration search we just built.

The run_config_search verb generates results exactly as you see them in the results of the configuration search. The results are a little harder to read but the output could be re-directed to an output file for import into something like a document editor or spreadsheet for easier viewing or analysis.

Scripting Lifecycle processes using EMCLI Script mode

Enterprise Manager Release 3 introduced the EMCLI Script mode which is especially effective when performing tasks in bulk or many tasks at once. This mode enables you to create Jython scripts, store them as files and pass them as an argument to EMCLI. For more information on EMCLI see the documentation here.

In this section, we will expand on our previous work to automate the creation of patch plans to automate the application of the missing patch. We will use a python script to retrieve the list of databases without a patch, and then create a patch plan for each database.

As a prerequisite you must create a sample patch plan for a single instance database which has the desired patch ( 14275605 ) added to the plan. We will use this plan to create the others.

The work flow is as follows:

  1. Retrieve specified patch plan metadata and extract required patch information.
  2. Get list of databases without the patch applied using a configuration search.
  3. Create a patch plan for each database.

Here is the script in its entirety. Obviously you will need to make modifications for you environment, specific patch plan and configuration search names.


 #emcli_config_search.py

from emcli import *
import xml.dom.minidom


# Set Connection properties and logon
set_client_property('EMCLI_OMS_URL','https://oem.example.com/em')
set_client_property('EMCLI_TRUSTALL','true')
login(username='DWWOLF1',password='password')

patch_id = []
release_id = []
platform_id = []
language_id = []
target_type = []

# Get Sample Patch Metadata
pp_xml = show_patch_plan(name='PSU4 Rollout').out()

# Parse plan metadata into XML
patchPlan = xml.dom.minidom.parseString(pp_xml)

# Retrieve metadata for each patch in the sample patch plan
for patchList in patchPlan.getElementsByTagName("patchList"):
        for patch in patchList.getElementsByTagName("patch"):
                patch_id.append(patch.getElementsByTagName("id")[0].toxml().replace("<id>","").replace("</id>",""))
                release_id.append(patch.getElementsByTagName("release_id")[0].toxml().replace("<release_id>","").replace("</release_id>",""))
                platform_id.append(patch.getElementsByTagName("platform_id")[0].toxml().replace("<platform_id>","").replace("</platform_id>",""))
                language_id.append(patch.getElementsByTagName("language_id")[0].toxml().replace("<language_id>","").replace("</language_id>",""))
                target_type.append(patch.getElementsByTagName("target_type")[0].toxml().replace("<target_type>","").replace("</target_type>",""))

# Run stored configuration search to get list of databases missing the patch
target_array = get_targets(config_search='11.2.0.3 SI AC DBs without patch 14275605').out()['data']

# For each target create a patch plan containing the patches in the sample patch plan
for targets in target_array:
    tn = targets['Target Name']
    nodeCount = 0
    f = open('patchplan.txt', mode='w')
        for node in patch_id:
                f.write( "patch." + str(nodeCount) + ".patch_id=" + patch_id[nodeCount] + "\n")
                f.write( "patch." + str(nodeCount) + ".release_id=" + release_id[nodeCount] + "\n")
                f.write( "patch." + str(nodeCount) + ".platform_id=" + platform_id[nodeCount] + "\n")
                f.write( "patch." + str(nodeCount) + ".language_id=" + language_id[nodeCount] + "\n")
                f.write( "patch." + str(nodeCount) + ".target_name=" + tn + "\n")
                f.write( "patch." + str(nodeCount) + ".target_type=" + target_type[nodeCount] + "\n")
                nodeCount += 1
        f.close()
        planName = 'PSU4 ' + tn
        create_patch_plan(name=planName,input_file='data:patchplan.txt',impact_other_targets='add_all')

exit()


A zip of the script is available for download here.

Run the script by passing it as an argument to EMCLI:

>emcli @emcli_config_search.py

Here we can see all of the patch plans created by the script plus the sample patch plan “PSU4 Rollout”

Conclusion

Enterprise Manager’s Configuration Search feature is a powerful tool that can be leveraged both inside and outside of the UI. It can quickly and easily provide answers to difficult configuration questions without writing any SQL. When used via through the EMCLI it can be used to dynamically generate a target list which can be used to drive complex and otherwise time consuming tasks in the UI quickly and efficiently.

Configuration Search and patch automation are both features of Enterprise Manager’s Database lifecycle management pack.

For more information on Enterprise Manager’s database lifecycle management capabilities, visit http://www.oracle.com/technetwork/oem/lifecycle-mgmt/index.html

Stay Connected:

Twitter |  Face book |  You Tube |  Linked in |  Newsletter

Thursday Apr 11, 2013

Qualcomm Deploys Application Changes Faster with Oracle Enterprise Manager

Listen in as Qualcomm talks about saving time and energy by making application changes faster through Oracle Enterprise Manager.

Stay Connected:
Twitter |
Facebook | YouTube | Linkedin | Newsletter
Download the Oracle Enterprise Manager Cloud Control12c Mobile app
About

Latest information and perspectives on Oracle Enterprise Manager.

Related Blogs




Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
3
5
6
7
9
10
11
12
13
14
15
17
18
19
20
23
25
26
27
28
29
30
   
       
Today