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

Friday Mar 28, 2014

Oracle Database 2 Day + Performance Tuning Guide

Great Resource for Learning Oracle Database 12c and Oracle Enterprise Manager 12c

The guide includes coverage of Oracle Diagnostics Pack and Oracle Tuning Pack features such as Automatic Database Diagnostic Monitor (ADDM), Active Session History (ASH) Analytics, SQL Tuning Advisor, Real-time SQL Monitoring and more. Download the PDF or HTML verision.

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

Thursday Feb 27, 2014

Fast Recovery Area for Archive Destination


If you are using Fast Recovery Area (FRA) for the archive destination and the destination is set to USE_DB_RECOVERY_FILE_DEST, you may notice that the Archive Area % Used metric does not trigger anymore. Instead you will see the Recovery Area % Used metric trigger when it hits a Warning threshold of 85% full, and Critical of 97% full. As this metric is controlled by the server side database thresholds it cannot be modified by Enterprise Manager (see MOS Note 428473.1 for more information). Thresholds of 85/97 are not sufficient for some of the larger, busier databases. This may not give you enough time to kickoff a backup and clear enough logs before the archiver hangs. If you need different thresholds, you can easily accomplish this by creating a Metric Extension (ME) and setting thresholds to your desired values.  This blog will walk through an example of creating an ME to monitor archive on FRA destinations, for more information on ME's and how they can be used, refer to the Oracle Enterprise Manager Cloud Control Administrator's Guide

[Read More]

Tuesday Feb 18, 2014

Monitoring Archive Area % Used on Cluster Databases


One of the most critical events to monitor on an Oracle Database is your archive area. If the archive area fills up, your database will halt until it can continue to archive the redo logs. If your archive destination is set to a file system, then the Archive Area % Used metric is often the best way to go. This metric allows you to monitor a particular file system for the percentage space that has been used. However, there are a couple of things to be aware of for this critical metric.

Cluster Database vs. Database Instance

You will notice in EM 12c, the Archive Area metric exists on both the Cluster Database and the Database Instance targets. The majority of Cluster Databases (RAC) are built against database best practices which indicate that the Archive destination should be shared read/write between all instances. The purpose for this is that in case of recovery, any instance can perform the recovery and has all necessary archive logs to do so. Monitoring this destination for a Cluster Database at the instance level caused duplicate alerts and notifications, as both instances would hit the Warning/Critical threshold for Archive Area % Used within minutes of each other. To eliminate duplicate notifications, the Archive Area % Used metric for Cluster Databases was introduced. This allows the archive destination to be monitored at a database level, much like tablespaces are monitored in a RAC database.

In the Database Instance (RAC Instance) target, you will notice the Archive Area % Used metric collection schedule is set to Disabled.

If you have a RAC database and you do not share archive destinations between instances, you will want to Disable the Cluster Database metric, and enable the Database Instance metric to ensure that each destination is monitored individually.


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

Thursday Feb 13, 2014

Steps to Fast Track your Database Cloud implementation on Exadata

Oracle Exadata Database Machine is the ideal consolidation platform for Enterprise Database Cloud and Oracle Enterprise Manager provides the most optimized and comprehensive solution to rapidly setup, manage and deliver Enterprise Clouds. Clearly, very significant innovations have been delivered via Exadata X4, Enterprise Manager 12c and Database 12c in Cloud Computing space and customers can start realizing benefits from this combination of most powerful and unique enterprise database cloud solution in industry.

As per OracleVoice blog on Forbes.com:  "Why Database As A Service (DBaaS) Will Be The Breakaway Technology of 2014":

"Database as a Service (DBaaS) is arguably the next big thing in IT. Indeed, the market analysis firm 451 Research projects an astounding 86% cumulative annual growth rate, with annual revenues from DBaaS providers rising from $150 million in 2012 to $1.8 billion by 2016."

In this blog post, I will walk through the steps aiming to simplify DBaaS Setup on Exadata and also describe automation kits available to achieve the following rapidly -

  • Setup Monitoring and Management of Exadata Database Machine platform in EM 12c
  • Setup and Deliver DBaaS on Exadata using EM 12c
  • Manage and Optimize Exadata and EM 12c powered DBaaS cloud platform on an ongoing basis



There are 2 separate automation kits that are provided with EM 12c, first kit is for enabling rapid monitoring and management setup of Exadata stack in EM 12c and second kit is for rapid setup of DBaaS -

1) Deploy EM 12c site or use existing site - If you do not have existing EM 12c R3 setup, you can use EM Automation Kit for Exadata for installing EM 12c R3 Plug-in update 1. This kit is available via patch 17036016 on My Oracle Support(MOS) and can be used to deploy EM 12c latest release. Refer to Readme of patch and MOS note "Obtaining the Oracle Enterprise Manager Setup Automation kit for Exadata (Doc ID 1440951.1)" for additional details. Please note that this will setup EM12c Oracle Management Service along with Management Repository. It can be deployed on a single m/c or OMS and OMR can be setup on different machines.

2) Deploy EM 12cR3 agents and required plug-ins on Exadata Machine - Agent kit is also part of the same EM Automation Kit for Exadata and can be used for deploying agents and plug-ins on Exadata stack. Refer to MOS note "Obtaining the Oracle Enterprise Manager Setup Automation kit for Exadata (Doc ID 1440951.1)" for additional details. Best practice is to use most recent version of Agent kit and also deploy latest plug-ins. Patch details for respective platform are described in the MOS note.

Agent kit script will require Java 1.6.0_43 or greater version on database node where this script is being run. Agent kit script will need to be run as root OS user on Exadata db node, however JAVA_HOME and PATH with JAVA_HOME/bin should be set up as agent OS owner, so these OS env variables need to setup in profile of agent OS owner.

Agent Automation kit helps with achieving following -

  • EMCLI setup on Exadata Server
  • EM 12c R3 site compatibility checks
  • Setup and remove SSH between Exadata nodes to test SSH setup
  • Deploy EM 12c Agent and required Plugins on all DB Nodes of Exadata Machine
  • Confirm Exachk tool availability and run Exachk tool
  • Run Exadata Discovery Prerequisites
  • Discover Targets Cluster, Grid Infrastructure, RAC database and listener targets

Note - In case of Exadata X4, ensure you have the EM 12cR3 latest Bundle patch(released in January 2014). Refer to following MOS notes -
Enterprise Manager 12.1.0.3 Bundle Patch Master Note (Doc ID 1572022.1)
Enterprise Manager for Exadata Plug-in 12cR3 Bundle Patch Bug List (Doc ID 1613177.1)

3) Discover Grid Infrastructure and RAC targets – Above setup script will discover Targets Cluster, Grid Infrastructure, RAC database and listener targets. Discover Grid Infrastructure, ASM and RAC targets manually if required.

4) Please note that this setup script will not discover Oracle Exadata Database machine target in EM 12c. You need to discover the machine using following steps

  • From the Setup menu, select Add Targets, then select “Add targets Manually”.
  • In the “Add Targets Manually” page, select 'Add Targets Using Guided Process (Also Adds Related Targets)' and Target Type as Oracle Exadata Database Machine.
  • Click Add Using Guided Discovery and follow the wizard.


5) Setup Database Cloud Using Rapid Start Kit - Once you have setup Exadata management in EM 12c, next step is to setup database cloud. Refer to Rapid Start Kit for setting up cloud for both DBaaS and Pluggable DBaaS/PDBaaS. This kit will help achieve the following -

  • Create Cloud Admin, SSA Admin and SSA User custom roles
  • Create Cloud Admin, SSA Admin and SSA Users
  • Grant Quota to SSA User custom roles
  • Setup Zones with Placement Policy Constraints
  • Setup Pools with Placement Constraints
  • Setup Service Template/Catalog and grant it SSA User custom roles.

Here are brief steps for setting up Database Cloud using Rapid start Kit, available in EM Agent Kit 12.1.0.3.0, after login to Exadata machine first DB node as EM 12c agent owner

  • Change to <location where Agent kit is unzipped>/cloudsetup directory.
  • Review the input files under config directory and customize the dbaas_cloud_input.xml for configuring DBaaS cloud and pdbaas_cloud_input.xml for configuring Pluggable Database as a Service.
  • Run the following command to setup DBaaS on Exadata Machine.
<EMCLI Home>/emcli login -username=sysman
<EMCLI Home>/emcli @exadata_cloud_setup.py –dbaas
Above command will use dbaas_cloud_input.xml (under cloudsetup/config) as input file for configuring DBaaS. 
  • To setup PDBaaS on Exadata, please use following command.
<EMCLI Home>/emcli @exadata_cloud_setup.py –pdbaas
Above command will use pdbaas_cloud_input.xml (under cloudsetup/config) as input file for configuring PDBaaS

Note: Currently Rapid Start kit for DBaaS makes use of 11.2.0.3.0 Database "Exadata Data Warehouse" Profile available out-of-box. However you can create your own DBCA based Profiles and customize the dbaas_cloud_input.xml. Also if you need to use RMAN backup based or Snap clone based profile, you can to login to EM12c SSA Portal as SSA Administrator, to create the profile and setup service template. 

At this stage, you will be able to manage and deliver your Exadata powered enterprise database cloud using EM 12c.

Additional References:

Obtaining the Oracle Enterprise Manager Setup Automation kit for Exadata (Doc ID 1440951.1)

Oracle® Enterprise Manager Cloud Administration Guide12c Release 3 (12.1.0.3)

Oracle® Enterprise Manager Exadata Management Getting Started Guide Release 12.1.0.5.0


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

Monday Jan 27, 2014

IOUG Oracle EM SIG Techcast: Managing Oracle Enterprise Manager 12c with Oracle Clusterware


The Oracle Enterprise Manager Special Interest Group (SIG) is a growing body of IOUG members who manage or are interested in all aspects of Oracle Enterprise Manager. This IOUG SIG is managed by volunteers and supported by Oracle Enterprise Manager product managers and developers. The purpose of the SIG is to bring relevant information and education through webcasts, discussions and networking to users interested in learning more about the product, and to share user experiences.

On January 28th at 10 AM pacific time, Oracle Enterprise Manager SIG is hosting a webcast on "Managing Oracle Enterprise Manager Cloud Control 12c with Oracle Clusterware". In this webcast, Leighton Nelson, Associate Principal Database Administrator/Oracle ACE will discusss the steps required to configure virtual host names and create an Oracle Clusterware resource for Oracle Enterprise Manager to provide seamless failover and improved high availability levels.


Register Now !

Stay Connected:

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

Monday Dec 09, 2013

Using EM CLI for mass update of Lifecycle Status Property Value

I co-presented at Oracle Open World in September, Manage Beyond Limits: Enterprise Manager CLI and Other Extensibility Features. I focused on the enhancements to Enterprise Manager Command Line Interface, EM CLI. I enthused about the two new modes, Interactive and Script mode and how they compare to the standard mode of previous releases, from the SQL*Plus like environment of Interactive mode to the scalable, JSON formatted output of script mode. I highlighted the ease of use and the scalable power of EM CLI.

After my session a number of you asked me for a copy of the scripts that I demoed. This is one.

Why do we take on the extra task involved in learning something new? …because we know it will lead to personal growth, ultimately solve a problem or two, and maybe even look good on our resume. Learning Jython scripting will tick all of those boxes. Plus, it’s fun!

This script tries to solve the problem of mass updates to the Lifecycle Status property value. This is a new property introduced in Oracle Enterprise Manager 12c, and can be used to indicate the importance of a target, e.g. “Mission Critical", or to determine where a target is in its life cycle, e.g. “Stage”, “Test” or “Production”. Consider a new deployment of several hundred Oracle Databases, half of which are Mission Critical and the other half are in “Test”, but are about to go “Production”.

What is the best way to transition from “Test” to “Production”?

EM CLI in script mode!

EM CLI in script mode takes advantage of the Jython scripting language to use Enterprise Manager in a programmatic way, allowing task automation. The EM CLI Jython script below automates the setting of the Lifecycle Status Property Value, and uses standard programming constructs to make itterating through several Targets simpler, more robust and less error prone.

At a high level, every EM CLI Jython script can effectively be broken down into two parts:

Step 1: The setting and defining the necessary variables such as, which OMS URL to connect to, how secure you want your communication channel and which Administrator to log into the OMS.

Step 2: The calling or manipulation of EM CLI 12c procedures. Procedures were called verbs in previous releases, verb options are now procedure arguments in script and interactive mode.You can explore the on-line verb reference for more information.


Let’s break the script down further in to the major functional blocks of code.


Line 19: Sets the variable EMCLI_OMS_URL, which determines which OMS URL we shall connect too.

Line 21: Sets the variable EMCLI_TRUSTALL, which determines the level of security associated with the communication channel between the EM CLI and the OMS. We are choosing the lowest level of security.

Both of these variables could also have been set as environment variables.


Line 26 – 40: Between the if – else loop, we are checking for arguments that are passed to the script. We are passing two arguments into this script. Following, is what it looks like when calling an EM CLI Jython script, with arguments, on the command line:

$>./emcli @oow_demo2.py OWUSER Production

Where:

@oow_demo2.py - is the name of our Jython Script.

OWUSER - is the username used to log into the OMS, the script will prompt for a password, to authenticate this user. The mode of authentication is the same as is configured for the Console. Authentication modes supported are Repository, SSO or LDAP.

Production - is the Lifecycle Status property Value we shall set.

Line 27: We log into the OMS.

Line 29: We search through all targets where the version, “DBVersion” is greater than or equal to 12.1. This is passed to an internal procedure defined in Line 10.


Line 11: We construct the SQL command, based on the arguments passed in, then use the EM CLI list() procedure to convert the returned output to an easily parse-able JSON formatted syntax (line 15) . We then return the Response Object, obj (line 16). The information returned are all the targets of the appropriate version.

Line 37: We then take the information and parse it, filtering further on oracle_database Target types. Finally we parse and print TARGET_NAME, TARGET_TYPE, PROPERTY_NAME and PROPERTY_VALUE for all databases which fit our criteria.

Line 39: We call the set_target_property_value() procedure which accepts a colon separated list of property records, in the form, TARGET_NAME:TARGET_TYPE:PROPERTY_NAME:PROPERTY_VALUE.

Please copy the code, save it with the *.py extension and change the EMCLI_OMS_URL value to the valid OMS URL for your environment.

Play around with it, and take your Jython scripting knowledge from Test to Production.

Wednesday Nov 13, 2013

Webcast: Delivering Pluggable Database as a Service

Date: Thursday, November 21, 2013
Time: 10:00 a.m. PST | 1:00 p.m. EST

Save Time and Costs, Reduce Complexity

Database as a service (DBaaS) offers a variety of benefits to help companies improve operations and move faster to the cloud. Using Oracle Multitenant—a new option for Oracle Database 12c featuring pluggable databases—and Oracle Enterprise Manager 12c, companies can make the most of those benefits.

Join us for the webcast and learn how Oracle technology can help:

  • Accelerate provisioning of database clouds through self-service
  • Facilitate consolidation with unique automation capabilities
  • Lower IT costs by managing many databases as one

Register Now!


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

Latest information and perspectives on Oracle Enterprise Manager.

Related Blogs




Search

Categories
Archives
« March 2015
SunMonTueWedThuFriSat
1
2
3
4
5
7
8
9
10
11
12
13
14
15
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    
       
Today