Oracle20140708 DL PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 60

PL/SQL shouldn't be

Genetics
get flabbergasted...
SCAN THIS PAGE
WITH LAYAR APP FOR
ADDED EXPERIENCE

Oracle development made easy!


We think Oracle development should be like taking a walk in the park.
Easy development is the key to saving time and money. Thats why
we created the PL/SQL Developer tool. As simple as 1, 2, 3!
www.allroundautomations.com/plsqldev
JULY/AUGUST 2014

Big Data Integration Oracle NoSQL Database


3.0 gets more involved in big data strategies
and deployments / 14 Building Bridges Are
organizational silos thwarting IT architecture
goals? / 20 Managing Expressly Manage Oracle
Database 12c with Oracle Enterprise Manager
Database Express / 37 The Joy of Low-
Hanging Fruit Are you taking advantage of BULK
COLLECT and FORALL? / 43 On Table Updates
and SQL Plan Baselines Our technologist
updates tables quickly via CTAS and optimizes
queries for evolution / 49

SUCCESS
ON SPARC
The latest SPARC chips and
systems are at the center of
better business processes
2 VOLUME XXVIII - ISSUE 4 CONTENTS

SUCCESS
ON SPARC
Consolidating older and underperforming
servers onto newer and more-efficient servers
running a high-performance operating system
and low-overhead virtualization technology adds
new enterprise capacity and processing power
to cost-cutting consolidation projects. Read how
organizations are turning to the new generation
of SPARC servers and the Oracle Solaris
operating system for better business processes
and a better bottom line. Philip J. Gill
Cover: I-Hua Chen / 26

Up Front / 5 Community / 16 Technology / 33 Comment / 54


FROM THE EDITOR / 5 PARTNER NEWS / 16 ORACLE ADF / 33 IN THE FIELD / 54
The Cloud OS BOOK BEAT / 16 Region Extreme: Learning Circle, Part 1
Tom Haunert Multi-Task-Flow Binding President Alyssa Johnson
COMMUNITY Render an unknown number talks about OAUGs
BULLETIN / 19 of task flows in page or evolving mission and
At Oracle / 6 Happenings in Oracle
dashboard regions. commitment to innovation
Technology Network
Frank Nimphius through community.
EVENTS / 6 Roland Smart
Find out about upcoming MANAGEABILITY / 37 Carol Hildebrand
ARCHITECT / 20 Managing Expressly
technology and industry Building Bridges ANALYST / 55
events. Manage Oracle Database Deploy Applications in
Organizational silos thwarting
12c with Oracle Enterprise Different Environments
RESOURCES / 8 IT architecture goals? Put
Manager Database Express, Organizations look to todays
Your guide to Oracle videos, away the sledgehammer.
a built-in browser-based application server platforms
webcasts, podcasts, white Bob Rhubart
graphical tool. Arup Nanda to run high-performance
papers, and more PEER-TO-PEER / 21 PL/SQL / 43 enterprise applications and
BRIEFS / 10 Close Encounters The Joy of Low- services. David Baum
The latest product news Three peers extol the Hanging Fruit TIME CAPSULE / 56
INTERVIEW / 14 virtues of in-person classes Are you using BULK Flashbacks: Culture. Industry.
Big Data Integration and conferences. COLLECT and FORALL for Oracle. Oracle Magazine.
As NoSQL technology Blair Campbell bulk processing yet? Rich Schwerin
evolves, Oracle NoSQL Steven Feuerstein
Database 3.0 gets
more involved in big
data strategies and
deployments.
Tom Haunert
ASK TOM / 49
On Table Updates and
SQL Plan Baselines
Our technologist updates
tables quickly via CTAS
and optimizes queries for
evolution. Tom Kyte

JULY/AUGUST 2014 ORACLE.COM/ORACLEMAGAZINE


3

Editorial
Editor in ChiefTom Haunerttom.haunert@oracle.com
Managing EditorJan Rogersjan.rogers@oracle.com
Associate Editor Patty Waddington
Contributing Editor and Writer Blair Campbell
Technology Advisor Tom Kyte
Contributors Rich Schwerin, Leslie Steere
DESIGN
Senior Creative Director Francisco G Delgadillo
Senior Design Director Suemi Lam
Design Director Richard Merchn
Contributing Designers Jaime Ferrand, Arianna Pucherelli
Production Designers Sheila Brennan, Kathy Cygnarowicz

Publishing
PublisherJennifer Hamiltonjennifer.hamilton@oracle.com+1.650.506.3794
Associate Publisher and Audience Development DirectorKarin Kinnearkarin.kinnear@oracle.com+1.650.506.1985

Advertising sales
President, Sprocket MediaKyle Walkenhorstkyle@sprocketmedia.com+1.323.340.8585
Western and Central US, LAD, and Canada, Sprocket MediaTom Cometatom.cometa@oracle.com+1.510.339.2403
Eastern US and EMEA/APAC, Sprocket MediaMark Makinneymark.makinney@sprocketmedia.com+1.805.709.4745
Advertising Sales Assistant, Sprocket MediaCindy Elhajcindy@sprocketmedia.com+1.626.396.9400, x201
Mailing-List Rentals Contact your sales representative.

Editorial Board
Ian Abramson, Karen Cannell, Andrew Clarke, Chris Claterbos, Karthika Devi, Kimberly Floss, Kent Graziano,
Taqi Hasan, Tony Jambu, Tony Jedlinski, Ari Kaplan, Val Kavi, John King, Steve Lemme, Carol McGury,
Sumit Sengupta, Jonathan Vincenzo, Dan Vlamis

Subscription Information Resources


Subscriptions are complimentary for qualified individuals who complete the form found at Oracle Products
oracle.com/oraclemagazine. For change of address, mail in label with the new address to: +1.800.367.8674 (US/Canada)
Oracle Magazine, P.O. Box 1263, Skokie, IL 60076-8263. Oracle Services
+1.888.283.0591
Magazine Customer Service Oracle Press Books
oracle@halldata.com Fax +1.847.763.9638 Phone +1.847.763.9635 oraclepressbooks.com
Privacy
Oracle Publishing allows sharing of its mailing list with selected third parties. If you prefer that your
mailing address or e-mail address not be included in this program, contact Customer Service at
oracle@halldata.com.
Copyright 2014, Oracle and/or its affiliates. All Rights Reserved. No part of this publication may be reprinted or otherwise reproduced without permission from the editors. ORACLE MAGAZINE IS PROVIDED ON
AN AS IS BASIS. ORACLE EXPRESSLY DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ORACLE BE LIABLE FOR ANY DAMAGES OF ANY KIND ARISING FROM YOUR
USE OF OR RELIANCE ON ANY INFORMATION PROVIDED HEREIN. The information is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into
any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality
described for Oracles products remains at the sole discretion of Oracle. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Magazine (ISSN 1065-3171) is published bimonthly with a free subscription price by: Oracle, 500 Oracle Parkway, MS OPL-3A, Redwood City, CA 94065-1600. Periodicals Postage Paid at Redwood City,
CA, and additional mailing offices. POSTMASTER: Send address changes to: Oracle Magazine, P.O. Box 1263, Skokie, IL 60076-8263.

Printed by Brown Printing

oracle magazine July/August 2014


ISV Apps
Run Better
on Exadata
30x Lower CPU Utilization

6x Less Storage Used

90% Linear Scalability

70:1 Compression

30x More Scalable

Over 700 ISV Applications Are Certified on Exadata

oracle.com/partners/goto/exastack

Copyright 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates.
Other names may be trademarks of their respective owners.
From The Editor 5

The Cloud OS
In cloud computing, the OS is more important than ever.

I n November 2011, Oracle introduced


Oracle Solaris 11the first cloud OS.
In April 2014, Oracle introduced Oracle
storage, helps to ensure that application
service-level agreements are maintained
within data center and cloud environments.
Solaris 11.2, with updated cloud features. One new feature of the Oracle Solaris 11.2
A cloud OS must do more than update fea- cloud OS, however, has received the most
tures, however, and Oracle Solaris certainly attention: a complete OpenStack distribution.
does more, with new cloud features and OpenStack is an open source cloud
technologies that will continue to open project, and the OpenStack distribution in
the cloud to high-performance mission- Oracle Solaris is a foundation for building
critical applications. an Oracle Solarisbased cloud. OpenStack
in Oracle Solaris 11.2 provides a central loca-
Ongoing Evolution tion for managing compute, networking, and
Oracle Solaris 11.2 feature updates deliver storage resources. With OpenStack, Oracle
better performance for Oracle environ- VM templates, and the new unified archives
ments running the cloud OS, including capability, organizations can deploy a single-
kernel mode acceleration, which delivers system, multi-virtual-machine OpenStack
performance acceleration for Oracle Real environment in a matter of minutes.
Application Clusters; memory prediction New features mean new choices. For vir-
technology, which enables lower memory tualization, Oracle Solaris 11.2 supports mul-
utilization; and a new shared memory tiple virtualization technologies, including
model and other Oracle Database co Oracle Solaris Zones and Oracle VM Server
engineered enhancements. for SPARC. In addition to the option to build
Next Steps Perhaps one of the most overlooked Oracle Solarisbased clouds with OpenStack,
ongoing features of all recent Oracle Solaris Oracle Solaris 11.2 offers the choice to build
READ more about
Oracle Solaris releases has been the guarantee. The Oracle clouds based on the Oracle Optimized
oracle.com/technetwork/server-storage/solaris11 Solaris Guarantee Program ensures that even Solution for Enterprise Cloud Infrastructure.
bit.ly/1juvxQS as new Oracle Solaris releases support new
Oracle Solaris Guarantee Program features, binary applications and source code Established Institution
bit.ly/1mHegIU
developed for earlier releases of Oracle Solaris From OpenStack to an open invitation:
OpenStack
bit.ly/1juvEMo will continue to run on newer releases. The institution that is Oracle OpenWorld
San Francisco runs September 28 through
Send Mail to the Editors Open Revolution October 2, 2014, and registration is now
Oracle Solaris 11.2 includes built-in, efficient open at oracle.com/openworld. Be part of
Send your opinions about what you read in Oracle enterprise cloud virtualization. Oracle Solaris the latest Oracle announcements, explore
Magazine, and suggestions for possible technical Zones, for example, have been enhanced in Oracle partner solutions, listen to other
articles, to opubedit_us@oracle.com. You can the new release to include support for fully Oracle customers, network, and be part of
also follow our @oraclemagazine Twitter feed or
join us on Facebook at bit.ly/orclmagfb. independent and isolated environments, the cloud computing conversation.
Letters may be edited for length and clarity and called kernel zones. Also new in the cloud OS,
may be published in any medium. We consider application-driven software-defined- Tom Haunert, Editor in Chief
any communications we receive publishable.
networking support, from application to tom.haunert@oracle.com

CONNECT: bit.ly/aVgo69 bit.ly/orclmagfb twitter.com/oraclemagazine linkd.in/orclmag

oracle magazine July/August 2014


6 Events

Technology Events Oracle User Groups

Conferences and sessions to help you stay Burlington Ruby Conference


August 23, Burlington, Vermont
on the cutting edge burlingtonruby.com

German Oracle Users Group


Regional Meeting
August 4, Hamburg, Germany
Oracle OpenWorld doag.org
September 28October 2
South African Oracle User
San Francisco, California Group HR/HCM SIG Meeting
Oracle OpenWorld is the most important educational August 8, Johannesburg, South Africa
and networking event of the year for Oracle technolo- saoug.co.za
gists, customers, and partners. Thousands of sessions NoCOUG 2014 Summer Conference
and hundreds of demos and labs help attendees dis- August 21, San Ramon, California
cover new product and technology solutions, improve nocoug.org
their technical proficiency and knowledge, learn tips
Austin Java Users Group Meeting
and tricks for currently installed products, and gain August 26, Austin, Texas
an understanding of where the industry is headed. austinjug.org
Register at oracle.com/openworld
Suncoast Oracle Users Group Meeting
August 26, Tampa, Florida
soug.org
Flash Memory Summit USENIX Security Symposium
August 57, Santa Clara, California August 2022, San Diego, California Dallas Oracle Users Group Oracle
Database 12c New Features
fflashmemorysummit.com fbit.ly/1qf8i1i August 28, Irving, Texas
This three-day event includes tutorials, in-depth This symposium brings together researchers, doug.org
sessions, hands-on labs, and keynotes from practitioners, systems administrators, and systems
UKOUG Development SIG Meeting
industry experts. Tutorials cover flash tech- programmers and includes refereed papers, panel September 9, Reading, England
nology, architectures, solid-state drives, hard- discussions, and Birds-of-a-Feather sessions. ukoug.org
ware, testing, storage, and applications.
Midsize Enterprise Summit West Central States Oracle Application Users
Group Executive Luncheon
XChange 2014 September 1416, Dallas, Texas September 12, St. Louis, Missouri
August 1719, San Antonio, Texas fxchange-events.com/mesw14 csoaug.com
fbit.ly/1mYQd7d This conference brings together more than 220
All India Oracle Users Group Tech Day
XChange 2014 features sessions and demos CIOs and senior-level IT decision-makers to meet September 14, Kerala, India
focused on IT topics such as cloud computing, with top technology vendors and analysts to offer aioug.org
storage optimization, networking, virtualization, insight into the ever-changing midsize market.
UKOUG Business Intelligence and
security, mobility, and connectivity. Reporting Tools SIG Meeting
MobileHCI September 17, London, England
Quest INFOCUS ANZ User Group September 2326, Toronto, Ontario, Canada ukoug.org
Annual Conference fmobilehci.acm.org/2014 OAUG South Australia Meeting
August 1819, Melbourne, Australia MobileHCI covers the field of human-computer September 24, Adelaide, Australia
fbit.ly/1h8Gc7v interaction (HCI) and is the premier forum for inno- ausoug.org.au
Sponsored by Quest International Users Group, vations in mobile, portable, and personal devices
OUG Ireland HCM SIG Meeting
this conference features content related to and the services to which they enable access. September 24, Dublin, Ireland
Oracles JD Edwards products and Oracle ukoug.org
Fusion Applications. DEMO Africa
September 2526, Lagos, Nigeria
REGister for these upcoming Oracle events fdemo-africa.com Events locator
Oracle OpenWorld 2014 DEMO Africa is the initiative of the Liberating
Jshua Barnett/Flickr

September 28October 2
oracle.com/openworld Innovation in Opportunity Nations partnership, Oracle Events
aimed at enhancing the technology startup oracle.com/events
JavaOne
September 28October 2 and innovation ecosystems of fast-growing Locate User Groups
oracle.com/javaone oracle.com/technetwork/community
African economies.

july/august 2014 Oracle.com/oraclemagazine


SEpt. 28 - Oct. 2, 2014
San FranciScO

rEGiStEr nOW
Save $500 by July 18th
2,500 Sessions | 475 Exhibitors | 400 Demos

Register at oracle.com/openworld

Copyright 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
8 Resources

Whats New at Oracle


The latest videos, podcasts, blogs, and more

Videos Discover the data management issues that CIOs sionals to discuss improving strategy execution,
Better Clouds at Lower Costs are most eager to solve. operational excellence, and financial performance.
fbit.ly/1n8L5hd
Learn how to build efficient clouds with Oracles White Papers E-Books
SPARC servers running Oracle Solaris. Simplify the Migration of Oracle Database Oracle Applications Together with Oracle
and Oracle Applications from IBM AIX to Systems: From the Customers Perspective
Simplify Your Business with Oracle Oracle Solaris fbit.ly/1rFN8go
Business Analytics fbit.ly/1egb5Wb Hear from current Oracle customers about how
fbit.ly/1g90cWz Learn the four steps required to migrate from running Oracle Applications on Oracle systems
Learn how to keep costs down without sacrificing AIX to Oracle Solaris, and explore an example that simplifies IT and delivers speed and efficiency.
performance or data quality for discovery, busi- illustrates the effort, duration, and benefits of
ness intelligence, and planning applications. the migration. Resource Centers
Data Integration for Oracle Applications
Why Move Business Applications from The Top 10 Reasons to Choose MySQL for fbit.ly/1ht6XEy
IBM to Oracle Next-Generation Web Applications Access white papers, customer testimonials, and
fbit.ly/1iljLHD fbit.ly/1lhPL3e more that illustrate how to gain incremental value
Improve performance and efficiency and reduce Gain a better understanding of why MySQL is the by using best-in-class data integration solutions.
costs by moving enterprise applications from IBM best choice for modern web-, mobile-, and cloud-
Power to Oracles SPARC servers. based applications. Oracle University
Complete Oracle Solaris 11 Curriculum
Oracle Real-World Performance Podcasts fbit.ly/1i1Rdr3
Video Series Oracle Cloud, Featuring Demand Analysis Quickly obtain the skills needed to manage
fbit.ly/QtTS2b fbit.ly/1qj5Eta mission-critical cloud deployments.
Oracles Real-World Performance team Hear Peter Mulligan, Demand Analysis cofounder
shares best practices and performance and vice president of sales and marketing, New Oracle WebLogic Server 12c Curriculum
methodologies to help you make the most of discuss why his company chose Oracle Cloud for fbit.ly/1hMlzKG
your Oracle Database investment. its customer intelligence solution. Explore training and certification for Oracle
WebLogic Server 12c.
Webcasts Making the Right Storage Choices:
Ricoh Americas Delivers on Anytime, Part 1High Availability
web locator
Anywhere Promise with Cloud and fbit.ly/1hC2cTv
On-Premises Integration Learn the characteristics of highly available
Oracle Consulting
fbit.ly/1r5GxbS systems and their impact on the efficiency and oracle.com/consulting
Discover the rewards of using Oracle performance of your storage architecture. Oracle Events and Webcasts
AppAdvantage for SOA-based cloud, on- oracle.com/events
premises, and mobile integration initiatives. Social Media Oracle Newsletters
Oracle President Mark Hurd on LinkedIn oracle.com/newsletters
Spend Testing Time More Effectively Influencer Blog Oracle Podcast Center
oracle.com/podcasts
fbit.ly/OKNXVk flinkd.in/1ernjIb
Oracle University
Explore the latest trends in software testing that Read Oracle President Mark Hurds posts about bit.ly/ouoramag
allow you to deploy higher-quality applications in enterprise IT mandates, executive leadership, Oracle Support
less time. customer imperatives, and innovation. oracle.com/support
My Oracle Support
Top Data Warehouse Trends and Oracles Instantis Page on LinkedIn myoraclesupport.com
Opportunities for 2014 flinkd.in/1sB0wCT My Oracle Support Communities
communities.oracle.com
fbit.ly/1dy5Gvq Join other project portfolio management profes-

CONNECT: oracle.com/blogs facebook.com/oracle twitter.com/oracle linkedin.com/company/oracle bit.ly/LdGiM0

JULY/AUGUST 2014 Oracle.com/oraclemagazine


Simple. Adaptable.
Manageable.
quic
uides for
Solution g !
eployment
and easy d
Simple: We are committed to making our solutions the easiest to
install, configure, and integrate into either existing IT systems or data
centers or new build-outs. We ship our solution as ready to install
as possible (e.g., tool-less rack PDU installation and standard cable
management features). With our easy-to-configure infrastructure,
you can focus on more pressing IT concerns such as network threats.

ace!
for any IT sp
Adaptable: Our solutions can be adapted to ft any IT confguration
at any time from small IT to data centers! Vendor-neutral
enclosures, for example, come in different depths, heights, and widths
so you can deploy your IT in whatever space you have available
from small IT or non-dedicated spaces to even large data centers.

ur
d manage yo
Monitor an ere!
rom anywh
IT spaces f

Manageable: Local and remote management are


simplifed with out-of-the-box UPS outlet control,
integrated monitoring of the local environment, and
energy usage reporting. Manageability over the network
and robust reporting capabilities help you prevent
IT problems and quickly resolve them when they do
occur from anywhere! Whats more, our life cycle
services ensure optimal operations.

Easy-to-deploy IT physical infrastructure


Solution guides make it easy to determine what you need to solve todays challenges. The core Integrated InfraStruxure solutions include
everything for your IT physical infrastructure
of our system, vendor-neutral enclosures and rack PDUs, makes deployment incredibly headache-
deployment: backup power and power
free. Easily adjustable components, integrated baying brackets, pre-installed leveling feet, and distribution, cooling, enclosures, and
cable management accessories with tool-less mounting facilitate simple and fast installation. management software. Adaptable solutions
scale from the smallest IT spaces up to
multi-megawatt data centers.
Business-wise, Future-driven.

Make the most of your IT space!


Download best practices and enter to win a
Samsung Galaxy Note 3!
Visit: www.apc.com/promo Key Code: i770u

2014 Schneider Electric. All Rights Reserved. Schneider Electric, APC, InfraStruxure, and Business-wise, Future-driven are trademarks owned by Schneider Electric Industries SAS
or its affiliated companies. All other trademarks are the property of their respective owners. www.schneider-electric.com 998-1155587_GMA-US_Note3
10 Product Resources

TUTORIALS AND VIDEOS Oracle Extends Cloud with Database and Storage Cloud Services
Java SE 8 Technical Videos Oracle has announced two new Oracle Cloud To remain competitive in todays highly
Dive into the new features of Java SE 8 services, Oracle Database Backup Cloud connected business environment, organiza-
with this series of technical videos covering
Service and Oracle Storage Cloud Service. tions are increasingly adopting and building
the Internet of Things, Java ME, Oracle
Oracle Database Backup Cloud Service new cloud-based solutions. There is also a
Java Embedded, and Java SE.
provides a scalable, low-cost Oracle huge push to migrate existing on-premises
bit.ly/1kexe6Z
Database cloud backup solution and is workloads to the public cloud and support
How Oracle ZFS Storage Appliance tightly integrated with Oracle Recovery portability between on-premises and cloud
Lowers Backup Risk and Cost Manager (Oracle RMAN), allowing cus- environments, says Chris Pinkham, senior
Oracle Vice President Steve Zivanic
tomers to use familiar Oracle RMAN vice president of cloud product develop-
explains how Oracle ZFS Storage
commands for performing backup and ment at Oracle. To help customers achieve
Appliances including the new Oracle ZFS
Storage Appliance ZS3-BA help reduce recovery operations between on-premises these goals, Oracle has further expanded
backup and recovery risks and cost. databases and Oracle Cloud. Oracle Storage its comprehensive set of enterprise-grade
bit.ly/1gtwTRj Cloud Service enables organizations to infrastructure cloud services. The new
securely store, access, and manage data in services are based on open standards,
How to Upgrade Oracles SPARC
the cloud. Oracle Storage Cloud Service is integrated to work together seamlessly, and
T5-4 Server Processor
API-compatible with OpenStack Swift and designed to support full portability between
Watch this step-by-step animation to
learn how to upgrade a SPARC T5-4 provides access to data through REST and on-premises and cloud environments.
server from a one-processor to a four- Java APIs. oracle.com/cloud
processor configuration.
bit.ly/1mRX9X6
Oracle Virtual Compute Appliance X4-2: Turnkey Solution for Cloud
How to Upgrade Oracles SPARC
Oracle Virtual Compute Appliance X4-2, ranging from infrastructure as a service to
T5-8 Server Processor
Follow the steps for upgrading a SPARC the newest release of Oracle Virtual database as a service with features such
T5-8 server from a four-processor to an Compute Appliance, is a wire-once engi- as automated provisioning, elasticity, and
eight-processor configuration in this ani- neered system that comes fully assembled cloud governance.
mation, which covers preparing the new and ready to run pro- The Oracle Virtual Compute Appliance
processor modules, removing the processor duction workloads with exemplifies Oracles unique ability to
filler modules, installing the new processor minimal software- engineer hardware and software together,
modules, and more. defined configuration. providing a superior solution thats easy
bit.ly/1j9JoQF Oracle Virtual to deploy and use without requiring
Compute Appliance major infrastructure changes, says Wim
DOWNLOADS is a turnkey solution Coekaerts, senior vice president of Linux and
Oracle NoSQL Database 3.0 for flexible private virtualization at Oracle. This engineered
Release 3.0 of Oracle NoSQL Database cloud platforms that system can significantly cut provisioning
offers developers an enhanced NoSQL can be used with time and offers investment protection by
solution for building high-performance,
Oracle Enterprise allowing customers to mix server genera-
next-generation applications providing
Manager 12c to tions in the same rack.
increased security, simplified data mod-
eling, secondary indexes, and multi-data- deploy cloud services bit.ly/S2KlR2
center performance enhancement.
bit.ly/1kmj8lv
Oracle Configure, Price, and Quote Cloud Advances On-the-Go Sales
Oracle Database Migration
With the latest release of Oracle Configure, agement, enabling administrators to create
Assistant for Unicode 2.0
Price, and Quote Cloud (Oracle CPQ Cloud), complex pricing and discounting calcula-
Oracle Database Migration Assistant for
Unicode 2.0, released in March 2014, sup- sales professionals and partners can now tions in a drag-and-drop interface without
ports the migration of Oracle Database 12c access the entire Oracle CPQ suite via scripting or advanced rules.
pluggable databases to Unicode. Other mobile tablets from anywhere, anytime, and Oracle CPQ Cloud helps improve cus-
new features include enhanced bulk stay productive while on the go. tomer satisfaction and sales efficiency,
cleansing features with pattern-based Oracle CPQ Cloud streamlines the sales says Ken Volpe, senior vice president of
replacement to resolve certain classes of process from inquiry to order by enabling Oracle product development. Its integra-
data convertibility issues and improved sales staff and partners to generate sales tion into Oracle CX Cloud enables sales
conversion error-handling mechanisms. quotes, orders, and proposals quickly and teams to sell more and sell faster, from lead
bit.ly/1kez1ZT accuratelyfrom anywhere, on any device. to order and service through renewal.
New enhancements include formula man- bit.ly/1iuQiLo

JULY/AUGUST 2014 ORACLE.COM/ORACLEMAGAZINE


BRIEFS 11

Oracle Identity Management 11g Release 2 Adds Advanced Security MySQL 5.7 Available Now
Features for Cloud and Mobile Devices A new development milestone release
The recently updated Oracle Identity a mobile application to simplify strong for MySQL 5.7, available now, extends the
Management 11g Release 2 includes authentication, replacing corporate- performance, scalability, and reliability of
enhancements that enable organizations issued hardware tokens at a fraction of MySQL and adds enhanced management
to extend consistent access policies and the cost. capabilities. Available for download in the
controls beyond enterprise applications Expanded support for OAuth. Supports MySQL Developer Zone, the milestone
and systems to cloud-based systems and two- and three-legged OAuth as well as release delivers improvements in replication,
mobile devices. more-complex use cases of obtaining security, and instrumentation, resulting
Key new features and functionality in the consent from a user before a third-party in significantly higher performance and
latest release include consumer application can access informa- improved manageability over MySQL 5.6.
Oracle Mobile Security Suite. Secures cor- tion on a service providers application site. The latest MySQL 5.7 development
porate applications and data on personal With the latest release of Oracle milestone release delivers enhanced per-
devices and delivers a consistent user Identity Management 11g Release 2, Oracle formance and management features to the
experience across channels by extending is providing organizations with the most MySQL community, says Tomas Ulin, vice
identity services such as fraud detec- advanced and comprehensive identity president of MySQL engineering at Oracle.
tion, user registration, and self-service management platform, says Amit Jasuja, By encouraging ongoing community par-
password management to customer and senior vice president of identity manage- ticipation and following the release early,
employee digital interactions. ment and security at Oracle. As a result, release often model, we help shorten the
Cloud access portal. Extends the range of organizations can realize the full poten- feedback-to-delivery cycle and allow users
enterprise single sign-on beyond Microsoft tial of cloud and to get faster access to improved product
Windows desktops and enables users to mobile applications capabilities and quality.
have single-sign-on access to software-as- while helping to bit.ly/1mRYb5z
a-service applications from a simple and ensure that valu-
personalized launch pad, available on any able company data
device, tablet, or workstation. remains secure.
NetBeans IDE 8.0 Delivers
Oracle Mobile Authenticator. Provides bit.ly/1pHvJVT Comprehensive Java 8 Support
NetBeans IDE 8.0, available now, allows
developers to make efficient use of the
Oracle Marketing Cloud Adds Manufacturing Cloud Service latest features in Java Platform, Standard
The latest addition to Oracle Marketing workflows that help marketers quickly and Edition 8 (Java SE 8) by quickly identifying
Cloud, Oracle Eloqua for Manufacturing efficiently create and extend channel rela- and converting code to new Java language
Cloud Service is a flexible and scalable tionships. Campaign tasks are automated constructs, such as Lambda expressions and
cloud-based solution designed to help and personalized across print, e-mail, web, Java SE 8 Compact Profiles. The new release
manufacturing organizations deliver per- and telemarketing channels. also further extends HTML5 support by
sonalized experiences to customers and Manufacturing organizations want to adding new features for common JavaScript
prospects while improving marketing out- improve engagement with customers and frameworks and introduces new tools for
comes and efficiency. prospects across digital channels so that popular Java Platform, Enterprise Edition
The new solution introduces industry- they can gain better visibility into their sales frameworks such as PrimeFaces.
specific capabilities that enhance targeting pipeline and grow their businesses, says Additional enhancements include Oracle
and segmentation, increase engagement, Steve Miranda, executive vice president for Java SE Embedded 8 support for deploying,
improve measurement, and produce Oracle Applications development. With running, debugging, and profiling Java SE
actionable reporting. With a full view of capabilities developed specifically for man- applications on an embedded device directly
the buyers journey, insights into customer ufacturers including prebuilt templates and from the NetBeans IDE and support for the
demand signals, and integrated business leading business intelligence, Oracle Eloqua new Java Micro Edition 8 (Java ME 8) specifi-
intelligence reporting, marketers in global for Manufacturing Cloud Service helps man- cation and Oracle Java ME Embedded 8.
manufacturing organizations are able to ufacturers improve marketing effectiveness Java SE 8 represents a major advance-
drive demand and improve the quality of and drive revenue. ment for the Java community, says Chris
leads that are passed to sales. bit.ly/1h7ygPZ Tonas, vice president of mobility and devel-
Oracle Eloqua for Manufacturing Cloud For more about Oracle Marketing Cloud, opment tools at Oracle. NetBeans IDE
Service includes product registration capa- the modern marketing solution that inte- 8.0 ensures that Java developers have the
bilities that help deliver efficient product grates cross-channel, content, and social advanced tooling to support their adoption
I-HUA CHEN

maintenance and subscription renewals, marketing with data management for the of this new technology.
and it provides intuitive templates and enterprise, visit bit.ly/1vcuRZQ. netbeans.org

ORACLE MAGAZINE JULY/AUGUST 2014


12 BRIEFS

Oracle Fusion Innovation Management Joins Oracle SCM Portfolio OpenStack Support for Oracle
Oracle Fusion Innovation Management, integrates with Oracles Agile Product Linux and Oracle VM
a new product value chain solution in the Lifecycle Management, helping to stream- Oracle has introduced a technology preview
Oracle Supply Chain Management port- line the process of moving concepts along to of an OpenStack distribution that allows
folio of applications, provides companies detailed design, development, and release Oracle Linux and Oracle VM users to work
with a systematic approach for capturing, to manufacturing while maintaining full vis- with the open source cloud software, pro-
selecting, and investing in the right ibility into project status. viding customers with additional choices
product ideas and managing their product By providing a highly usable but system- and interoperability while taking advantage
portfolios. The new solution enables atic approach to managing product innova- of the efficiency, performance, scalability,
bottom-up innovation so all stakeholders tion, Oracle Fusion Innovation Management and security of Oracle Linux and Oracle VM.
can participate in the product invention can accelerate the transformation of the The distribution is delivered as part of the
and definition processes, with simulta- best ideas into profitable products and Oracle Linux and Oracle VM Premier Support
neous top-down financial impact analysis deliver against your corporate product offerings, at no additional cost.
and strategic-fit visibility to the key port- innovation strategy, Oracle is working closely with the
folio owners during and post investment says Jon Chorley, OpenStack community across many areas,
decision. It also enables organizations group vice president says Wim Coekaerts, senior vice president
to define and manage different product of Oracles supply of Linux and virtualization at Oracle. Oracle
development projects in the context of chain management will continue to help deliver OpenStack
their overall product portfolio. product strategy. capabilities to enable our customers to more
Oracle Fusion Innovation Management bit.ly/1mRXV6E efficiently deploy, manage, and support
their large Oracle data center deployments.
bit.ly/1iZVDPK
New Release of Oracle Business Intelligence Applications Improves
Procure-to-Pay Processes and Talent Management
Oracle has announced Release 11.1.1.8.1 of BI applications to meet specific analytics
Fujitsu and Oracle Enhance
Oracle Business Intelligence Applications, needs for line-of-business managers Fujitsu M10 Servers
which includes prebuilt connectors and executives. Fujitsu and Oracle have announced world-
between Oracle Procurement and Spend Oracle Business Intelligence wide availability of enhanced Fujitsu M10-1,
Analytics and Oracles JD Edwards Applications provide a critical platform for M10-4, and M10-4S servers equipped with
EnterpriseOne and adds a new talent unlocking and analyzing enterprise-level and the new SPARC64 X+ processor, which has 16
profile analytics module. business-level insights, says Paul Rodwick, cores and runs at speeds up to 3.7 GHz.
Built on Oracle Business Intelligence vice president of product management at The new Fujitsu M10-4S server sup-
Foundation Suite, Oracle Business Oracle, with the latest updates reducing the ports mixed SPARC64 X and X+ chassis in a
Intelligence Applications enable organi- time and complexity to achieve a competi- single system, and the modular design and
zations to easily extend their business tive advantage through data. physical partition dynamic reconfiguration
intelligence (BI) footprint or build custom bit.ly/1qnCZa1 feature allow the Fujitsu M10-4S to grow by
adding processors, memory, and I/O with
virtually no downtime.
Oracle Sales Cloud Provides Anywhere, Anytime Access
By giving sales reps a continuous and sim- tating integration from on-premises sales
plified experience on both desktop and force automation systems such as Oracles
mobile devices, even when in a discon- Siebel Customer Relationship Management
nected mode, the latest release of Oracle and Oracle E-Business Suite applications.
Sales Cloud offers anywhere, anytime access The enhancements to Oracle Sales
designed to achieve fast and wide user Cloud reinforce Oracles commitment to The enhanced Fujitsu M10 servers
adoption. The latest release helps sales reps deliver simple and smart sales automation offer a new option for customers seeking
focus on the deals with the highest likeli- solutions, says Siva Sundaresan, group mission-critical computing solutions, says
hood of closing and increases the predict- vice president for Oracle Sales Cloud. With Oracle Chief Corporate Architect Edward
ability of achieving sales targets by deliv- the latest release, Oracle Sales Cloud offers Screven. Oracle and Fujitsus strong col-
ering real-time predictive analytics on both sales teams a simple design, more intelli- laboration furthers Oracles commitment to
desktop and mobile devices. gence, and greater mobility to help optimize help customers accelerate their businesses
Oracle Sales Cloud also helps customers customer interactions, increase sales effec- by engineering hardware and software to
I-HUA CHEN

preserve their existing IT investments and tiveness and efficiency, and drive revenue. achieve extreme performance.
establish an easy path to the cloud by facili- bit.ly/1hIJkHd bit.ly/1j9KLP4

JULY/AUGUST 2014 ORACLE.COM/ORACLEMAGAZINE


14

Big Data Integration


As NoSQL technology evolves, Oracle NoSQL
Database 3.0 adds features and gets more involved
in big data strategies and deployments.

F ollowing the announcement of Oracle


NoSQL Database 3.0, Oracle Magazine
sat down with Dave Segleau, director of
see these kinds of applications in cus-
tomer service and customer self-service.
Industries for this kind of application
product management at Oracle, to talk include financial services, insurance, adver-
about the state of NoSQL, NoSQL use tising, marketing, online catalogs, social
cases, and key features in Oracle NoSQL media, and e-retail.
Database 3.0. Listen to the podcast at The second use case that we see often
oracle.com/magcasts. is Oracle NoSQL Database being used for
Oracle Magazine: What is the role of NoSQL real-time event processing, and we typi-
in the enterprise today? cally see applications in fraud prevention,
Segleau: NoSQL is part of the big data medical monitoring, factory automation,
umbrella of technologies, and it plays a quality-of-service monitoring, and geo
role in the architecture and deployment location tracking.
of big data solutions. NoSQL provides a And the third use case we often see is
cost-effective, high-performance, hori- Oracle NoSQL Database being used for
zontally scalable database platform for time-series data management. We typically
very simple structured and semistructured see applications within financial services
data and simple operations at volume. Dave Segleau, Director of Product Management, Oracle for managing stock and trading information
Enterprises are adopting NoSQL databases as well as within utilities, oil and gas, and
because they offer very flexible application providing a horizontally scalable high-speed manufacturing for capturing sensor data.
developercentric data models and more- database with relaxed transaction semantics Oracle Magazine: What types of processes
efficient operations for simple data struc- specifically designed for high-volume, high- and what other technologies are typically
tures, which means that enterprises can velocity distributed operations. This often involved in these use cases?
increase revenue by providing new types of results in NoSQL being used to create new Segleau: The technologies involved largely
applications and services, as well as lower applications or capture new data sets, or in depend on the functionality thats being
their overall IT costs. some cases, to offload some of the data and implemented. In every case weve seen,
Oracle Magazine: How does NoSQL comple- operations from relational databases. NoSQL there is definitely a relational database such
ment other information technologies databases are never deployed in an isolated as Oracle Database and a data warehouse
including the relational database? data management solution. Every one of our in close proximity and, in fact, integrated
Segleau: NoSQL was not designed as a Oracle NoSQL Database customers deploys a with the data in the NoSQL databases.
general-purpose database engine, but combination of NoSQL, relational databases, In many cases, especially with web scale
rather it was designed to address a specific and Hadoop together, using the technology personalization and time-series data
set of data management challenges. As thats the best tool for the job at hand. management, Hadoop and MapReduce are
such, its really a component within any Oracle Magazine: How are organizations also used to provide batch processing and
enterprise data management solution. It using Oracle NoSQL Database today? simple summary statistics on the enormous
complements Apache Hadoop and Hadoops Segleau: Based on the customers weve amounts of data that are becoming available.
distributed data processing by providing talked to who have adopted Oracle NoSQL We also often see middleware technolo-
an equally distributed low-latency data- Database, I can summarize the use cases gies integrated as part of a NoSQL-based
base platform for fast indexed data access into three basic types. First, we see a lot of solution. In particular, we see products such
directly from the MapReduce processes companies using Oracle NoSQL Database as Oracle Event Processing and Oracle Real-
Rex Rystedt

within Hadoop. for what I call web scale personalization Time Decisions software used to process
It complements relational databases by and transactional applications. We often and manage real-time events as well as

July/August 2014 Oracle.com/oraclemagazine


Interview By Tom Haunert 15

caching products such as Oracle Coherence


to cache both relational and nonrelational
Enterprises are adopting NoSQL
data in the same application cache grid. databases because they offer very flexible
Oracle Magazine: Oracle recently
announced a new release of Oracle NoSQL
application developercentric data models
DatabaseOracle NoSQL Database 3.0. and more-efficient operations for simple
data structures.
Tell us about the key features of this release
and how it is enabling better big data pro-
cesses and results.
Segleau: Oracle NoSQL Database 3.0 support for data centers in Release 2.1, are the business and technology challenges
was released in early April 2014, and it allowing enterprises to allocate resources, for NoSQL going forward?
includes some really interesting new essentially storage nodes, across data Segleau: The primary change that weve
features. The release includes a new centers with automatic replication and seen is that applications have moved from
table-based data model with support for failover between the different resources. being science experiments to production
secondary indexes, and it also includes Oracle NoSQL Database 3.0 adds secondary deployments of mission-critical technology.
support for secondary data centers, which data centers, which were now calling zones. This impacts the NoSQL technology industry
were calling zones, as well as the first set of Secondary zones allow enterprises to define in a couple of ways. First of all, the decision-
features around security. remote data centers, which participate in makers have changed; its no longer just the
Oracle Magazine: Tell us more about the global distribution via automatic asynchro- application developers who are choosing
new table data model and secondary nous replication. which NoSQL product to use. Enterprise IT
indexes features. So not only is Oracle NoSQL Database 3.0 departments are becoming important influ-
Segleau: To facilitate adoption of NoSQL replicating the data, but the secondary encers in choosing which NoSQL technology
technology, its important to make it avail- data centers feature also enables applica- vendors to partner with.
able in a way thats familiar to our customers tions to define queries and workloads to be The second change is a shift in product
and application developers. In that vein, executed only on specific secondary zones. focus. In the early years of NoSQL, the tech-
Oracle NoSQL Database 3.0 adds a table- Using the feature, applications can run spe- nology and feature focus was extremely
based data model, which allows developers cific workloads such as batch processing or developer-centric; it was all about feeds and
to more easily represent their data and build reporting against secondary zones rather speeds. But over the past year or so, security
applications more quickly. Its a flexible data than impact the throughput and low-latency and system administrationespecially of
model implemented using JSON [JavaScript queries that are being executed within the large, complex production deployments
Object Notation] structures, for storage as primary zone. This combination of capabili- has taken center stage. This evolution also
well as for table evolution. ties enables enterprises to ensure continuity affects the features that are included in
Along with the introduction of tables, through global disaster recovery planning Oracle NoSQL Database. This evolution
Oracle NoSQL Database 3.0 adds secondary and to manage query and application load in product focus emphasizes the need to
indexes, which can be built on any combi- balancing across and between primary and provide integration with the overall existing
nation of fields within a given record. The secondary zones. Oracle IT technology, as well as to provide
secondary indexes are colocated with the Oracle Magazine: Tell us more about the new simple and automated administration capa-
primary data on each shard in the Oracle security features enabled in the new Oracle bilities that address the IT concerns around
NoSQL Database. The advantage of this NoSQL Database release. critical functions like disaster recovery,
is that reads and writes on the secondary Segleau: Oracle NoSQL Database adds SSL security, and global data integrity.
index are very, very fast because theyre [Secure Sockets Layer] encryption over the I think that the challenge for businesses
colocated with the primary record within the wire for both client/server and server-to- is to identify technology partners, not just
same shard. Additionally, the indexes are server communications, and it adds an products, that share an integrated enterprise-
transactionally consistent and secondary operating-system-independent, cluster- centric view of how NoSQL extends their
index scans are automatically parallelized wide password-based user authentication. existing IT infrastructure.
across the shards. This results in a highly Passwords can be stored in a secure, obfus-
efficient and scalable indexing scheme, cated trust store or within the Oracle wallet.
which application developers can then take These two capabilities enable enterprises to Next Steps
advantage of to meet the requirements of provide greater protection from unauthor-
their high-volume, low-latency queries. ized access to sensitive data, as well as to LEARN more about Oracle NoSQL Database
oracle.com/goto/nosql
Oracle Magazine: Tell us more about the new protect from network intrusions.
secondary data centers feature. Oracle Magazine: How have NoSQL and LISTEN to the podcast
oracle.com/magcasts
Segleau: Oracle NoSQL Database introduced Oracle NoSQL Database evolved, and what

oracle magazine July/August 2014


16 Book Beat

Oracle PL/SQL Performance Tuning Partners Earn Oracle PartnerNetwork Specialized Status
Tips & Techniques
By Michael Rosenblum and Two Oracle partners have earned Oracle mentation services; enterprise IT services;
Paul Dorsey PartnerNetwork Specialized status for their and expertise in banking, financial services,
Oracle Press solutions. To achieve Oracle PartnerNetwork and supply chain technology.
oraclepressbooks.com Specialized status, Oracle partners are Black & Veatch, an Oracle Gold
required to meet a stringent set of require- Partner, achieved Oracle PartnerNetwork
Oracle PL/SQL
Performance Tuning Tips
ments that are based on the needs and prior- Specialized status for Oracle Utilities
& Techniques is a hands- ities of the customer and partner community. Customer Care and Billing. Black & Veatch
on intermediate guide for developers and Aurionpro, an Oracle Platinum Partner, provides technology solutions for natural
programmers wanting to achieve results
achieved Oracle PartnerNetwork Specialized gas, electric, and water utilities.
by deploying the latest and best methods
for improving overall speed, reliability, status for Oracle Access Management Suite aurionpro.com
and security. Readers will learn expert Plus 11g. Aurionpro delivers Oracle imple- bv.com
performance-tuning methods that draw
on decades of professional experience.
A number of real-world examples are Seven Partners Earn Oracle Exadata Optimized Status
included in the book.
Seven Oracle partners have achieved Oracle location intelligence.
Predictive Analytics Using Oracle Exadata Optimized status for their solu- Mformation
Data Miner: Develop and Use tions. Oracle Exadata Optimized status Software
Data Mining Models in ODM, SQL,
and PL/SQL is part of the Oracle Exastack Optimized Technologies, an
By Brendan Tierney program, through which Oracle partners Oracle Gold Partner,
Oracle Press can develop, test, and tune their applica- achieved the status
oraclepressbooks.com tions on Oracle Exadata Database Machine, for Mformation
Oracle Exalogic Elastic Cloud, Oracle Service Manager.
This essential how-to
Exalytics In-Memory Machine, and Oracle Mformation is a
guide is written for data
scientists, data miners, SuperCluster engineered systems. global provider of
data analysts, Oracle Flex Software Systems Closed Joint Stock solutions for man-
developers, and database administrators. Company, an Oracle Platinum Partner, aging wirelessly con-
Predictive Analytics Using Oracle Data Miner
achieved Oracle Exadata Optimized for its nected devices.
shows how to build and apply advanced
data mining models and perform data Core System FXL 2 and Va-Bank FXL 2 auto- Model N, an
mining tasks in SQL and PL/SQL. The book mated banking systems. Oracle Gold Partner,
includes guidance on how to migrate data LG CNS, an Oracle Platinum Partner, announced that its
mining models from a test environment to
achieved the status for its Smart ENA 1.0 Model N Revenue Management 5.5.1 and
a production environment.
solution. Smart ENA 1.0 is a pattern analysis 5.6.2 earned Oracle Exadata Optimized
Oracle ADF Enterprise Application solution that provides early fraud detection. status. Model N revenue management solu-
DevelopmentMade Simple, Calypso Technology, an Oracle Gold tions are designed to enable companies to
Second Edition
Partner and integrated capital markets align pricing, contract development and
By Sten E. Vesterli
platform provider, announced that Calypso administration, and payment of trade incen-
Packt
packtpub.com version 14 has achieved Oracle Exadata tives and government reimbursements.
Optimized status. SmartSoft, a Cardtek Group company
Updated for the latest JDS Uniphase, an and an Oracle Gold Partner, announced
release, Oracle ADF Oracle Gold Partner, that its OCEAN international payment
Enterprise Application
achieved Oracle processing system earned Oracle Exadata
DevelopmentMade
Simple, Second Edition explains how to Exadata Optimized Optimized status. OCEAN is a solution for
optimize Oracle Application Development status for its credit card, debit card, point-of-sale/
Framework 12c (Oracle ADF 12c) tech- ariesoGEO. merchant management, and ATM manage-
nology. Readers will walk through a devel-
opment project from proof of concept
ariesoGEO is an ment for banks, financial institutions, pro-
through development and deployment. The enterprise geoloca- cessors, and retailers.
book demonstrates support tools for source tion solution that flexsoft.com
control and issue tracking and explains
collects, analyzes, lgcns.com
application security. It also dives into spe-
cialty topics such as skinning, customiza- and geolocates calypso.com
tion, and internationalization. details from every jdsu.com
customer call or mformation.com
Look for other Oracle books at
bit.ly/oraclebookstore data connection modeln.com
to create a store of smartsoftww.com

JULY/AUGUST 2014 ORACLE.COM/ORACLEMAGAZINE


PARTNER NEWS 17

Two Partners Earn Oracle


ORACLE CLOUD MARKETPLACE Exadata Optimized and Oracle
Oracle Cloud Marketplace features partner Oracle Silver Partner Badgeville:
SuperCluster Optimized Status
solutions that leverage Oracle Cloud plat- Badgevilles Behavior Platform for Oracle Two partners have earned Oracle Exadata
form services and Oracle software-as-a- Sales Cloud provides gamification tech- Optimized and Oracle SuperCluster
service applications. It provides a place for nology to help drive customer loyalty and Optimized status for solutions that have
Oracle Cloud customers to easily browse, employee performance. Through game,
been tested and tuned with those engi-
evaluate, and buy applications developed reputation, and social mechanics the solu-
by registered Oracle partners. Three Oracle tion motivates desired behaviors. neered systems.
partners have recently released solutions to Oracle Silver Partner Mindmatrix: Oracle Diamond Partner Infosys
the marketplace. Mindmatrix Revenue Growth Platform announced that its Finacle Core Banking
Oracle Gold Partner Five9: The Five9 is integrated with Oracle Sales Cloud and
solution, part of the Finacle-Infosys
Virtual Contact Center solution for Oracle features asset management, enablement
Service Cloud delivers automatic computer of both direct and channel sales, and mar- ePlatform, achieved Oracle Exadata
telephony integration screen pops; soft- keting automation functionality. Optimized and Oracle SuperCluster
phone capabilities such as click-to-dial; Optimized status. Finacle Core Banking is
and an intuitive single-screen interface to five9.com
create exceptional customer experiences,
a web-based, centralized, customer-
badgeville.com
increase agent productivity, and deliver centric, fully integrated, multilingual,
tangible business results. mindmatrix.net multicurrency solution for retail, corporate,
and trade finance banking.
Oracle Gold Partner Temenos
UK reported that WealthManager13
International Turnkey Systems Group Earns Oracle Exadata Ready and achieved Oracle Exadata Optimized and
Oracle Exalogic Ready Status Oracle SuperCluster Optimized status.
Oracle Platinum Partner International and Oracle Exalogic. ETHIX provides multi- WealthManager is an integrated wealth
Turnkey Systems has announced that ETHIX channel corporate and retail products and management platform.
Financial Solutions achieved Oracle Exadata services in Islamic finance and investment, infosys.com
Ready and Oracle Exalogic Ready status, including core banking, trade finance, online temenos.com
demonstrating that these solutions are sup- banking, and more.
ported and ready to run on Oracle Exadata its.ws
cVidya Achieves Oracle
SuperCluster Optimized Status
Cubus AG Announces Oracle Exadata Ready, Oracle Database Ready, Oracle Gold Partner cVidya announced
and Oracle VM Ready Status that FraudView has achieved Oracle
Oracle Gold Partner Cubus AG has earned Essbasebased enterprise planning, per- SuperCluster Optimized status. FraudView
Oracle Exadata Ready, Oracle Database formance management, and business intel- prevents, detects, and investigates current
Ready, and Oracle VM Ready status for ligence solution. and future threats from across business
Outperform. Cubus Outperform is an Oracle cubus.eu lines and services.
cvidya.com

Two Partners Earn Oracle Validated Integration with Oracles


PeopleSoft Campus Solutions Asseco SEE Teknoloji Earns
Two partners have earned Oracle Validated payment and refund processing and data Oracle Exadata Optimized and
Integration, demonstrating that their soft- analytics and management. Oracle Exalogic Optimized Status
ware products complement and integrate Oracle Gold Partner InFlight earned Oracle Platinum Partner Asseco SEE
with Oracles PeopleSoft Campus Solutions. Oracle Validated Integration between Teknoloji A.S.s InACT solution has earned
Oracle Gold Partner Higher One earned InFlight and PeopleSoft Campus Solutions, Oracle Exadata Optimized and Oracle
Oracle Validated Integration between to deliver a student-friendly system Exalogic Optimized status, demonstrating
Higher One Disbursement Services and accessible from desktop, laptop, and that it has been tested and tuned to run
PeopleSoft Campus mobile devices. InFlight develops integra- with Oracle Exadata Database Machine and
Solutions 9.0. Higher tion technology that allows its clients Oracle Exalogic Elastic Cloud. InACT is a
One provides finan- to extract maximum value from their deterministic-scenario-based system that
cial services tools line-of-business and learning manage- monitors customer and merchant transac-
to US college and ment systems. tions and creates fraud and anti-money-
I-HUA CHEN

university campuses higherone.com laundering alerts.


for activities such as inflightintegration.com asseco-see.com.tr

ORACLE MAGAZINE JULY/AUGUST 2014


YOUR DESTINATION FOR ORACLE AND JAVA EXPERTISE
Written by leading technology professionals, Oracle Press books offer the most definitive,
complete, and up-to-date coverage of Oracle products and technologies available.

Oracle PL/SQL Performance


Tuning Tips & Techniques
Michael Rosenblum, Paul Dorsey
Best practices for maximizing
overall system speed, reliability,
and security

Oracle Database 12c


PL/SQL Programming
Michael McLaughlin
Develop, debug, and administer
robust database programs

Predictive Analytics
Using Oracle Data Miner
Brendan Tierney
Develop and deploy next-generation
predictive analytics applications

Master Competitive
Analytics with Oracle Endeca
Information Discovery
Helen Sun, William Smith
Automatically organize information for
search, discovery, and analysis

Available in print and eBook formats

www.OraclePressBooks.com @OraclePress OraclePress


Community Bulletin Happenings in Oracle Technology Network BY ROLAND SMART 19

Nominations Are Open for Oracle ACE Associate


Theres a new way to get involved in
the Oracle ACE program: become an
Oracle ACE Associate.
The Oracle ACE program highlights excellence within the global
Oracle community by recognizing individuals who have demon-
strated both technical proficiency and strong credentials as com-
munity enthusiasts and advocates. Participation benefits include
access to exclusive speaking and networking opportunities at Oracle
events and third-party conferences.
The Oracle ACE program recently welcomed its first Oracle ACE
Associates, who join a thriving community of more than 420 Oracle
ACE Directors and Oracle ACEs. Download an Oracle ACE Associate
nomination form at bit.ly/ace-associate-info.

Download Oracle
Solaris Studio

OPPORTUNITIES AND
CHALLENGES IN BIG DATA Get Published
Every year millions of people
12.4
Oracle Solaris Studio is a

ARCHITECTURE read OTNs community-


member-authored technical
suite of compilers and code
analysis tools that assists
developers in creating
articles to get the latest
Everybodys talking about big data, and some of the conver- insight into database appli- highly optimized, robust,
sations are about architecture. cation development, cloud and secure applications
Now available on the OTN ArchBeat blog, at bit.ly/ computing, mobile design, for the Oracle Solaris and
and more. Linux operating systems.
big-data-arch, a three-part podcast series explores big These tools help application
Now its your turn to
data architecture with Oracle ACE Director Gwen Shapira inform and engage this developers achieve the best
as well as three of the authors of Oracle Big Data Handbook readership. If you have performance on Oracles
(bit.ly/big-data-handbook). how-to technical insight to newest SPARC T-Series
The conversation provides practical advice on several share with OTN members, and SPARC Enterprise
crucial architect-related projects and responsibilities, includ- consider submitting a M-Series servers, Fujitsus
2,000- to 3,000-word M10 servers, and Intel-
ing how to distinguish an architecture that is ready for big article. Get started and based servers. Download
data from one that is not, how to avoid some common mis- learn more about OTNs edi- the Oracle Solaris Studio
takes enterprise companies make at the beginning of their torial process and content 12.4 beta release (SPARC,
big data journey, and how to master rapid data proliferation requirements and guidelines x86, and Linux versions are
with technologies such as Oracle Database 12c. at bit.ly/otn-submissions. available) at bit.ly/solaris-
studio-12p4.

JAVA 8 LAUNCH VIDEOS ON DEMAND


More than 9,000 Java community members attended the Java 8 launch event to mark
the latest iteration of the largest open standardsbased, community-driven platform.
In case you missed it, you can watch the full event replay at bit.ly/java8-resources.
On this page, you can also view videos on the newest tools and features in Java SE 8,
Java SE Embedded 8, and Java ME 8. And for those looking to dig deeper, check out the
expert tutorials on topics ranging from using lambda expressions to developing modular
I-HUA CHEN

service-enabled applications.

Roland Smart is vice president of social and community marketing at Oracle.


ORACLE MAGAZINE JULY/AUGUST 2014
20 Architect By Bob Rhubart

Building Bridges
Organizational silos thwarting IT architecture goals?
Put away the sledgehammer.

A t a local Oracle user group event, I


spotted a familiar face. What are you
Inside the silo, says. Put reward mechanisms in place
to promote synergies and the reuse of
working on? I asked him. things may be quite information and assets, and define struc-
For the next several minutes, I heard
about an infrastructure modernization
comfortable, and tured procedures and processes that can
guarantee long-term cooperation without
project he and his team were involved in. the people enjoying adding disruption.
In general, the project was on track and Of course, if any of this were easy, you
proceeding with limited aspirin consump- that comfort may wouldnt have read this far. The need to
tion. But there was one headache-inducing
issue that posed an obstacle to the projects
have little incentive evolve beyond silos is clear, but its also
something that you, as an architect, arent
overall success: the company this person for change. likely to accomplish on your own.
works for has five separate development If organizational leaders want to foster
teams, and among those teams there isnt a ceived protection of the silo can present an more cross-silo collaboration, incentives
great deal of cooperation. imposing alternative that itself is thought need to be aligned that encourage folks to
So yes, another conversation about silos. to be a restrictive, rule-bound environment. work together, Stephens emphasizes. And
Organizational silos are the bane of That perception is not entirely without basis. thats going to require the involvement of
effective IT architecture. The goal of that On the other hand, a centrally governed those who are in a position to enact organi-
architecture, of course, is to consolidate software factory relies on standards, shared zational changes.
resources, reduce complexity, and better best practices, and strict conventions for This fight should be backed up by the
align IT with the business. Ironically, the last names and design choices, says Normann. highest levels of the management hier-
of those three goals may have provided the So we are facing a dilemma. We are archy, confirms Normann.
foundation for some silos. doomed if we just demonize the silo. Bridging those silos might be a long slog.
The tighter alignment of IT with the busi- Rather than tearing down silos, the better But somebodys got to do it.
ness can take on the qualities of a badly strategy is to focus on building bridges
tailored suitso tight that it can impede between them.
the agility of the overall organization. From One should work across organizational
Bob Rhubart
within a silo, that constriction may not be boundaries looking for commonalities and
(bob.rhubart@oracle.com)
apparent, however. In fact, inside the silo, seeking ways to identify win-win opportuni-
is manager of the
things may be quite comfortable, and the ties, advises Oracle Enterprise Architect
architect community
people enjoying that comfort may have little Eric Stephens. Dont let the org chart
on Oracle Technology
incentive for change. hinder your collaboration.
Network, the host of the
One step toward changing the silo mind- To that end, Oracle ACE Manuel
Oracle Technology Network ArchBeat podcast
set, then, is understanding what makes silos Rosa, business manager for SOA at Link
series, and the author of the ArchBeat blog
so appealing. Consulting, suggests approaching the issue
(blogs.oracle.com/archbeat).
We need to acknowledge the existence from an information perspective. We need
of silo thinking, says Oracle ACE Director to identify how we can define a common
Next Steps
Hajo Normann, a service-oriented architec- modelthe basic functional and business
ture (SOA) and business process manage- concepts that usually cross different silos,
READ
ment expert with Accenture. I would go Rosa advises. The Architect as Salesperson
even further and say we need to embrace it. From there, its a matter of finding ways bit.ly/1qzdMG1
According to Normann, the silo can be to leverage that information so that one silo The Most Important IT Career Skill
a congenial place, where people may enjoy sees the advantages of connecting to other bit.ly/Q78swP
a sense of freedom and creativity, or at silos. Find a way to highlight the benefits Architects, Leadership, and Influence
bit.ly/RiJc7N
least familiarity. Working outside the per- of such cooperation between silos, Rosa

CONNECT: blogs.oracle.com/archbeat facebook.com/brhubart twitter.com/brhubart linkedin.com/in/bobrhubart

July/august 2014 Oracle.com/oraclemagazine


Peer-To-Peer by Blair Campbell 21

Close Encounters
Three peers extol the virtues of in-person classes and conferences.

Dominic Delmolino Enrique Orbegozo Osama Mustafa Hussein

Company: Agilex Technologies, a technology Company: Self-employed Company: Gurus Solutions, a software solution
solution provider serving the national security, Job title/description: Independent Oracle provider
healthcare, and public sectors consultant, responsible for database upgrade Job title/description: Senior Oracle DBA,
Job title/description: Vice president of data and migration, database and application tuning, responsible for database performance, integrity,
architecture and engineering, responsible for incident resolution, and design and configuration security, and backup and recovery
reviewing and supporting Agilex projects at of high-availability solutions Location: Amman, Jordan
customer locations Location: Lima, Peru Oracle credentials: Oracle Certified
Location: Chantilly, Virginia Oracle credentials: Oracle Certified Professional (Oracle Forms Developer, Oracle
Oracle credentials: Oracle Exadata Certified Professional DBA (on several releases including Advanced PL/SQL Developer, Oracle Solaris
Implementation Specialist, with 24 years of Oracle Database 10g and Oracle Database 11g), 10 System Administrator, Oracle Database
experience using Oracle products with 19 years of experience using Oracle products 10g, Oracle Database 11g) and Oracle Linux
Implementation Specialist, with more than 7
years of experience using Oracle products
Whats your favorite technique on the
job? Its deconstructing data processing What role has Oracle University [OU] played
routines, whether in PL/SQL or SQL, in your career? In 1996 one of my first Whats your favorite Oracle technology or
and refactoring them into simpler, more employers sent me from Peru to Orlando, solution area? Oracle Fusion Middleware
efficient workflows. Florida, to take an Oracle7 performance because it includes Oracle technologies that
Which new features in Oracle Database are tuning workshop, and I learned a lot. After can help any company build end-to-end
you currently finding most valuable? I always that I took the complete set of courses for solutions. I like that it is a fully integrated
like to see whats being added to SQL, and Oracle8 to gain my first Oracle Certified family of products that can be delivered into
how it can be used to solve harder and harder Professional credential. Ten years later I different layers, with each layer offering a dif-
problems. Analytic functions and recursive became an OU instructor, which allowed me ferent experience. Whether youre focused on
SQL are particularly valuable. And obviously to share my knowledge and experience with integration, automating processes, security,
the new container database architecture in a new generation of DBAs. or compliance, Oracle Fusion Middleware has
Oracle Database 12c will be very usefulboth What advice do you have about getting into something for everyone.
from a security and self-service perspective. database development? Its a fact of life Whats your go-to Oracle reference book? I
Whats been your favorite Oracle technology that things wont always work as expected have lots of Oracle books and most of them
conference experience? I could name any or documented, so take notes on what you are great. Id have to say Expert Oracle RAC 12c
ODTUG eventtheyre all great. I think its do to solve any problems you encounter and by Syed Jaffar Hussain, Tariq Farooq, Riyaj
important for DBAs and developers to talk publish those notes on your blog. This will Shamsudeen, and Kai Yu, and Expert Oracle
to each other, and ODTUG really tries to help you to remember those solutions, and Enterprise Manager 12c by Kellyn PotVin and
facilitate that. I also enjoy networking with it will help others who are experiencing the several coauthors [both Apress, 2013].
colleagues through a local Meetup group same or similar problems. Whats been your favorite Oracle technology
that I chair called Agile Data Experts DC. Its What green practices do you use in your DBA conference experience? It was this past
a monthly gathering of Washington DC data work? I try to work remotely when possible. December at Tech13, the UKOUG [UK Oracle
management professionals where we talk I also recommend server consolidation, User Group] conference. I finally got to meet
about tips, tools, and techniques for agile replacing older energy-hungry servers with many of my online friends and colleagues in
data management. fewer less-energy-demanding ones. person, and we had an amazing time.

Learn more about the Oracle ACE program at oracle.com/technetwork/community/oracle-ace.

oracle magazine July/august 2014


ADVERTISING SUPPLEMENT

Delivering
at the Speed
of Business
Today, companies need to manage huge amounts of data to develop
insights and actionable, valuable informationand to enable business
decision makers to operate with solid information and better foresight.
At the same time, they need to process this growing volume of data
faster than ever in order to stay ahead of the competition and a
constantly changing business environment. In an increasingly real-time
business world, the speed and quality of information are both key.
These trends are putting a strain on traditional IT biggest technology advancement for SPARC servers in
infrastructures, as companies look for better ways to more than a decade.
provide enterprise applications and analytics to the The Fujitsu M10 servers are built on the advanced
business and pursue initiatives such as big data and SPARC64 X processor and now the new SPARC64 X+
data center consolidation. It is becoming clear that processor. These processors include Software-on-Chip
incremental modifcations are not enough to keep up. technology created through the close collaboration
IT groups need innovative approaches that will enable of Fujitsu and Oracle. Software-on-Chip moves some
them to reshape the infrastructure to provide the routines from software programs to the circuitry of
performance and scalability needed to keep up with the chip, increasing the speed of those routines. The
the ever-evolving demands of the business. current Fujitsu M10 hardware and Oracle Solaris 11
software work together with this feature, and with
A Leap Forward in Servers Oracle Database 12c plus patch, companies may
The Fujitsu M10 server line is designed to be at the see an increase in performance of up to 25%, due to
heart of that type of infrastructure. Drawing on Fujitsus Software-on-Chip.
heritage of supercomputingand its deep partnership The Fujitsu M10 also uses an in-memory pro-
with Oracle that is focused on SPARC and mission- cessing concept, which means that data is accessed
critical business computingthis server line offers the within memory in just nano-seconds, rather than the
milliseconds needed for traditional
access to storage and disks. Here
again, hardware and software can
work closely together for a signif-
cant increase in performance.
The Fujitsu M10 includes other
innovative technologies that help
drive high performance. For exam-
ple, Fujitsus advanced High Speed
Interconnect transmission technology
is used to connect CPUs, resulting in
a very fast 14.5 Gbps transmission
rate. In addition, a unique Liquid
Loop Cooling mechanism can cool hot
spots effectively, allowing compo-
nents such as the CPU and memory
to be located more closely to one
another. This close placement and
resulting compute density has helped
the Fujitsu M10 achieve one-ffth
lower memory latency, compared to
previous servers.

The Payoff in Performance


Together, these various Fujitsu
technologies add up to dramatic
increases in performance. In the frst application performance including
six months following its release, the response performance, which is
Since its release,
Fujitsu M10 set 14 world records in essential for real-time processing. the Fujitsu M10 has
industry standard benchmark tests, Fujitsu M10 with a 16-CPU confgu-
including CPU-specifc tests, such ration achieved the worlds highest
set 14 world records
as SPEC CPU, and application-level performance on both critical-jOP- in industry standard
tests, such as Java and SAP.
A look at a few of these
S(Java Operations Per Second) and benchmark tests.
max-jOPS.
benchmarks illustrates the level of The servers ability to deliver
performance improvement offered high performance has been Providing an
by these servers: For example, in demonstrated outside the lab in real Agile IT Foundation
the SPECint_rate2006 benchmark, world usage, as well. For example, Business does not hold still,
which looks at CPU performance and a telecom company that used the and that means that IT needs to
throughput, the Fujitsu M10 server Fujitsu M10 in a server consolidation constantly adjust and adapt to
provided twice the performance of effort achieved a 3X improvement requirements that can change
the previous record-holding server. in performance. And a printing quicklyand often, unpredictably.
And in the STREAM Triad benchmark, company that migrated from a Typically, this means expanding
which looks at memory access and UNIX platform to the Fujitsu server the infrastructure in step with
throughput, it was fve times faster saw a 2X improvement in response business growth, and doing so
than the previous record holder. time and a 3X improvement in cost-effectively.
The SPECjbb2013 bench- batch processing time. [See sidebar, The Fujitsu M10 addresses
mark is designed to measure Java Power for Global Expansion.] this need with its innovative core
ADVERTISING SUPPLEMENT

activation feature. The SPARC64 X and the SPARC64 X+ CPU equipment that is using power but not contributing to
have 16 cores. When a company purchases a lower-end the bottom line.
Fujitsu M10-1 with one CPU, all 16 physical CPU cores are In addition to high performance and fexibility, the
already included in the box. They can be activated and Fujitsu M10 server design builds on Fujitsus history of
paid for on an as-needed basis, making it easy to quickly providing mainframe-class reliability, availability and
scale from 2 to 16 cores in increments of two, without serviceability technology. Its architecture includes many
having to add any hardware. This core activation concept features that help ensure that business operations are not
applies across the Fujitsu M10 product line, up to the interrupted and unscheduled downtime is not required to
largest 64-CPU modular models. In short, core activation deal with failing hardware or software components. For
may allow companies to license only what they need at example, redundant interconnect paths help minimize
the core level, and keep computing power in step with the risk of errors and data corruption. Predictive self-
changing demandsan approach that is highly cost- healing capabilities enable the operating system to work
effective. with the server hardware to predict component failures
Working hand-in-hand with core activation, the and minimize the impact of issues before they affect the
Fujitsu M10 provides systems operation.

The Fujitsu M10 building block capabilities Fujitsu will keep delivering more with its Fujitsu M10
that enable simple, server line. This means continuing to expand Software-
allows companies modular scalability. For on-Chip capabilities and providing features that further
to keep computing example, if a company increase reliability, availability and serviceability. It also
reaches the capacity means working with Oracle on innovative approaches
power in step with limits with all 64 CPU to big data and other enterprise computing needs
changing demands. cores of a Fujitsu M10-4S and giving customers the technologies they need to be
activated, it can quickly agile and responsive to successfully pursue todays fast-
add a second 2- or 4-socket box to the frst without moving business opportunities.
interrupting the system, and then grow that new box
through the core activation process, as needed. This For More Information
can be continued up to a maximum confguration of To fnd out more about the Fujitsu M10 server, please
16 boxes with 1,024 active cores and 32 terabytes of see these related documents:
memory. Accelerate and Consolidate the Data Center
With these features, the Fujitsu M10 servers provide Consolidate with Fujitsu M10 Servers
tremendous fexibility and expandability. This enables Accelerate Database Performance with
the IT organization to not only optimize its investment Fujitsu M10 Servers
when it frst implements the system, but to keep
Please visit our web site to view the full DNP case study.
optimizing it over time. It essentially provides a pay
as you go modeland helps avoid the all-too-common Additional information about the Fujitsu M10 server line
problem of having to overbuy and ending up with can be found at www.fujitsu.com/sparc.

SPEC (The Standard Performance Evaluation Corporation), SPECint and SPECjbb are registered trademarks of Standard Performance Evaluation Corpora-
tion(SPEC) in the US and other countries.Details and the latest information of this benchmark can be found at www.spec.org. Published as SPARC M10.
Fujitsu M10 is sold as SPARC M10 by Fujitsu in Japan. Fujitsu M10 and SPARC M10 are identical products.

World-record SPECint_rate2006 result: Comparison based upon SPECint_rate2006 result except Supercomputers: 23,800 on a SPARC M10-4S server with 64
SPARC64 X (3.0 GHz) processors, Oracle Solaris 11.1, Oracle Solaris Studio 12.3, 1/13 Platform Specifc Enhancement. Details and the latest information on this
benchmark can be found at www.spec.org.

World-record STREAM result: Comparison based upon STREAM Triad result except Supercomputers: 4,002 GB/s on a SPARC M10-4S server with 64 SPARC64 X
(3.0 GHz) processors. Details and the latest information on this benchmark can be found at www.cs.virginia.edu/stream/.

World-record SPECjbb2013 results: 16 CPU confguration: 308,936 max-jOPS and 168,127 critical-jOPS on a SPARC M10-4S server with 16 SPARC64 X (3.0 GHz)
processors, Oracle Solaris 11.1 SRU 6.4, Java HotSpot 64-Bit Server VM, version 1.7.0_17. 4 CPU confguration: 83,909 max-jOPS and 50,562 critical-jOPS on
a SPARC M10-4S server with 4 SPARC64 X (3.0 GHz) processors, Oracle Solaris 11.1 SRU 6.4, Java HotSpot 64-Bit Server VM, version 1.7.0_17. Details and the
latest information on this benchmark can be found at www.spec.org.
Power for
Global Expansion
D
ai Nippon Printing Co., Ltd. (DNP) is one of the stable service for information
worlds largest printing companies, but its business systems, from planning
extends over a wide variety of felds, including and design to construction,
Information Communication (e.g. publication printings operation, and maintenance.
and digital signage), Lifestyle and Industrial Supplies When we investigated
(e.g. packaging and lifestyle materials) and Electronics Fujitsu M10, the key points
(e.g. display components and electronic devices). DNP considered were not just its
has been actively expanding globally and now has 26 high performance, but its operational stability inherited
sales locations and 13 manufacturing plants around the from mainframe reliability, the fact that it embraces the
world. The processing for DNP exports is done primarily future potential and long-term support of Oracle Solaris,
through its central overseas business system. The previous and its compatibility with Oracle Database. Specifcally
system had been constructed based on HP-UX, but it had when combined with Oracle Database 11g, Fujitsu
M10-1 is able to deliver one-stop-
shop support for our business and
signifcantly reduce maintenance
costs.
For the new system confguration,
Fujitsu M10-1 was used as the core
database server. Fujitsu M10 and
Fujitsu made sure system construction
could be completed in a short amount
of time, says Mr. Shohei Yamashita,
Third Work System Dept., Work System
Tomoyasu Nagata Kazuo Kurosawa Shohei Yamashita Headquarters, DNP Information
Systems. The database server works in conjunction with
limitations in terms of expandability. For this reason,
the application server and the backup server. Furthermore,
DNP elected to replace the system using Fujitsu M10
Fujitsus one-stop-shop support delivers a quicker
servers.
resolution in the event of any issues.
DNP needed a high performance system that could handle
After installation, the databases response performance
increases in the amount of overseas business job data
doubled. Batch processing performance has tripled, thus
and additional users, and evaluated multiple vendors.
greatly reducing overall processing time. Total opera-
We had been paying close attention to information about
tional costs have been cut by nearly 35%, with software
new, high-performance servers and [Fujitsu M10s] high-
maintenance costs kept down, and operational effciency
performance, based on supercomputer technology, was a
increased by installing a backup server.
step above conventional servers, says Tomoyasu Nagata,
Section Head of the Overseas System Section at DNP. We Regarding future prospects, Mr. Nagata says, Were
confrmed the fgures backing Fujitsu M10 and it quickly planning to add more functionality leveraging CPU Core
became a very suitable candidate. Activation, which will allow us to fexibly expand the
system as needed. With this function, we can scale up
The fnal selection was done by DNP Information Systems
when our business is ready while keeping initial costs
Co., Ltd., which manages information systems for the
down. We look forward to working with Fujitsu as they
DNP Group. Mr. Kazuo Kurosawa, Department Head at
continue to support us through leading-edge solutions
DNP Information Systems, stated, Our role is to provide a
like Fujitsu M10 technology for big data processing.
SUCCESS ON
SPARC
The latest SPARC chips and
systems are at the center of better
business processes.
BY PHILIP J. GILL

S erver consolidation projects are designed


to cut costs and improve data center
performance, but companies deploying
Oracles SPARC servers, including the SPARC
T5 and SPARC M6 servers, are getting
additional benefits as well. Whether its a
hardware refresh or a complete revamp of IT
infrastructure, these companies are finding
that this new generation of SPARC servers
combined with the power and dependability of
the Oracle Solaris operating systemreduces
operating costs; improves business operations;
expands capacity; adds capability; and, in one
case at least, even recruits top IT talent.
Art Credit
28

Seamless Reliability
No matter how they are deliveredairwaves, cable, or satellite
With the new SPARC systems,
broadcast television services demand 24/7 operations that operate some applications run up to
reliably and seamlessly, at the touch of a button or the flick of a
switch. With a subscriber base of more than 15 million households,
10 times faster.
Mumbai, Indiabased Tata Sky is the leading provider of satellite- N. Ravishanker, Chief Information Officer, Tata Sky
based, direct-to-home broadcast television services in India.
We offer a wide variety of television services, from standard- [business-to-consumer] organization in scalability and reliability.
definition and high-definition channels to video-on-demand, We needed a hardware refresh that added capacity to support
mobile TV, movies, and personal video recordersboth standard our growing subscriber base, says Ravishanker. We also needed to
and high definitionas well as interactive content including games, set up a disaster recovery [DR] site to maintain the 24/7 reliability
educational applications, and more, says N. Ravishanker, chief and availability our customers have come to expect.
information officer at Tata Sky, a joint venture between Indian con- Tata Sky has been using SPARC servers running the Oracle Solaris
glomerate Tata Group and the US-based mass-media firm STAR TV. operating system since the companys inceptionit opened for
In 2012, Ravishanker explains, the firm was looking to add both business in 2006 with SPARC-based Sun Fire E20K serversand it
capacity and capability to better serve its growing customer base. looked to new SPARC servers to upgrade and enhance its IT infra-
There is excellent opportunity for growth in this market, especially structure, beginning in 2012 with new SPARC Enterprise M9000
since there is so much churn in cable television, he says. Since and SPARC T4 servers from Oracle and continuing in 2013 with
this is a commodity product, we face challenges similar to every B2C Oracles next-generation SPARC T5 and SPARC M5 servers.

Namas Bhojani

According to N. Ravishanker, chief information officer at Tata Sky, SPARC systems have improved performance, cut costs, simplified operations, and improved
reliability and availability for Tata Skys core business-critical applications.

July/August 2014 Oracle.com/oraclemagazine


29

Multithreaded

Under their metal exteriors, Oracles next- and therefore greater availability and serviceabil- of those SPARC chips has 12 corestwice the
generation SPARC T5 and SPARC M6 servers look ity, says Ribeiro. As a result, you can consoli- number of cores as its predecessor, the SPARC
alike, sharing common components, terabytes date more applications and deploy more virtual M5and each core can run 8 threads simultane-
of memory and storage, and more. What distin- machines, while achieving better performance ously, allowing for 3,072 threads running in the
guishes one from the other is how they are put through the highly scalable design. top-of-the line systems 384 cores. The SPARC
together, and that, in turn, is a matter of scale. The design differences between SPARC T5 M6-32 offers enough power to run the largest,
The two systems were designed to handle and SPARC M6 servers are obvious in the way the most demanding applications in use today, all in-
the same tasks, but with different design systems can be configured. The SPARC T5 system memory, says Ribeiro.
approaches, says Renato Ribeiro, director of begins with a blade server with a single processor The new SPARC T5 and SPARC M6 also run
product management for SPARC systems at and 256 GB of memory and tops out with a server counter to the conventional wisdom about large-
Oracle. SPARC T5 servers scale up to consider- with 8 processors and 4 TB of memory. scale multiprocessor systemsthey offer near-
able capacity, while using a fraction of a server The SPARC M6, introduced in September 2013, linear pricing from a two-processor SPARC T5-2
rack. The SPARC M6 server supports four times picks up where the SPARC T5 leaves off, and is server to the 32-processor, multiterabyte SPARC
the capacity of the largest SPARC T5 system. Oracles newest, most powerful, and most scal- M6-32 server. Although they scale to a very high
The design and capacity of the SPARC M6 able SPARC server to date. The top-of-the-line number of processors and many terabytes of
server delivers additional benefits. SPARC M6 SPARC M6-32 has up to 32 12-core 3.6 MHz SPARC memory, users dont pay a premium for that per-
servers include more component redundancy processors and up to 32 TB of main memory. Each formance on the bigger package, Ribeiro says.

According to Ravishanker, these systems have improved perfor- T5 and SPARC M6 systems have so much power and capability that
mance, cut costs, simplified operations, and improved reliability businesses today will typically carve these servers up into multiple
and availability for the companys core business-critical applica- virtual machines and deploy multiple different applications on a
tions, including its billing, smartcard management, electronic single system. Users not only get much higher performance, they
voucher distribution, and online customer ordering systems. get better return on their investment.
With the new SPARC systems, some applications run up to
10 times faster, he says. An application that ran at 4 seconds Where Credit Is Due
per transaction now performs at 0.4 seconds per transaction, Performance is important in all industriesand all economies. Turkey
and that provides near-instantaneous response times to our has a rapidly growing private sector whose growth is fueled in large
customers online requests, such as ordering movies or new part by the availability of consumer credit.
television channels. Although credit card penetration is high
The company also has established its in Turkey, the demand for consumer credit
first DR site, located in the city of Pune, snapshots continues to grow, explains Sinan zer,
India. With the new data center, should Tata Sky executive vice president of infrastructure
we experience a full-scale shutdown at our tatasky.com operations and security at Yapi Kredi Bank.
Location: Mumbai, India
primary production site, we can be back up Yapi Kredi was founded in 1944 as Turkeys
Industry: Media and entertainment
and running in less than 90 minutes, says Employees: 1,500 first private bank. It is the nations fourth-
Ravishanker. Powered by our new SPARC Oracle products: SPARC T4-2 and SPARC largest private bank and was the first to
servers, the disaster recovery site provides T4-4 servers; SPARC T5-2 and SPARC introduce consumer credit cards in 1991.
our customers with greater service reli- T5-4 servers; SPARC M5-32 server; SPARC To keep up with demand, Yapi Kredi
Enterprise M9000; Oracle Solaris 11 with
ability and availability. is currently migrating its credit card pro-
Oracle Solaris Zones Preflight System
We slashed operating costs 20 percent, Checker; Oracle Solaris Cluster (for high cessing from legacy mainframes and non-
including licensing, reduced data center floor availability); Oracle Database 11g; Oracle SPARC UNIX servers, consolidating that
space requirements, improved energy effi- Real Application Clusters; Oracle Enterprise workload on larger, more-powerful, and
ciency, and consolidated 61 legacy systems at Manager; Oracle VM 3.0; Siebel Customer cost-effective SPARC T5 series servers from
Relationship Management; Oracle Active
no additional cost, thanks to SPARCs built-in Oracle running the Oracle Solaris 10 oper-
Data Guard; Oracle Advanced Customer
advanced virtualization technologies and Support Services ating system and Oracle VM 3.0.
linear scalability, Ravishanker continues. Were consolidating our legacy servers
We have been able to do all this and main- Yapi Kredi onto new SPARC T5 servers, using virtual-
tain service levels with less staff. yapikredi.com.tr ization to bring 80 hosts down to 50 hosts
Location: Istanbul, Turkey
Such an array of benefits is common running on 10 machines, says zer. When
Industry: Financial services
among companies deploying SPARC T5 and Employees: 14,865 were finished, 65 percent of all our pro-
SPARC M6 servers, says Masood Heydari, Oracle products: SPARC T5-4, SPARC cessing will be done on SPARC servers.
senior vice president of SPARC systems for T4-4, SPARC T4-2, and SPARC T4-1 servers; These SPARC systems will be running
the systems group at Oracle. SPARC Enterprise M9000; Oracle Solaris 10; not just consumer credit card operations
Oracle Database 11g and Oracle Database 10g;
Organizations used to map one applica- but also retail banking, merchant card and
Oracle GoldenGate; Oracle Internet Directory
tion to one server, explains Heydari. SPARC banking, risk management, treasury, and

oracle magazine July/August 2014


Server consolidation onto SPARC servers has reduced the number of physical servers and virtual hosts at Yapi Kredi. Were consolidating our legacy servers
onto new SPARC T5 servers, using virtualization to bring 80 hosts down to 50 hosts running on 10 machines, says Sinan zer (left), executive vice president of
infrastructure operations and security at Yapi Kredi Bank.

other core banking services, zer notes. More to Come


Yapi Kredi chose SPARC systems because it has been committed Yapi Kredis IT overhaul isnt done yet; there are more SPARC
to the SPARC architecture and Oracle Solaris, the leading enterprise systems to come.
UNIX operating system, for some time. The bank has been using Later this year, we will be installing a SPARC M6-32 server that
Oracle Solaris for 15 years, says zer. Years ago, we moved many of will be used to move the rest of our core banking applications to
our core banking applications to Oracle Solaris. SPARC and Oracle Solaris, says zer. We are also rewriting those
When the current SPARC T5 server project is completed later applications on the Java platform. Once that is done, all of our core
this year, the bank expects significant savings. The new SPARC applications will be running on SPARC and Oracle Solaris.
systems offer one-third lower maintenance costs compared to the Besides the cost, reliability, and performance benefits, zer says
mainframes they are replacing, says zer. Electricity costs will Yapi Kredis use of open platforms, SPARC servers, and Oracle Solaris
decrease to less than a quarter of current costs, and so will our has an added advantage: It helps the bank attract top IT talent.
cooling costs. Because of this and other cost savings, we expect a Its getting very hard to find sufficient talent for mainframes,
payback period of less than two years. says zer. The younger generation only wants to work with the
latest technologythat means systems such as SPARC and
System-Engineered Oracle Solaris.

In April 2014, Oracle introduced data center or cloud environment.


Oracle Solaris 11.2, an enterprise Oracle Solaris Zones provide zero-
cloud platform that integrates a full overhead virtual environments,
OpenStack distribution, software- and kernel zones deliver OS inde- Philip J. Gill is a San Diego, Californiabased freelance writer and editor.
defined networking (SDN), cluster- pendence and isolation.
ing, and virtualization in a proven John Fowler, executive vice
enterprise-class operating system. president for systems at Oracle,
Next Steps
OpenStack functionality in notes, By engineering the OS, vir-
Oracle Solaris 11.2 environments tualization, SDN, and OpenStack LEARN more about
supports a standard self-service together, Oracle Solaris 11.2 SPARC servers
environment for sharing and provides a complete cloud plat- oracle.com/us/products/servers-storage/servers/sparc
managing compute, network, and form, for simple, efficient, secure,
Oracle Solaris
storage resources, and it enables compliant, and open enterprise
oracle.com/technetwork/server-storage/solaris11
Ali Kabas/Getty Images

the rapid deployment of virtual cloud deployments. Its designed


machines. Application-driven to help customers accelerate their Oracle Optimized Solutions
SDN, from application to storage, businesses and capitalize on the oracle.com/us/solutions/oos
ensures that service-level agree- potential of cloud computing OpenStack
ments are maintained within a while reducing cost. bit.ly/1hbVSsH

July/August 2014 Oracle.com/oraclemagazine


2.6x Better
Performance
IBMs Power7+ AIX Oracles SPARC T5

Performance: Performance:
10,902 27,843

Server Cost: Server Cost:


$805,000 $299,000

Industry Standard Java Middleware


SPECjEnterprise2010 Performance Benchmark

SPEC and the benchmark name SPECjEnterprise are registered trademarks of the Standard Performance Evaluation Corporation.
Virtualized results on spec.org as of 5/21/2013 for application and database on one 8-chip server. SPARC T5-8, 27,843.57 SPECjEnterprise2010 EjOPS, pricing on
oracle.com; IBM Power 780, 10,902.30 SPECjEnterprise2010 EjOPS, pricing on ibm.com. Server cost excludes storage and software. Details: oracle.com/sparc-t5.
Copyright 2013, Oracle and/or its affiliates. All rights reserved.
National Geographic Education supports the
mission of the National Geographic Society to
TOGETHER ORACLE AND inspire people to care about the planet by
NATIONAL GEOGRAPHIC EDUCATION ARE creating compelling educational materials for
young people and the adults who teach them.

Leading the Way NG Education provides unique learning


experiences to educators and advocates for
improved education in geography, the
in Ocean Education environmental sciences, and other disciplines
that are critical to understanding our world.
and Marine Research With support from Oracle, National Geographic
Education is engaged in a major project to
develop teacher leaders in marine ecology and
create materials about ocean science and
geography for students, families, the ocean
recreation community, and the general public.

Support our work today.


Visit nationalgeographic.org/education.

National Geographic is a 501(c)(3) organization. PHOTOGRAPH BY ENRIC SALA


Java Developer ORACLE ADF By Frank Nimphius 33

Oracle Application Development Framework, Oracle Jdeveloper

Region Extreme:
Multi-Task-Flow Binding
Render an unknown number of task flows in page or
dashboard regions.

O racle Application Development


Framework (Oracle ADF) regions
display the contents of bounded task flows
with a bounded task flow. The task flow
binding contains a static reference
to the bounded task flow to be exposed in
enabling the display at runtime of an
unknown-at-design-time number of task
flows in regions. The region binding is
in designated areas on a page. Each region the region. appropriate for uses such as dashboards
uses a special binding configurationthe Dynamic regions also use a dedicated that display varying numbers of bounded
task flow bindingin the Executables task flow binding, which uses a property task flows on a page.
section of the parent pages PageDef.xml reference to a managed bean in view scope
file to populate the region content with data to provide the task flow reference infor- Sample Application Overview
from the Oracle ADF binding layer. mation. The managed bean is accessible The sample application is a dynamic dash-
In use cases such as analytic dash- from Java code and through expression board that displays information for depart-
boards, the contents of an unknown language (EL). The task flow reference ments the user selects, as shown in Figure 1.
number of task flows must be displayed returned by the managed bean property Each department is exposed in a region with
as regions at runtime. However, Oracle can be changed at runtime for the region a read-only view shown first. An Edit button
ADF regions cannot be created at runtime. to display the contents of different task navigates the bounded task flow associated
Multi-task-flow binding in Oracle JDeveloper flows sequentially. with each region to an edit page so the user
11g Release 2 and Oracle JDeveloper 12c In multi-task-flow binding, the multi can change the department data.
addresses this limitation. Using a hands-on TaskFlow binding element provides the The user selects which departments
exercise, this article shows developers how region component model for multiple to display on the dashboard by using the
to use multi-task-flow binding in Oracle Oracle ADF region instances that are select-many checkboxes on the right-hand
ADF applications. Parts of the sample created at runtime with the af:forEach side and clicking the Update Dashboard
application have been prebuilt to give you loop tag of the Oracle ADF Faces feature button. The Reset Dashboard button sets
a head start. In addition to performing of Oracle ADF. Each region obtains its the dashboard to the none-selected state
the hands-on steps, you can learn more by bounded task flow configuration reference and shows a single panel with instructions
examining the source files. from a managed bean. As with dynamic for the user.
To begin, download the sample applica- regions, the content of the managed The application uses Oracle ADF adap-
tion at bit.ly/1lZ4nXw and unzip the o44adf- bean can be changed at runtime, thereby tive bindings to create multiple instances of
2197040.zip file to a local folder on your
computer. Do not use spaces in the folder
name. Ensure that youre using the studio
edition of Oracle JDeveloper 12c (12.1.2.0.0)
or later, available as a free download on
Oracle Technology Network.

Static, Dynamic, Multiple


The multi-task-flow binding feature is a
combination of the static and dynamic
task-flow-binding types used in Oracle
JDeveloper to associate region content with
the Oracle ADF binding layer and lifecycle.
A static region uses a dedicated task flow
binding added to the PageDef.xml file of the
parent page to associate the region content Figure 1: Sample application

oracle magazine July/august 2014


34 Oracle adf

a bounded task flow that share the Oracle


ADF data control with the parent view for Managed bean Holds configuration Bounded task flow
instances
best performance. With this technique, the
sample application can use a single task
flow definition to simulate an unknown Re
ad st
number of Oracle ADF regions to be dis- a sk
flo
played in an Oracle ADF view. wi
ns t
an c
es
Sample Application Architecture Home.jsf Oracle ADF binding (PageDef)
Figure 2 illustrates the architecture of af:forEach
Provides task flow Multi-task-flow binding
the sample application. A managed bean definitions
instance holds a list of bounded task flow af:region
configurations that specify the number of
region instances and the department infor-
Figure 2: Sample application architecture
mation to display. The bounded task flow
takes two input parameters and creates a
new view object instance on the server to -> Databases, and expand the task flow must be made configurable with
display the department data, identified by RegionExtreme node to display the con- the adaptive bindings technique:
department ID. tained hrconn node. 5. With the RegionExtreme workspace
The Home.jsf file contains a panel 4. Right-click hrconn, and select Properties open in Oracle JDeveloper, click the
dashboard component that shows a vari- from the menu. Edit the database con- Applications tab.
able list of Oracle ADF regions based nection information to work with your 6. Expand the ViewController -> Web
on the configuration in the managed bean. setup. Test the changes, and click OK Content -> WEB-INF -> btf node, and
The page accesses the task flow definition when the connection succeeds. double-click the departments-flow.xml
in the bean indirectly through the multi- Next, start the Oracle WebLogic Server file to open the task flow diagram.
task-flow binding added to the Oracle ADF instance thats integrated with Oracle 7. On the Applications tab, expand
pages binding file, the PageDef.xml file. JDeveloper, by selecting Run -> Start the Data Controls panel and its
An af:forEach iterator on the page refer- Server Instance. AppModuleDataControl node.
ences the task flow binding and creates If you are running the integrated Oracle 8. Drag the createNewDepartmentVO
an instance of af:region for each task WebLogic Server for the first time, a Create Instance() method entry onto the task
flow configuration. Default Domain dialog box will open. Create flow diagram editor.
a password for the default Oracle WebLogic 9. In the Edit Action Binding dialog box,
Getting Ready Server domain. To ensure that the inte- enter #{pageFlowScope.departments
The RegionExtreme workspace in the sample grated Oracle WebLogic Server listens for TaskFlowBean.departmentsId} as the
application download contains a completed the localhost and the IP address of your departmentId value and #{pageFlow
Oracle ADF Business Components model computer, do not select an address from Scope.departmentsTaskFlowBean
(Oracle ADF Business Components is a Listen Address. .voinstance} as the instanceName
feature of Oracle ADF) and a view-controller Click OK to save the changes and value. Click OK. A new method activity is
project with prebuilt artifacts such as to create and configure the default created for you.
managed beans, page fragments, and a domain for Oracle ADF. Oracle 10. Choose Window -> Components to open
bounded task flow. WebLogic Server creates a default the Components window.
To prepare this workspace for your envi- domain and then starts the server. 11. Drag the View activity from the
ronment, you must configure the database Wait for the IntegratedWebLogicServer Components section of the Components
connection that the workspace is dependent started. message on the Running: window onto the diagram editor. Change
on to access your HR database schema: IntegratedWebLogicServer panel before the name of the view activity from view1
1. In Oracle JDeveloper, select File -> Open, proceeding to the steps in the next section. to Browse.
and navigate to the directory containing 12. Repeat step 11, but this time name the
the unpacked zip file content. Creating the Bounded Task Flow view activity Edit.
2. Open the oramag070814/ The sample application uses a single param- 13. In sequence, click Control Flow Case in
RegionExtreme folder, and select the eterized bounded task flow to populate the Components window, the method
RegionExtrem.jws file. Click Open to load all region instances with different data call activity in the diagram, and the
the workspace. content. For this technique to work cor- Browse view activity in the diagram
3. Select Window -> Database rectly, the Oracle ADF bindings used in the to create a navigation case. Keep the

July/august 2014 Oracle.com/oraclemagazine


35

default name for the navigation case. 27. In the Properties inspector, change the attribute to Cancel, the Action attribute
14. Create a navigation case from the Browse value of the Binds property to ${page to return, and the Immediate attribute
view to the Edit view, and enter edit as FlowScope.departmentsTaskFlow to true.
the name of the navigation case. Bean.voinstance}. Do not be con- 40. Save your work.
15. Create a navigation case from the Edit cerned that a border now surrounds the 41. Select the Bindings tab at the bottom of
view activity to the Browse view activity, Binds field. the visual editor for the Edit page.
and name it return. 28. Save your work. 42. In the bindings editor, select
16. Save your work. What you just did: You created a read-only allDepartmentsIterator in the
What you just did: The method call activity view to display department data in the Executables section.
you created references a method in the regions. Because the sample application 43. In the Properties inspector, change the
Oracle ADF Business Components applica- uses a single bounded task flow definition value of the Binds property to ${page
tion module that creates new instances to display department information for mul- FlowScope.departmentsTaskFlow
of the DepartmentsView view object. The tiple regions, you used adaptive binding in Bean.voinstance}.
name of the new instance is saved in a pre- the allDepartmentsIterator to dynamically 44. Save your work, and close all open page
built managed bean property. At runtime, determine which ViewObject instance to tabs. The bounded task flow is complete.
the navigation cases you created are used to query data from. What you just did: You created an Oracle
navigate between the department read-only 29. Click the departments-flow.xml tab ADF bound input form in which users can
view and the editable form. to switch back to the task flow edit department information in a region at
17. In the task flow diagram editor, double- diagram editor. runtime. The DepartmentId field in the form
click the Browse view activity to open the 30. Double-click the Edit view activity, and is configured to be read-only, and the Submit
Create ADF Page Fragment dialog box. use the magnifying glass icon next to the button action property references a prebuilt
18. Click the magnifying glass icon next to Directory field to select the departments managed bean method to commit data
the Directory field. folder in public_html/btf. Click Select, changes before returning to the browse page.
19. In the Choose Directory dialog box, click and then click OK. The Cancel button uses immediate=true
the Create new subdirectory icon next 31. Drag the allDepartments collection from so the Oracle ADF model is not updated with
to the Location field and create a new the Applications tabs Data Controls any changed data when the button is clicked.
btf folder under the public_html folder. panel to the page, and drop it on the Edit Like the browse page, the edit page uses
Under the btf folder you just created, page as an ADF Form. adaptive binding to connect to the server-
create a departments folder. Click Select. 32. In the Create Form dialog box, click the side ViewObject instance.
20. Ensure that the Facelets and Create Blank ADF Input Text w/Label value next to
Page options are selected in the Create the DepartmentId value binding entry Creating the Multi-Task-Flow
ADF Page Fragment dialog box, and click and change it to ADF Output Text w/ Binding
OK to create the new page fragment. Label. Then click the Submit checkbox Now create and configure the multi-task-
21. With the Browse page open in the visual and OK. flow binding:
editor, expand the Data Controls panel 33. Click Submit in the visual editor 45. On the Applications tab, double-click
on the Applications tab and click the for the Edit page, and choose the Home.jsf file in the ViewController
allDepartments collection. Window -> Structure. -> Web Content -> utf node to open the
22. Drag the allDepartments collection to the 34. Right-click Submit in the Structure page in the visual editor.
page, and drop it as an Oracle ADF Form. window, and choose Surround With. 46. Click the Bindings tab at the bottom of
23. In the Create Form dialog box, click the 35. In the Surround With dialog box, select the visual editor.
Read-Only Form and Submit checkboxes Panel Group Layout and click OK. 47. In the binding editor, click the green plus
to create a read-only form and a button 36. In the Structure window, right-click (+) icon in the Executables header.
(which youll configure next) for navi- af:panelGroupLayout and select Insert 48. In the Insert Item dialog box, change the
gating to the editable page. Click OK. Inside Panel Group -> Spacer. selection from Generic Bindings to ADF
24. Click Submit in the visual editor, and 37. Repeat step 36, except select Button Task Flow Bindings.
choose Window -> Properties. instead of Spacer. 49. Select the multiTaskFlow item, and
25. In the Properties inspector, change the 38. In the visual editor, click the Submit click OK.
Text property value to Edit and select button and change its Action property 50. In the Insert multiTaskFlow dialog box,
edit as the value of the Action property. to #{backingBeanScope.edit add mtb1 as the value of the id attribute
26. Click the Bindings tab at the bottom of DepartmentBacking.onSubmit} in the and ${viewScope.multiTaskFlowList
the visual editor. In the bindings editor, Properties inspector. Bean.multiTaskFlowBindings} as the
select allDepartmentsIterator in the 39. Click the button 1 button. Using the value of the taskFlowList attribute. (You
Executables section. Properties inspector, change the Text must use these exact values for the con-

oracle magazine July/august 2014


36 Oracle adf

figuration to work with the prebuilt code <af:panelDashboard id="pd1" Conclusion


the workspace uses.) Click OK. rowHeight="150px" /> Dynamic regions are a frequent user
51. Save your work. to requirement. Oracle JDeveloper 11g
What you just did: You created and config- <af:panelDashboard id="pd1" Release 2 and Oracle JDeveloper 12c address
ured the multi-task-flow binding in the ADF rowHeight="150px"> this requirement with multi-task-flow
PageDef file of the Home.jsf page. The task </af:panelDashboard> binding. This article showed how to add
flow binding references the multiTaskFlow- dynamic bindings for a dynamic dashboard
Bindings property in the multiTaskFlowList 59. Click between the opening and closing that uses a single bounded task flow to
Bean managed bean to obtain the list of task tags of the af:panelDashboard compo- render an unlimited number of regions, with
flows to render in regions. nent, and paste (Ctrl+V) the code from each region sharing the Oracle ADF data
The managed bean reference is required the clipboard. control scope for best performance.
immediately when the page renders, which 60. Right-click in the source window, and Task flows in regions execute sequentially.
is why the EL expression used starts with a $ choose Reformat to improve the code When you use the multi-task-flow binding
character instead of the # deferral prefix. alignment. feature, minimize the number of flows added
The referenced managed bean is defined Note: The af:panelDashBoard component to a page. Each task flow comes with a per-
in the MultiTaskFlowListBean.java file, expects af:panelBox or af:region as its formance overhead determined by the data
located in the oramag.sample.seven.eight child components. Because af:forEach is query and the initialization tasks it performs.
.fourteen.view.utf.beans package hier- used to create the panelBox instances at Also note that when an application
archy in the ViewController -> Application runtime, you see that Oracle JDeveloper uses dynamic regions, users might switch
Sources folder. The managed bean class is flags the af:forEach tag as an error. between bounded task flows while task
documented with Java comments to help However, this is a false positive in the inte- flows have pending transactions. The risks
you understand how the multi-task-flow grated development environment (IDE). It associated with premature termination
binding implementation works and how is not considered an error at runtime, and of bounded task flows through dynamic
EL can be used in Java to provide individual you can ignore it. regions and how to handle such a case are
input parameters for each task flow. 61. Close all tabs, and save your work. documented in the Oracle ADF Task Flow
What you just did: You added a prebuilt Transaction Fundamentals white paper
Building the Region Dashboard code snippet to the panel dashboard com- (see Next Steps).
Next (with the help of prebuilt code seg- ponent on the Home.jsf page that reads
ments), add an af:forEach component that the number and definitions of task flows
adds the task flow binding instances defined to display in a region from the multi-task- Frank Nimphius is a senior principal product
in the multi-task-flow binding as regions to flow binding you configured earlier. In manager for Oracle JDeveloper and Oracle ADF.
the Home.jsf page: addition, the code you pasted contains He is a coauthor of Oracle Fusion Developer
52. On the Applications tab, double-click a panel box that is shown whenever no Guide: Building Rich Internet Applications with
the forEachCodeSnippet.txt file in department is selected for display as a Oracle ADF Business Components and Oracle
the ViewController -> Web Content -> region on the dashboard. ADF Faces (McGraw-Hill, 2010).
utf node.
53. Select all of the files contents (Ctrl+A), Running the Application Next Steps
and copy them to the clipboard (Ctrl+C). 62. On the Applications tab, navigate to
54. Switch back to the Home.jsf page, and ViewController -> Web Content -> DOWNLOAD
click the Source tab at the bottom of WEB-INF and double-click the adfc- Oracle JDeveloper 12c
bit.ly/KDqHjA
the editor window to show the page in config.xml file.
the sample application for this article
source view. 63. In the task flow diagram, right-click the bit.ly/1lZ4nXw
55. Select Window -> Structure to open the Home view activity and choose Run. (You READ more about Oracle ADF
structure panel if its not already open. must run the page from the adfc-config oracle.com/technetwork/developer-tools/adf
56. On the Structure panel, expand .xml filenot from the Applications Using Task Flows as Regions
the f:view -> af:document -> af:form -> tabso that the task flow context is set bit.ly/1onhggq
af:pageTemplate -> f:facet > when the page displays.) Towards Ultra-Reusability for ADF - Adaptive
Bindings
center node. 64. When the page displays in your browser, bit.ly/1mPPoBY
57. Select af:panelDashBoard. use the checkboxes on the right to Oracle ADF Task Flow Transaction
58. In the page source, change select the departments to display on the Fundamentals
(without using copy/paste) the dashboard. Click the Update Dashboard bit.ly/1jAmuCM
af:panelDashBoard component defini- button to update the dashboard view, A Template with Behavior
bit.ly/1lqjZST
tion (now highlighted) from and try out the other dashboard features.

July/august 2014 Oracle.com/oraclemagazine


DBA manageability By Arup Nanda 37

Oracle database 12c

Managing Expressly
Manage Oracle Database with Oracle Enterprise Manager
Database Express, a built-in browser-based graphical tool.

H ow do you administer Oracle Database?


Command-line tools such as SQL*Plus
may be all you need in many situations, but
built-in web server. To use the Oracle
XML DB web server for Oracle Enterprise
Manager Database Express, make sure
Replace <servername> with the name of
your database host. For example, if your
host is named prolin1.proligence.com,
you may also find a graphical tool useful in the DISPATCHERS parameter of the enter the URL as
some cases, such as for displaying perfor- database instance includes the entry for
mance statistics. the Oracle XML DB service: https://prolin1.proligence.com:5500/em
Oracle Database 12c includes a built-in
graphical management tool called Oracle SQL> show parameter dispatchers 7. If the port number is not defined or
Enterprise Manager Database Express. Its your organizational policies do not
a web-based tool you can launch from any NAME TYPE VALUE allow that specific port number, you
web browser, and no operating-system-level can use a different port number for the
installation is required. Oracle Enterprise Dispatchers string (PROTOCOL=TCP) listener for Oracle Enterprise Manager
Manager Database Express is extremely (SERVICE=ANN1XDB) Database Express. To use port number
lightweight and easily configurable, and in 5501, for example, set the new port
this article, you will learn how to configure 4. If the DISPATCHERS parameter is not set, number as follows:
and use it to perform your daily DBA chores. include the following line in the param-
eter file: begin
Setup dbms_xdb_config.sethttpsport(5501);
Oracle Enterprise Manager Database dispatchers="(PROTOCOL=TCP) end;
Express is installed and configured with the (SERVICE=<sid>XDB)"
database, but additional configuration may The Oracle XML DB listener for Oracle
be required if your database uses nondefault and restart the instance. Note that <SID> Enterprise Manager Database Express
values for parameters. Here are the manual is the ORACLE_SID. Replace <SID> with is now configured for port 5501. You
steps for configuring Oracle Enterprise the ORACLE_SID value for your instance. can launch Oracle Enterprise Manager
Manager Database Express. 5. To confirm that the Oracle XML DB con- Database Express from any web browser
1. To check the port number for the data- figuration is working, as well as to get by entering the URL as
base listener, enter lsnrctl status at the port number of the listener, execute
the command line and look for the string the following SQL: https://prolin1.proligence.com:5501/em
(PORT= in the output.
2. The default port for the database listener select dbms_xdb_config.gethttpsport() The first screen of Oracle Enterprise
is 1521. If the database listener listens on from dual; Manager Database Express asks you for
a different portsay, 1526you must authentication. Enter a database username
set the local_listener database param- DBMS_XDB_CONFIG.GETHTTPSPORT() and password. Remember, you need a
eter with the following SQL: database username. This is different from
5500 the standalone version of Oracle Enterprise
SQL> alter system set local_ Manager Cloud Control (formerly known as
listener='(ADDRESS = (PROTOCOL=TCP) 6. From the output, you know that the Oracle Enterprise Manager Grid Control),
(HOST=localhost)(PORT=1526))'; Oracle XML DB listener is listening on where you enter a username from the
port number 5500. In this case, you Oracle Enterprise Manager repositorynot
3. Oracle Enterprise Manager Database can launch Oracle Enterprise Manager Oracle Database.
Express is web-based, so it needs Database Express from any web browser Oracle Enterprise Manager Database
a web server. Oracle XML Database by typing the following URL: Express comes with two predefined roles
(Oracle XML DB) functionality in Oracle EM_EXPRESS_ALL and EM_EXPRESS_
Database 12c provides a lightweight https://<servername>:5500/em BASIC. The Oracle Database DBA role is

oracle magazine July/august 2014


38 manageability

already granted these two Oracle Enterprise control files for the database, the size and activities, such as managing users and roles.
Manager Database Express roles, so any number of records in different sections of It displays three submenus:
user with a DBA role will not need to be the control file, and more. Users. Click this item to see the list of users
granted these Oracle Enterprise Manager The next menu itemSecurityenables and details such as status (active, locked,
Database Express roles explicitly. you to perform database-security-related or password expired), default tablespace,

Database Home Page


Enter a valid database username and pass-
word to see the database home page, as
shown in Figure 1. The main menuright
below the Oracle Enterprise Manager
Database Express 12c bannerdisplays five
items. The first is the database name and the
version, which is ANN1 and 12.1.0.1.0 in this
case. From any other screen, click this item to
return to the database home page.
The next menu itemConfiguration
displays four submenus:
Initialization Parameters. Click this item to
display and edit initialization parameters Figure 1: Oracle Enterprise Manager Database Express home page
and their descriptions.
Memory. Click this item to see memory
allocations, including system global area
(SGA) and program global area (PGA).
Database Features Usage. Click this item
to see database features, their descrip-
tions, and when they were used. (High-
water-mark analysis is also available
through this item.)
Current Database Properties. Click this
item to see properties such as the character
set and the time zone of the database.
The next menu itemStoragedisplays
five submenus:
Tablespace. Click this item to see the list
of tablespaces, datafiles, their sizes, and
Figure 2: Performance Hub
the free space inside them. (You can also
create and alter existing tablespaces here.)
Undo Management. Click this item to
see how the undo mechanism is working
in your database. (Two of the very useful
graphically represented undo-related
metrics here are the rate of generation and
the space used.)
Redo Log Groups. Click this item to see
the online redo log files for the database.
(It also enables you to add, drop, and alter
redo log groups.)
Archive Logs. Click this item to see the list
of archived logs, when they were created,
the system change number (SCN) of the
changes contained in them, and more.
Control Files. Click this item to see the Figure 3: Activity, as shown in Performance Hub

July/august 2014 Oracle.com/oraclemagazine


39

when they were created, and expiration ties of the active sessions. These are all ID shows the breakdown of the wait classes
dates for passwords. (This item also enables active displaysthat is, if you move your for that activity. Place your cursor over the
you to alter users and create new ones.) cursor over a part of the diagram, you will colored bar, and a pop-up box will show the
Roles. Click this item to create, alter, and see the name and the value of the metric name and the value of the metric.
display database roles. it represents and the time it was collected. In the chart in Figure 4, you can clearly
Profiles. Click this item to create, alter, and You can go back as far into the past as data see that the first SQL ID4sjngb1tsayy9is
display database profiles. (Profiles enable is available in the Automatic Workload responsible for most of the activity in the
you to control how long the user session Repository feature of Oracle Database. database. Your next diagnostic step is to
is allowed to remain active, control how It is easier to see the power of these find out why that SQL statement is so active.
many invalid login attempts are permitted charts and graphs by examining them in the Click the 4sjngb1tsayy9 SQL ID to get the
before the account is locked, define the context of a real problem. Suppose you are details on that SQL statement. That brings
function to enforce the complexity of the investigating the cause of a database perfor- up the SQL Details screen shown in Figure 4.
password, and so on.) mance problem. From the time picker, you Click the Execution Statistics tab.
can see that there is a spike at 7:10:00 p.m., The SQL Details screen includes two
Performance as shown in Figure 3. From the main menu, types of output. At the top, in the Plans area,
The last menu item is Performance. (Note choose Performance and then from the tabs you can see the impact of the SQL state-
that you need to license the extra-cost below the time picker, click Activity, which ment represented through various metrics,
Oracle Diagnostics Pack to use this menu shows total activity and the associated including the database time, the number of
item.) I will devote more attention to it here, wait classes. The section at the bottom left I/O requests, the rows returned, the number
because this is an item you will likely spend shows the SQL statements with the highest of times the statement was parsed, and so
a lot of time on. activity. The colored bar next to each SQL on. If the SQL statement has had different
The Performance menu item includes
two submenus. Lets take the first one
Performance Hubwhich displays a screen
similar to the one shown in Figure 2. The
topmost graph, called the time picker, shows
the average active sessions across various
points in time.
You can drag the shadow box across the
graph to focus on the activities in a par-
ticular time period. The information below
the graph will change to reflect the activi-
ties in that period. The various color bands
represent different activitiesblue for user
I/O, green for CPU, and so on. Place your
cursor above a color band. A pop-up text
box displays the metric that this bar rep-
resents and its value. A camera icon on the
graph (at around 07:00 p.m. in Figure 2) Figure 4: SQL Details screen
indicates that an Automatic Database
Diagnostic Monitor task was run at that
time automatically (Automatic Database
Diagnostic Monitor is a feature of Oracle
Database). If you place your cursor above
that icon, you will see the task ID, which
enables you to check the details of that
Automatic Database Diagnostic Monitor
task later. You can check the details on that
task in the ADDM tab on the screen shown
in Figure 2.
The four boxes below the time picker are
self-explanatory: the load average of the
database host, memory, I/O, and the activi- Figure 5: SQL Tuning Advisor

oracle magazine July/august 2014


40 manageability

execution plans, Oracle Enterprise Manager


Database Express will grab the plans from
all the sourcesthe cursor cache, the
Automatic Workload Repository, and so on
and will display the statistics for all execu-
tion plans, one per line. The icon in the first
columnlabeled Sourceshows the source
of the information on the execution plan.
Displaying details on all plans is very useful if
you have seen different performance charac-
teristics for the same SQL statement.
A very important metricBuffer Figure 6: Specific details of the recommendations
Gets, which shows the number of buffers
fetchedis shown in the last column. This
number in my example is 16,808a signifi-
cantly large number, which probably explains
why this SQL statement had so much impact
on performance. To understand why this
SQL statement had so many buffer gets, Figure 7: Oracle RAC database home page
look at the bottom part of the screen, in
the Plan Details area, where the execution
plan of the SQL statement is shown. Each
step in the plan includes statistics such as
the estimated number of rows and bytes,
shown both as values and graphically. Note
the HASH JOIN stepthe Estimated Bytes
value shows 18,447 petabytes! This is just an
estimate; it may not be accurate, but it does Figure 8: Multitenant database home page
give you an idea of the amount of data this
SQL statement will fetch. Because the data is for tuning. The blue area in the vertical different after the SQL profile is applied,
stored in buffers, the SQL statement fetches bar shows the count of SQL statements click the value for that SQL statement in the
a large number of buffersexplaining the where SQL Tuning Advisor has no findings, bottom box, Top SQL Statements, in the Id
large buffer gets metric for this SQL. meaning that there are no tuning recom- column. The details of the plan changes will
mendations. If the green area in the vertical appear, as shown in Figure 6. The tabs show
SQL Tuning Advisor bar shows the count of SQL statements Original Plan for the SQL statement and
Do you want to see if this SQL can be tuned to where SQL Tuning Advisor reported findings, Plan Using SQL Profilethe modified plan.
improve its performance? Oracle Enterprise it means that there are tuning recommen- But the screen displays more than the modi-
Manager Database Express can help you do dations. Recommendations might include fied plan. It also showsgraphically and as
that. Click the Tune SQL button at the top implementing a SQL profile or restructuring valuesthe estimated operation cost and
of the SQL Details screen, just below the (rewriting) the SQL. The last box shows the the rows and bytes of data at each step of
menu bar, to bring up the SQL Tuning Advisor possible savings in database time if you the execution plan. The display helps you
feature of Oracle Database. (You can also implement the SQL profile suggested by SQL visualize the step with the biggest perfor-
invoke it from the main menu bar from the Tuning Advisor. The magnitude of the poten- mance impact and how that changes from
Performance tab by choosing the SQL Tuning tial savings will help you decide whether the the original to the modified plan.
Advisor submenu.) Clicking Tune SQL creates recommendations are worth exploring. Happy with the modified plan? Just click
a task that may take some time to complete. While you mull over the displayed poten- the Implement button at the top of the
When it completes, you will be presented tial savings resulting from implementation screen. It will implement the SQL profile for
with a screen that displays the results of the of the SQL profile suggested by SQL Tuning that SQL statement, and the modified plan
tuning effort, as shown in Figure 5. Advisor, you will naturally be curious to will be in effect. Dont like the plan? Well, no
The findings are shown in boxes toward learn how SQL Tuning Advisor computed the harm done. The SQL profile is only a sugges-
the right of the screen. The first box, SQL savings. The SQL profile does not change tion by SQL Tuning Advisor; its not imple-
Examined Count, shows a bar chart of the SQL; it changes only the execution plan. mentedunless you click Implementand
the number of SQL statements examined If you want to learn how the plan will be can be ignored. Repeat this SQL Tuning

July/august 2014 Oracle.com/oraclemagazine


41

Advisor review for all of your high-impact of the display can quickly reveal whether the mance issues and use SQL Tuning Advisor to
SQL statements. instances are equally loaded or skewed. improve database performance.
With Oracle Enterprise Manager Database Oracle Enterprise Manager Database
Express and SQL Tuning Advisor, you can Express also works on Oracle Multitenant
not only identify the high-impact SQL state- databases. The database home page shows Arup Nanda (arup@
ments; you can also get recommendations the details of the multitenant container proligence.com) has
on improving their performance quickly and database (CDB). However, the Performance been an Oracle DBA
compare the effectiveness of the suggestions panel at the right has a tab labeled PDBs since 1993, handling
with the originalall with just a few clicks. that shows the pluggable databases (PDBs) all aspects of database
running on the CDB, as shown in Figure 8. administration, from
Express Compatibility The Performance bar chart shows the divi- performance tuning to security and disaster
Oracle Enterprise Manager Database Express sion of various PDBs, differentiated by mul- recovery. He was Oracle Magazines DBA of the
also works with Oracle Real Application tiple colors. Year in 2003 and received an Oracle Excellence
Clusters (Oracle RAC) databases. The Award for Technologist of the Year in 2012.
Database home page, similar to the screen Conclusion
Next Steps
shown in Figure 7, shows all the database Oracle Enterprise Manager Database Express
instances and details of each, such as the provides Oracle Database 12c DBAs an out-of-
LEARN more about
host the instance runs on, how long the the-box graphical interface for common data- Oracle Enterprise Manager Database Express
instance has been up, and so on. A very base management tasks. This article explored Oracle Database 2 Day DBA 12c Release 1 (12.1)
bit.ly/1lBKmow
useful display is the graphical representation Oracle Enterprise Manager Database Express
of the CPU, memory, and active sessions on features, described basic tasks, and demon- DOWNLOAD Oracle Database 12c
bit.ly/1czAk2I
each of the instances. A visual examination strated how to troubleshoot common perfor-

Go where the conversation lives.


Connect with Oracle Magazine on your favorite social
channel and be a part of our growing community.

Join Us.

OracleMagazine Oracle Magazine @OracleMagazine

Print. Digital. Mobile.

Copyright 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be
trademarks of their respective owners.

oracle magazine July/august 2014


Database Application Developer PL/SQL By Steven Feuerstein 43

Oracle Database

The Joy of Low-Hanging Fruit


Are you using BULK COLLECT and FORALL for bulk
processing yet?

T he following is based on true events. The


names have been changed to protect
people and intellectual property.
value of the primary key to the next sequen-
tial value is an Oracle Database 12c feature;
in Oracle Database 11g Release 2 and earlier, meme_id
em_mentions_seq.NEXTVAL
PRIMARY KEY,
INTEGER
I recently spent a few days with a team you would use a trigger to achieve the same REFERENCES
of developers at extremememe.info, an up- result. The em_memes_setup.sql script em_memes (meme_id),
and-coming Web 3.0 paradigm-shifter that includes this code.) source_name VARCHAR2 (100),
analyzes internet memes, tracks them to source_details CLOB,
their source, andbest of allpredicts new CREATE TABLE em_memes occurred_on DATE
and future memes. ( )
The developers at extremememe.info are meme_id INTEGER /
very knowledgeable about Oracle Database DEFAULT
and PL/SQL, but as is the case with many em_memes_seq.NEXTVAL Meme mentions are loaded from many
other developers, they have little time to PRIMARY KEY, different sources, and extremememe.info
explore new technology features. They meme_name VARCHAR2 (1000) relies on a staging table to collect data from
struggle to keep up with the demands of UNIQUE, all sources:
their users, and even when they know about discovered_on DATE,
some great new feature, it can be a chal- meme_status VARCHAR2 (100) CREATE TABLE em_incoming
lenge to convince management to commit ) (
the resources to apply those features to / meme_name VARCHAR2 (1000),
stable production code. source_name VARCHAR2 (100),
We interspersed training on PL/SQL The meme_status value can be VIRAL, occurred_on DATE,
techniques with reviews of their code and, DORMANT, HOAX, and so on. mention_details CLOB
in the process, came across a program that extremememe.info has a table for all the )
runs in a daily batch process and updates mentions of, or references to, a meme: /
the status of all the memes. Unfortunately,
as extremememe.infos data volumes grew, CREATE SEQUENCE em_mentions_seq The developers at extremememe.info
the process was taking longer and longer, / also use the following em_memes_pkg
approaching 23 hours. Given how uncom- package to log errors and to perform some
fortably close that was to a full day, we CREATE TABLE em_mentions critical proprietary computations, based
decided to take a closer look. ( on the content of those tables:
mention_id INTEGER
On Closer Inspection DEFAULT CREATE OR REPLACE PACKAGE em_memes_pkg
The meme update process uses the fol-
lowing three tables: em_memes, em_ em_memes_pkg.incoming_t This is a nested table type that contains rows of data from the em_incoming table.

mentions, and em_incoming. (You can em_memes_pkg.mentions_t This is a nested table type that contains rows of data from the em_mentions table.
create these tables by using the emmemes_ em_memes_pkg.meme_ids_t This is a nested table type that contains primary keys from the em_memes table.
setup.sql script in the download for this em_memes_pkg.log_error This is a generic (and typical) error-logging mechanism. Defined as an autonomous
article, at bit.ly/QntyHo). Note that the transaction, it writes out the basic error information available from the DBMS_
UTILITY functions (and more) to a log table and then commits just that insert.
columns of these tables have been simpli-
em_memes_pkg.unpacked_incoming This is a function that converts a row of incoming data (whose mention details column
fied for the purposes of this article. is an XML document that holds the different formats of source information) into a
The developers at extremememe.info record that can be inserted into the em_mentions table.
use the em_memes table for all the memes em_memes_pkg.reset_meme_status The heart and soul of the extremememe.info proprietary process, this procedure
I-Hua Chen

of which they are aware and whose status analyzes the contents of the mentions table and ascertains the status of the meme.

they track. (Note that setting the default Table 1: em_memes_pkg elements and descriptions

oracle magazine July/august 2014


44 PL/SQL

IS (between SQL and PL/SQL) and consequently The presence of this antipattern was also
TYPE incoming_t IS TABLE OF greatly slows the performance of the code. a source of delight for me. The developers
em_incoming%ROWTYPE; Fortunately, this classic antipattern has a needed to improve the performance of the
classic, well-defined solution: use BULK procedure significantly. That would have
TYPE mentions_t IS TABLE OF COLLECT and FORALL to switch from row-by- been very hard to do if they had already
em_mentions%ROWTYPE; row processing to bulk processing. taken full advantage of SQL and PL/SQL

TYPE meme_ids_t IS TABLE OF Code Listing 1: Meme status updater, version 1


em_memes.meme_id%TYPE;

1 CREATE OR REPLACE PROCEDURE em_update_status


PROCEDURE log_error ( 2 IS
error_code_in 3 CURSOR incoming_cur
4 IS
IN INTEGER DEFAULT SQLCODE,
5 SELECT * FROM em_incoming;
error_msg_in 6
IN VARCHAR2 7 l_mention em_mentions%ROWTYPE;
8 l_status em_memes.meme_status%TYPE;
DEFAULT
9 BEGIN
DBMS_UTILITY.format_error_stack); 10 FOR incoming_r IN incoming_cur
11 LOOP
12 BEGIN
FUNCTION unpacked_incoming (
13 SAVEPOINT new_transaction;
incoming_in IN 14
em_incoming%ROWTYPE) 15 l_mention := em_memes_pkg.unpacked_incoming (incoming_r);
16
RETURN em_mentions%ROWTYPE;
17 INSERT INTO em_mentions (meme_id,
18 source_name,
PROCEDURE reset_meme_status ( 19 source_details,
20 occurred_on)
meme_id_in IN
21 VALUES (l_mention.meme_id,
em_memes.meme_id%TYPE, 22 l_mention.source_name,
new_status_out OUT 23 l_mention.source_details,
24 l_mention.occurred_on);
em_memes.meme_status%TYPE);
25
END; 26 em_memes_pkg.reset_meme_status (l_mention.meme_id,
/ 27 l_status);
28
29 IF l_status IS NOT NULL
For space reasons, I will not provide the 30 THEN
package body code for em_memes_pkg, but 31 UPDATE em_memes
32 SET meme_status = l_status
Table 1 lists what the elements in the speci- 33 WHERE meme_id = l_mention.meme_id;
fication provide. 34 END IF;
Listing 1 shows the code for the status 35 EXCEPTION
36 WHEN OTHERS
update process in the em_update_status 37 THEN
procedure. (Listing 1 is available as em_ 38 em_memes_pkg.log_error;
update_status_old.sql in the download for 39 ROLLBACK TO new_transaction;
40 END;
this article at bit.ly/QntyHo.) Descriptions 41 END LOOP;
of the key parts of the em_update _status 42 END;
package appear at the end of Listing 1.
Line(s) Description
I was dismayed when I saw extremememe
10 For each row in the staging table (em_incoming)
.infos implementation of em_memes_pkg
.reset_meme_status, because I found in that 12, 40 Put the entire body of the loop inside its own nested block so that any exception can be trapped and logged.

procedure a cursor FOR loop that contained 13 Set a savepoint for this new transaction.
two nonquery data manipulation language 15 Convert the incoming row to a record that can be inserted into the em_mentions table.
(DML) statements. That is a classic anti- 1724 Insert a single row into the em_mentions table.
pattern, a general pattern of coding that
2627 Compute the new status for the meme, based on the new mention.
should be avoided. It should be avoided
2934 If the status isnt NULL, update the em_memes table with that status.
because the inserts and updates are changing
the tables on a row-by-row basis, which 3539 If anything goes wrong, log the error and then erase the effects of the insert and/or the update by rolling back to
the savepoint.
maximizes the number of context switches

July/august 2014 Oracle.com/oraclemagazine


45

performance optimization features. Because power of your brain to hide the obvious from Take the Challenge
they had not done so, they were looking at a you. Once youve spent a lot of time writing
procedure full of low-hanging fruit. That is, or working with a program, you dont really Each PL/SQL article offers a quiz to test your
knowledge of the information provided in it.
they were looking at the possibility of solving see the code anymore. You see what you
The quiz appears below and also at PL/SQL
their problem with a relatively straight think the code should be. When someone Challenge (plsqlchallenge.com), a website that
forward change to their existing code. else looks at it, they come at it without any offers online quizzes on the PL/SQL language
as well as SQL, Oracle Application Express,
preconceived notions and perceive very dif-
database design, and deductive logic.
Code Review Identifies a Logic Flaw ferent aspects of the program. Here is your quiz for this article:
I shared my dismay and delight with the If youre the only one whos ever looked Which of the following statements about
BULK COLLECT and FORALL are correct?
extremememe.info developer team. They at your code, you can be certain it contains
a. System global area (SGA) is the only type
were excited about the potential improve- bugs and perhaps even substantial algo- of memory affected by a switch from row-by-
ments and were eager to get started. Then I rithm errors. row processing to bulk processing.
b. You can use BULK COLLECT only with non-
noticed something odd about the algorithm Members of the extremememe.info
dynamic queries.
theyd presented. A brief Q&A session soon developer team quickly agreed that the c. You can have only one nonquery DML state-
clarified matters: statuses of the memes should be updated ment inside a FORALL statement.
d. If you want to make sure the SQL engine at
Can the table of incoming data contain only after all mentions were inserted.
least attempts to execute every DML state-
more than one reference to the same meme? Furthermore, only those memes with new ment generated by FORALL, add the SAVE
Heads nodded vigorously. They told me mentions should be updated. EXCEPTIONS clause.
that the more viral the behavior of a meme, In the remainder of this article, I
the more mentions there would be. In the show you the end result of the rewrite of In the reset_meme_status procedure, the
case of some very popular memes, the daily extremememe.infos em_memes_pkg transaction consists of two DML processes:
incoming could contain millions of refer- .reset_meme_status procedure into a 1. Insert a row into the mentions table.
ences to the same meme. That led directly program that runs significantly faster and 2. Update the memes table.
to my second question: made it possible for data volumes to grow A quick glance at the original procedure
Then why are you updating the meme substantially while still allowing the batch code in Listing 1 shows that these two pro-
status after each insert of a mention? process to be finished in a single day. My cesses go together: if the insert fails, the
Now eyebrows shot up and heads were stevenfeuersteinonplsql.blogspot.com blog update wont execute. If the update fails,
turned. Wow, said one developer. Oh. My. expands on this article to take you through the insert will be rolled back. And in either
Gosh. said another. those changes in a step-by-step process. case, the error will be logged and pro-
The team lead turned to me. We never cessing will continue.
thought of that before. Weve been doing On Switching to Bulk Processing With the switch to bulk processing,
an enormous amount of unnecessary Although row-by-row processing can be the procedure moves from a row-by-
processing. Thats kind of embarrassing. unacceptably slow for large volumes of data, row approach to a phased approach. For
It sure helps to have a fresh pair of eyes it offers a significant advantage for execu- reset_meme_status, this means that the
looking at our code. tion of nonquery DML: it is easy to define procedure will perform all the inserts first
Yes, it does. Never underestimate the and manage a transaction. and then execute all the updates.
Generally, you can think of bulk pro-
cessing as having three distinct phases:
Phase 1: BULK COLLECT from table(s) to collection
Phase 1: Populate the collections that
Relational will drive the FORALL processing. This is
Table usually done with a BULK COLLECT query.
Phase 2: Modify the contents of the col-
lections as needed to prepare them for
Phase 3.
Phase 2: Modify contents of collection Phase 3: Execute the FORALL statement to
according to requirements
push the data into the table(s).
Figure 1 shows these three phases.
In the real world, life is complicated and
there are always exceptions. Sometimes
Relational you will not need Phase 1, because the col-
Table
lections are already filled and being passed
Phase 3: FORALL from collection to table(s)
to your program, and sometimes you can
Figure 1: Bulk processing phases skip Phase 2, because the collection is

oracle magazine July/august 2014


46 PL/SQL

ready to go, to be used immediately in the With all that in mind, lets now imple- IS
FORALL statement. ment the get_next_set_of_incoming BEGIN
procedure (called in the new em_update_ FETCH incoming_cur
The Bulk Processing Implementation status procedure). The get_next_set_ BULK COLLECT INTO incoming_out
The code in Listing 2 is the rewrite of the of_incoming procedure passes back a LIMIT bulk_collect_limit_in;
too slow em_update_status procedure. collection of incoming records; BULK END;
This new version takes advantage of nested COLLECT will improve the performance,
procedures (procedures declared within and the LIMIT parameter will help control First, note that I use the NOCOPY hint in
another procedure or function). The code PGA consumption: my parameter definition. By using NOCOPY,
for these nested proceduresget_next_ Im asking Oracle Database to not make a
set_of_incoming, unpack_and_record_ PROCEDURE get_next_set_of_incoming ( local copy of my collection inside the proce-
mentions, and reset_meme_statusesis incoming_out dure. The result will be lower PGA consump-
presented and analyzed later in this article. OUT NOCOPY em_memes_pkg.incoming_t) tion and improved performance.
Descriptions of the key parts of the revised
em_update _status package appear at the Code Listing 2: Meme status updater, version 2
end of Listing 2.
Now lets take a closer look at each of the
1 CREATE OR REPLACE PROCEDURE em_update_status (
nested procedures, correlating each of these 2 bulk_collect_limit_in IN PLS_INTEGER DEFAULT 100)
with the phases I described earlier. 3 IS
4 bulk_errors EXCEPTION;
Phase 1: Get incoming rows. When youre
5 PRAGMA EXCEPTION_INIT (bulk_errors, -24381);
switching to BULK COLLECT to fetch data, 6
there are a few key guidelines to keep in mind: 7 CURSOR incoming_cur
8 IS
You can use BULK COLLECT with static
9 SELECT * FROM em_incoming;
SELECT statements (SELECT BULK 10
COLLECT INTO and FETCH BULK COLLECT 11 l_incoming em_memes_pkg.incoming_t;
12
INTO) and dynamic queries (EXECUTE
13 l_affected_meme_ids em_memes_pkg.meme_ids_t;
IMMEDIATE BULK COLLECT INTO). 14 := em_memes_pkg.meme_ids_t ();
If your original code contains a cursor 15
16 PROCEDURE get_next_set_of_incoming ....
FOR loop that fetches many rows (thou-
17 PROCEDURE unpack_and_record_mentions ....
sands and higher) but the loop body does 18 PROCEDURE reset_meme_statuses ....
not have any nonquery DML (inserts, 19
20 BEGIN
updates, deletes), you probably do not
21 OPEN incoming_cur;
need to switch to BULK COLLECT. The 22
PL/SQL compiler automatically optimizes 23 LOOP
24 get_next_set_of_incoming (l_incoming);
cursor FOR loops to return 100 rows with
25 EXIT WHEN l_incoming.COUNT = 0;
each fetch. 26
BULK COLLECT and FORALL work with 27 unpack_and_record_mentions (l_incoming, l_affected_meme_ids);
28 END LOOP;
PL/SQL collectionsarraylike structures.
29
These collections consume process global 30 CLOSE incoming_cur;
area (PGA) memory, which is allocated 31
32 reset_meme_statuses (l_affected_meme_ids);
per session. It is possible for sessions to
33 END;
run out of memory and return the ORA-
04030: out of process memory error. Line(s) Description
The best way to manage memory in bulk 2 BULK COLLECT returns multiple rows with each fetch. This parameter controls the number of rows fetched.
processing is to use the LIMIT clause with 45 Because the original procedure traps exceptions, logs the errors, and continues processing, use SAVE
BULK COLLECT. EXCEPTIONS in the FORALL statements and include an exception handler for ORA-24381.

Any collections populated by BULK 1113 Declare nested tables based on the packaged types to be used by the nested procedures.

COLLECT are either empty or filled sequen- 1618 The nested procedures.
tially from index value 1. This means that 2132 The now small and very readable executable section. Heres the narrative version of the code:
every index value between that returned by Open the cursor that identifies all the incoming rows to be processed.
Get the next N rows of incoming data. Stop when the collection is empty.
the FIRST method (lowest defined index Unpack each incoming row, and insert it into the mentions table. Add all IDs of memes that were
value) and the LAST method (highest mentioned into the collection of affected memes.
After inserting all mentions, reset the statuses of only those memes that were affected.
defined index value) is defined.

July/august 2014 Oracle.com/oraclemagazine


47

Next, because I already opened the Code Listing 3: Unpack and record mentions
cursor on line 21 of the new em_update_
status procedure, all I need to do in this 1 PROCEDURE unpack_and_record_mentions (
get_next_set_of_incoming procedure is 2 incoming_in IN em_memes_pkg.incoming_t,
3 affected_meme_ids_out IN OUT em_memes_pkg.meme_ids_t)
fetch. And I want to retrieve multiple rows
4 IS
with each fetch, so I put the keywords BULK 5 l_affected_this_time em_memes_pkg.meme_ids_t;
COLLECT in front of INTO and then provide 6 l_mentions em_memes_pkg.mentions_t := em_memes_pkg.meme_ids_t();
a collection after INTO. 7 l_status em_memes.meme_status%TYPE;
8
I then add the LIMIT clause, which tells 9 PROCEDURE add_to_affected_memes
Oracle Database to retrieve up to that 10 IS
number of rows with each FETCH. I could 11 BEGIN
12 affected_meme_ids_out :=
have provided a literal instead of a param-
13 affected_meme_ids_out
eter, as in 14 MULTISET UNION DISTINCT l_affected_this_time;
15 END;
16
LIMIT 100;
17 PROCEDURE record_errors
18 IS
In fact, 100 is a good default value. You 19 l_bad_index PLS_INTEGER;
get a nice boost in performance, and you 20 BEGIN
21 FOR indx IN 1 .. SQL%BULK_EXCEPTIONS.COUNT
dont consume enormous amounts of PGA. 22 LOOP
Yet I hesitate to hard-code the value. 23 l_bad_index := SQL%BULK_EXCEPTIONS (indx).ERROR_INDEX;
If over time this procedure needs to work 24
25 em_memes_pkg.log_error (
with more and more data, I may want to
26 error_code_in => SQL%BULK_EXCEPTIONS (indx).ERROR_CODE,
experiment with different limit values 27 error_msg_in => 'Unable to insert mention for incoming mention '
to see if I can coax more performance 28 || incoming_in (l_bad_index).meme_name
29 || '-'
out of the process without breaking the
30 || incoming_in (l_bad_index).source_name
PGA bank. 31 || '-'
By passing the limit value as a parameter, 32 || TO_CHAR (
33 incoming_in (l_bad_index).occurred_on,
I can change the value whenever I want
34 'YYYY-MM-DD HH24:MI:SS'));
without having to recompile the code. 35 END LOOP;
OK, Ive got the next N rows of incoming 36 END;
data. Now its time to move them to the 37 BEGIN
38 l_mentions.EXTEND (incoming_in.COUNT);
em_mentions table. 39
Phases 2 and 3: Unpack and record 40 FOR indx IN 1 .. incoming_in.COUNT
mentions. With phased processing, you do 41 LOOP
42 l_mentions (indx) :=
not unpack a single row and then insert it
43 em_memes_pkg.unpacked_incoming (incoming_in (indx));
into a table. Instead, you unpack all the rows 44 END LOOP;
fetched and then push them all into a table 45
46 FORALL indx IN 1 .. l_mentions.COUNT SAVE EXCEPTIONS
by using FORALL. In this case, all the rows
47 INSERT INTO em_mentions (meme_id,
fetched by get_next_set_of_incoming will 48 source_name,
be unpacked and pushed into the em_ 49 source_details,
mentions table with FORALL. 50 occurred_on)
51 VALUES (l_mentions (indx).meme_id,
52 l_mentions (indx).source_name,
Answer to Last Issues Challenge 53 l_mentions (indx).source_details,
54 SYSDATE)
55 RETURNING meme_id
The PL/SQL Challenge quiz in last issues
56 BULK COLLECT INTO l_affected_this_time;
Writing SQL in Oracle Application Express
57
article offered different ways to implement
58 add_to_affected_memes;
thequery for an Oracle Application Express
59 EXCEPTION
interactive report so that it could return data
60 WHEN bulk_errors
from two different queries. Choices (b) and
61 THEN
(c) are correct: you can use a table function
62 add_to_affected_memes;
or, for simpler scenarios, a union of queries
63
that aremutually exclusive. You cannot,
64 record_errors;
however, use a dynamic query with an inter-
65 END;
active report, so choice (a) is incorrect.

oracle magazine July/august 2014


48 PL/SQL

also available in the Oracle-hosted online


Line(s) Description
article, presents descriptions of the signifi-
2 and 3 The next set of incoming rows is passed to the procedure, which passes back an updated list of all those
meme IDs that have received at least one mention. This collection will drive the final reset meme status step.
cant lines of code in Listing 4.

38 Start of the executable section: make room in the local nested table of mentions to hold all the
incoming data. So, Is It Faster?
It might be lots of fun to completely reorga-
4044 A classic Phase 2: for each of the incoming rows, convert it to the mentions format and load it into the
array. Notice the use of the same index value for the l_mentions collection as in the incoming_in collection. nize ones program in hopes of improving
Because incoming_in was populated with BULK COLLECT, it is either empty or filled sequentially from 1. performance, but we cant just assume that
4656 Time to push all that nicely prepared data into the em_mentions table with FORALL. Because the collection the resulting code actually does run quickly.
is sequentially filled from 1, use the simplest form for the FORALL header: The results the extremememe.info team
FORALL indx IN 1 .. l_mentions.COUNT and I found when we put together and ran a
test script (em_test.sql in the download for
If I used this form (very similar to a numeric FOR loop) and the collection had gaps (index values between
FIRST and LAST that are not defined), the procedure would fail with the ORA-22160: element at index [N] this article at bit.ly/QntyHo) were unam-
does not exist error. To avoid this problem, you can use INDICES OF or VALUES OF; the former is discussed biguous: the new em_update_status runs
in the Phases 2 and 3: Reset meme statuses section.
Next I use the RETURNING clause to capture the IDs of all mentioned memes. I need to use BULK between two and three times as fast as the
COLLECT for my RETURNING clause, because I am likely to insert more than one row and therefore will original procedure.
return more than one ID.
Not too shabby.
58 Call the add_to_affected_memes procedure. This is a procedure declared within the parent procedure. Its The Oracle-hosted online article concludes
implementation is very simple:
with an extremememe.info developer debrief.
9 PROCEDURE add_to_affected_memes A stevenfeuersteinonplsql.blogspot.com
10 IS
11 BEGIN blog post expands on this article to take you
12 affected_meme_ids_out := through the extremememe.info code changes
13 affected_meme_ids_out
14 MULTISET UNION DISTINCT l_affected_this_time; in a step-by-step process.
15 END;

It uses the MULTISET UNION operation to add the ID of the newly affected meme to the existing list of Steven Feuerstein
previously affected memes. By adding the DISTINCT keyword, I ensure that there will not be duplicates in the
resulting nested table. (steven.feuerstein@
oracle.com) is an
5964 Time to handle any errors during insertion into the em_mentions table. The WHEN clause references the
bulk_errors exception, which is declared at the top of the procedure. Within the handler, I call the add_to_ architect for Oracle,
affected_memes procedure. specializing in PL/SQL.
1736 The record_errors procedure iterates through the contents of SQL%BULK_EXCEPTIONS, a pseudocollection His books, including
of records that contains the index in the collection for which an error was returned by the SQL engine and the
error code. It is called a pseudocollection because it is only a partial implementation of an associative array;
Oracle PL/SQL Programming, and more
specifically, only the COUNT method is defined for this collection. than a thousand PL/SQL quizzes at PL/SQL
Table 2: unpack_and_record_mentions procedure line descriptions
Challenge (plsqlchallenge.com) provide in-depth
resources for PL/SQL developers.

Listing 3 shows the implementation of inserted that can be inserted. In the process,
Next Steps
the unpack_and_record_mentions pro- the unpack_and_record_mentions pro-
cedure. As you can see, it is much more cedure filled up the l_affected_meme_ids READ Oracle-hosted online article content
involved than the code required to fetch collection, so now its time to use that col- bit.ly/RryVWE
data. Thats because it contains an INSERT, lection to drive the second FORALL state- DOWNLOAD
which means that you have to pay a lot of ment, performing the updates against the Oracle Database 12c
bit.ly/fherki
attention to error processing. em_memes table.
scripts for this article
Table 2 includes descriptions of the In the original program, for each bit.ly/QntyHo
significant lines of code in Listing 3. These mention, the new meme status was TEST your PL/SQL knowledge
descriptions are out of order (not simply computed. If it was NULL, no update was plsqlchallenge.com
listed from the first to last lines), because performed. The new program will need READ more Feuerstein
I am again using nested subprograms to to incorporate these steps. The code for stevenfeuersteinonplsql.blogspot.com
bit.ly/omagplsql
improve readability. And that usually means reset_meme_statuses is shown in
READ more about
that you read from the bottom up: start with Listing 4, available in the Oracle-hosted Oracle Database 12c
the main executable section and then jump online article at bit.ly/RryVWE. oracle.com/database
to subprograms as needed. (The code in Listing 4 is also in the em_ BULK COLLECT and FORALL
Phases 2 and 3: Reset meme statuses. At update_status_new.sql file in the download bit.ly/12k0n8H
bit.ly/1onU8vi
this point, all meme mentions have been for this article at bit.ly/QntyHo). Table 3,

July/august 2014 Oracle.com/oraclemagazine


Database Application Developer and DBA Ask Tom by Tom Kyte 49

Oracle Database

On Table Updates and


SQL Plan Baselines
Our technologist updates tables quickly via CTAS
and optimizes queries for evolution.

D ue to an application upgrade, we have


to change all the records in one of our
tables, based on new data supplied in a tem-
the existing table.)
2. DROP TABLE OLD_TABLE. Get rid of the
existing table with the old data.
I think I narrowed the problem down to a
simple case where the optimizer is wildly off
in cardinality estimates. The statistics are up
porary table. (That table exists just for the 3. ALTER TABLE NEW_TABLE RENAME TO to date and represent the actual data.
upgrade; it is not a global temporary table.) OLD_TABLE. When I run the query with a subquery
What is the best approach for accomplishing 4. CREATE INDEX. Re-create the indexes. (returning a single constant value) in the
this? The table has millions of records, and 5. GRANT the appropriate privileges on WHERE clause, the query is excruciatingly
we need to complete the upgrade as quickly the table. slowabout 350 seconds. If I evaluate
as possible. If you are in archivelog mode during the subquery by hand (which takes some
This is a frequently asked question with the application upgrade, consider using milliseconds) and pass the return value as a
an answer that might surprise you. The best the NOLOGGING clause to prevent REDO constant to the query, the query will run in
way to update this table is not to update from being generated. (But make sure some millisecondswith a completely dif-
it but, rather, to re-create it! Because this to disable NOLOGGING and back up the ferent plan.
is part of an application upgrade and the database after the upgrade.) If you are in The subquery is a simple MAX(...) query,
application is scheduled to be offline during noarchivelog mode, the CREATE TABLE so why cant the optimizer use the same plan
the upgrade, re-creating the table will NEW_TABLE AS SELECT and CREATE INDEX or predict that a single value will be returned
almost certainly be the most efficient way commands will not generate any REDO. and optimize the query?
to accomplish this. (And remember, they never create UNDO [Editor's note: Listing 1 shows the example
Rather than updating every row, which for the CREATE TABLE or CREATE INDEX table, a slow query and plan, and a faster
would necessarily generate UNDO for every commands.) Youll not only find this query and plan.]
modification and generate REDO for the CREATE TABLE AS SELECT approachusing What is the best way to achieve this faster
table modification as well as more UNDO, data definition language (DDL) instead of query plan without having to rewrite the
simply use CREATE TABLE NEW_TABLE AS data manipulation language (DML)to be original query?
SELECT (CTAS). Using this approach, you can faster for large objects but, in addition, the Although these two queries are semanti-
definitely skip all generated UNDO, and if resulting segments will not be in need of a cally equivalent, they present very different
you choose, all REDO as well. Additionally, reorganization, as they probably would be challenges to the optimizer. In the first
instead of trying to maintain any and all after a MERGE/UPDATE operation. case, the optimizer will have to guess
indexes on these modified columns during To see this in action against a large at the value returned by the subquery,
the application update, simply create fresh data set, I recommend that you look at the because it has not yet executed the sub-
indexes after the CREATE TABLE process is four-part video series at bit.ly/1fXdD8L, query. That is, the query
complete. If you were to update every row, bit.ly/1idIpdK, bit.ly/1mO3dwL, and
the index on these modified columns would bit.ly/1lIg7yO. These videos show the SQL> SELECT *
likely be at least twice as large as it needs to loading, validating, and transforming (you 2 FROM t t1
be, so you would almost certainly want to are interested in the transforming portion 3 WHERE t1.object_type = 'TABLE'
rebuild these indexes anyway. most of all) of a large set of data with DDL 4 AND t1.object_id > (SELECT
So, your update steps are as follows: and compare that approach with trying to 5 MAX(t2.object_id) - 500000
1. CREATE TABLE NEW_TABLE AS SELECT use DML to do the same. 6 FROM t t2);
<join of old_table with the data to be
updated>. This may involve an outer IF YOU CAN HINT IT, YOU CAN BASELINE IT is very much like
join if most, but not all, of the rows are I recently had a problem with two SQL state-
to be updated. (There might not be a ments performing semantically equivalent SQL> SELECT *
row in the stage table for every row in queries but with very different runtimes. 2 FROM t t1

oracle magazine July/august 2014


50 Ask Tom

3 WHERE t1.object_type = 'TABLE' Code Listing 1: Example table, slow query and plan, and faster query and plan
4 AND t1.object_id > ???;

Here is the setup for the example table:


The optimizer cannot see what the CREATE TABLE t AS SELECT * FROM all_objects;
constraint against OBJECT_ID will be, and ALTER TABLE t ADD CONSTRAINT t_id_pk PRIMARY KEY (object_id);
CREATE INDEX t_idx_id ON t(object_id);
it cannot see what value will ultimately be CREATE INDEX t_idx_type ON t(object_type);
plugged in there when the query executes. exec DBMS_STATS.GATHER_TABLE_STATS(user, 'T' );
Therefore, the optimizer will guess at the
Here is the slow query I would like to tune, along with its plan:
estimated cardinality. SQL> SELECT *
However, when you query with the 2 FROM t t1
construct 3 WHERE t1.object_type = 'TABLE'
4 AND t1.object_id > (SELECT MAX(t2.object_id) - 500000 FROM t t2);
6115 rows selected.
SQL> SELECT *
2 FROM t t1 Execution Plan

3 WHERE t1.object_type = 'TABLE'
| Id | Operation | Name | Rows | Bytes |
4 AND t1.object_id > 19975;
| 0 | SELECT STATEMENT | | 413 | 39235 |
| 1 | TABLE ACCESS BY INDEX ROWID | T | 413 | 39235 |
the optimizer has a lot more information
| 2 | BITMAP CONVERSION TO ROWIDS | | | |
to work with. It knows approximately how | 3 | BITMAP AND | | | |
many rows will come back, due to the | 4 | BITMAP CONVERSION FROM ROWIDS| | | |
| 5 | SORT ORDER BY | | | |
predicate with constant values. So what
|* 6 | INDEX RANGE SCAN | T_IDX_ID | 8252 | |
you are dealing with is a query in which | 7 | SORT AGGREGATE | | 1 | 5 |
the optimizer will have a really hard time | 8 | INDEX FULL SCAN (MIN/MAX)| T_IDX_ID | 1 | 5 |
| 9 | BITMAP CONVERSION FROM ROWIDS| | | |
obtaining correct cardinality estimates
|* 10 | INDEX RANGE SCAN | T_IDX_TYPE | 8252 | |
at hard parse time and therefore stands a
good chance of not selecting the optimal
Predicate Information (identified by operation id):
planat least for the first execution. The

question is, How can you fix this without
rewriting the code to use two queries and, 6 - access("T1"."OBJECT_ID"> (SELECT MAX("T2"."OBJECT_ID")-500000 FROM
"T" "T2"))
optimally, without using any hints in the
filter("T1"."OBJECT_ID"> (SELECT MAX("T2"."OBJECT_ID")-500000 FROM
production code? The answer is to tempo- "T" "T2"))
rarily use hints to get the plan you desire 10 - access("T1"."OBJECT_TYPE"='TABLE')

but then use the SQL Plan Management


Here is the query and the faster plan I would like it to use:
feature of Oracle Database and query plan SQL> SELECT MAX(t2.object_id) - 500000 FROM t t2;
baselines to implement the fix, removing
MAX(T2.OBJECT_ID)-500000
the need for hints in the production envi-

ronment and ensuring that you get the 19975
plan you want, unless and until the opti-
SQL> SELECT *
mizer discovers a better plan.
2 FROM t t1
The reason you do not want hints in your 3 WHERE t1.object_type = 'TABLE' AND t1.object_id > 19975;
production code is that it is very difficult 6115 rows selected.

to correctly hint a query. To properly hint a


Execution Plan
query, you must fully, verbosely hint it. You
might discover in your testing environment | Id | Operation | Name | Rows | Bytes | Cost (%CPU)|

that using hints A, B, and C achieves the
| 0 | SELECT STATEMENT | | 7198 | 667K| 102 (2)|
plan you want but that in production, after |* 1 | TABLE ACCESS BY INDEX ROWID| T | 7198 | 667K| 102 (2)|
statistics are gathered and the data has |* 2 | INDEX RANGE SCAN | T_IDX_TYPE | 8553 | | 6 (0)|

changed, or after a database upgrade, hints
A, B, and C may no longer do the job. Maybe Predicate Information (identified by operation id):
you didnt know you also needed hint D to

ensure that the optimizer would choose the


1 - filter("T1"."OBJECT_ID">19975)
plan you wanted, even though the query 2 - access("T1"."OBJECT_TYPE"='TABLE')
was working well by accident before. Or,

July/august 2014 Oracle.com/oraclemagazine


51

maybe after a database upgrade, the opti- Code Listing 2: Getting a plan by using hints
mizer introduces a new query transforma-
tion/rewrite that invalidates your hint. SQL> SELECT /*+ first_rows(1) */ *
Ill demonstrate the shortest list of hints 2 FROM t t1
3 WHERE t1.object_type = 'TABLE'
you would need to ensure that the above
4 AND t1.object_id > (SELECT MAX(t2.object_id) - 500000 FROM t t2);
query uses the plan you want, and youll see
that this list of hints is much longer than any Execution Plan

list of hints you would have coded yourself.
Plan hash value: 1289158178
Another reason to avoid putting
hints into the query and to use SQL Plan
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)
Management is that you enable the opti-

mizer to evolve your query plan over time. | 0 | SELECT STATEMENT | | 1 | 97 | 4 (0)
That is, you wont freeze your query plan, |* 1 | TABLE ACCESS BY INDEX ROWID| T | 1 | 97 | 2 (0)
|* 2 | INDEX RANGE SCAN | T_IDX_TYPE | 1871 | | 1 (0)
and youll have the opportunity to use a
| 3 | SORT AGGREGATE | | 1 | 5 |
better plan in the future. If you fully hinted | 4 | INDEX FULL SCAN (MIN/MAX)| T_ID_PK | 1 | 5 | 2 (0)
the query, youd be stuck with whatever plan
you had today. See Baselines and Better
SQL> select /*+ opt_param( '_b_tree_bitmap_plans', 'FALSE' ) */ *
Plans at bit.ly/PWcxDU for a discussion of 2 FROM t t1
this query plan evolution. 3 WHERE t1.object_type = 'TABLE'
4 AND t1.object_id > (SELECT MAX(t2.object_id) - 500000 FROM t t2);
Now lets see how to get the plan
you want and then how to use SQL Plan Execution Plan
Management to put that plan in place and
Plan hash value: 1289158178
have it be used transparently by your query.
In a testing environment, I discovered that
by using either the FIRST_ROWS(1) or the | Id | Operation | Name | Rows | Bytes | Cost (%CPU)

OPT_PARAM( _b_tree_bitmap_plans,
| 0 | SELECT STATEMENT | | 94 | 9118 | 85 (0)
FALSE ) hint to disable the use of B-tree |* 1 | TABLE ACCESS BY INDEX ROWID| T | 94 | 9118 | 83 (0)
bitmap plans for this SQL statement, I get |* 2 | INDEX RANGE SCAN | T_IDX_TYPE | 1871 | | 6 (0)
| 3 | SORT AGGREGATE | | 1 | 5 |
the plan I want, as shown in Listing 2.
| 4 | INDEX FULL SCAN (MIN/MAX)| T_ID_PK | 1 | 5 | 2 (0)
Now, if I wanted to ensure that the
plan in Listing 2 is, in fact, the plan used
by default, I would need more than just a
FIRST_ROWS(1) or OPT_PARAM hint. In fact, provably better plan comes along? 8 end;
when I use DBMS_XPLAN to display not only First, I would capture a SQL plan baseline 9 /
the plans but also the full set of hints neces- for the existing querythe query with the 1
sary to reproduce this plan reliably, I see the bad plan. Why would I want to capture the
plan and the outline data in Listing 3. bad plan? To establish a SQL plan baseline for The database will still use that plan, but
As you can see in Listing 3, the full list this query (into which I will load the desired only because it is the only game in town
of hints in the outline data that you need plan), I need the plan baseline to exist before right now. So lets create something better:
is quite extensivefar beyond just the I can load the plan into it. I execute the code the first query plan in Listing 2the plan for
OPT_PARAM hint. I can assure you that in Listing 4 to create the baseline. the SELECT /*+ first_rows(1) */ * query.
properly hinting a query to repeatedly get That is my baseline, and that plan will be That is the plan I want. All I need to do
the same plan is much harder than it looks. used. But it isnt what I want. The next step is load that plan in place of the bad one, as
Also, I dont really want to freeze the plan is to disable that plan: shown in Listing 5, available in the Oracle-
forever, because future releases of Oracle hosted article at bit.ly/1hYmIyb.
Database will likely be able to rewrite the SQL> begin There are now two plans loaded for that
query or perform some optimization that 2 dbms_output.put_line( SQL statement: onethe bad planis
just doesnt exist yet, resulting in an even 3 dbms_spm.alter_sql_plan_baseline disabled; the otherthe good plan (even
better plan. Id like to be able to take advan- 4 ( sql_handle => though it is for a different query, it can
tage of future features, but if Ive hinted the 'SQL_e738c19a5191e8fd', work with this query)is enabled.
query, I wont be able to. 5 attribute_name => 'enabled', When I run the query again, as shown
So, what would the steps be to get the 6 attribute_value => 'NO' ) in Listing 6 (available in the Oracle-hosted
optimizer to choose the desired plan until a 7 ); article at bit.ly/1hYmIyb), I see that it used

oracle magazine July/august 2014


52 Ask Tom

Code Listing 3: Determining plan and outline info needed to make a better hinted plan the query plan baseline for my good plan.
With this baseline solution, there is
SQL> select * no permanent hintingand permanent
2 from table(dbms_xplan.display_cursor (sql_id=>'4rg4kcxr83kup', hinting is much harder to set up and use
3 cursor_child_no => 0, format=>'+outline'));
than you think it is! Many hinted queries
PLAN_TABLE_OUTPUT out there in production today may be
ticking time bombs.
SQL_ID 4rg4kcxr83kup, child number 0
And there are no upgrade issues with this

select /*+ opt_param( '_b_tree_bitmap_plans', 'FALSE' ) baseline solution. (You may have to com-
gather_plan_statistics */ * FROM t t1 WHERE t1.object_type = 'TABLE' pletely change all your hints after a database
AND t1.object_id > (SELECT MAX(t2.object_id) - 500000 FROM t t2)
upgrade as you add new query rewrites,
Plan hash value: 1289158178 access paths, and so on. With this baseline
solution, you wont.)

And, finally, if a better plan comes along,
| Id | Operation | Name | Rows | Bytes| Cost (%CPU)| Time |
youll be able to use it if you are using query
| 0 | SELECT STATEMENT | | | | 83 (100)| | plan evolution.
|* 1 | TABLE ACCESS BY INDEX ROWID| T | 91| 8827| 81 (0)| 00:00:01|
|* 2 | INDEX RANGE SCAN | T_IDX_TYPE| 1823| | 6 (0)| 00:00:01|
| 3 | SORT AGGREGATE | | 1| 5| | |
| 4 | INDEX FULL SCAN (MIN/MAX)| T_ID_PK | 1| 5| 2 (0)| 00:00:01|
Tom Kyte is a database
evangelist in Oracles
Outline Data Server Technologies

division and has worked
/*+ for Oracle since 1993. He
BEGIN_OUTLINE_DATA is the author of Expert
IGNORE_OPTIM_EMBEDDED_HINTS
OPTIMIZER_FEATURES_ENABLE('11.2.0.2') Oracle Database Architecture (Apress, 2005,
DB_VERSION('11.2.0.3') 2010) and Effective Oracle by Design (Oracle
OPT_PARAM('_b_tree_bitmap_plans' 'false') Press, 2003), among other books.
ALL_ROWS
OUTLINE_LEAF(@"SEL$2")
OUTLINE_LEAF(@"SEL$1") Next Steps
INDEX_RS_ASC(@"SEL$1" "T1"@"SEL$1" ("T"."OBJECT_TYPE"))
PUSH_SUBQ(@"SEL$2")
INDEX(@"SEL$2" "T2"@"SEL$2" ("T"."OBJECT_ID")) ASK Tom
END_OUTLINE_DATA Tom Kyte answers your most difficult technology
*/ questions. Highlights from that forum appear in
this column.
asktom.oracle.com
Code Listing 4: Creating the baseline READ Oracle-hosted online article content
bit.ly/1hYmIyb
READ more Tom
SQL> begin
bit.ly/omagasktom
2 dbms_output.put_line(
3 dbms_spm.load_plans_from_cursor_cache Expert Oracle Database Architecture
4 ( sql_id => 'crvk9z6mx9n4d' ) amzn.to/ckGXaR
5 ); DOWNLOAD Oracle Database 12c
6 end; bit.ly/epBiUG
7 /
1 LEARN more about
Oracle Database 12c
SQL> select sql_handle, oracle.com/database
2 substr(sql_text,1,10)||'...'|| baselines
3 substr(sql_text,length(sql_text)-10) stext, Baselines and Better Plans
4 plan_name, enabled bit.ly/PWcxDU
5 from dba_sql_plan_baselines FOLLOW Tom on Twitter
6 where sql_text like @OracleAskTom
7 'SELECT%FROM t t1%(SELECT MAX(t2.object_id) - 500000 FROM t t2)';
FOLLOW Oracle Database
SQL_HANDLE STEXT PLAN_NAME ENA on Twitter
@oracledatabase
SQL_e738c19a5191e8fd SELECT * SQL_PLAN_fff61m98t3u7xda64b1bb YES on Facebook
... FROM t t2) facebook.com/oracledatabase

July/august 2014 Oracle.com/oraclemagazine


Find the Most Qualifed
Oracle Professional for
your Companys Future
Introducing the Oracle Magazine
Career Opportunities section -
the ultimate technology recruitment resource.

Oracle Magazine is the largest IT publication in the


world with a total circulation of more than 500,000.
Place your advertisement and gain exclusive and
immediate access to top talent including:
IT Managers, DBAs, Programmers and Developers.

For more information or to place your recruitment


ad or listing contact: tom.cometa@oracle.com

Copyright 2014, Oracle and/or its affliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affliates. Other names may be trademarks of their respective owners.
54 In the Field by carol hildebrand

Learning Circle, Part 1


President Alyssa Johnson talks about OAUGs evolving
mission and commitment to innovation through community.

A s Alyssa Johnson takes over the reins


at Oracle Applications Users Group
(OAUG), she draws on more than 10 years of
you learn. If you didnt participate in any of
our OAUG eLearning events last year, join
us this year. Or read an article in our OAUG
user group participation to refine the com- Insight magazine. Or maybe youd like to
munitys mission of connection, education, come to COLLABORATE. We want to better
and innovation. Oracle Magazine recently sat communicate to our membership about
down with Johnson to talk about her history opportunities and encourage them to be
with Oracle technology, the mission of OAUG, more involved.
and collaboration. Oracle Magazine: Speaking of
Oracle Magazine: How did you get started COLLABORATE, tell us about that event.
with Oracle technology? Johnson: COLLABORATE is interesting,
Johnson: I got started in technology almost because the different user groups [OAUG;
30 years ago in software development in Independent Oracle Users Group, or IOUG;
the scientific field. I took a break from that and Quest] have different needs. But at the
part of my life to concentrate on family, core, all the groups are still about member
and when the time was right, I was very education, facilitating networking, and
fortunate to have the opportunity to go communicating with Oracle. I think there
back into technology. It was then that I first Alyssa Johnson, president of OAUG, talks about were 1,900 COLLABORATE 2014 paper sub-
enterprise technology, user groups, communication,
focused on Oracle and on the functional collaboration, and more. missions just for OAUG. After completing
side of applications. I was part of a Release the presentation selection process, there
12 team for Oracle E-Business Suite, and Johnson: The mission of OAUG is to were more than 1,400 sessions across all
we really invested a lot of time in under- enhance the return on investment in Oracle three user groups. And with almost 200
standing and implementing the many fea- Applications for its members by building a partners involved, the exhibitor showcase
tures in Release 12, specifically around the global knowledgebase of information. We was fantastic.
financials product family. do that through education and personal One thing we did a little differently in
Oracle Magazine: And that eventually led development; through unique networking 2014 was restructuring the Oracle Meet
you to OAUG? opportunities; and through established the Experts session to give attendees the
Johnson: Exactly. I began leading learning channels for communicating with and opportunity to talk one-on-one with the
sessions and regional workshops, which led advocating to Oracle, such as the OAUG experts on certain topics. And we debuted
to giving presentations at COLLABORATE. Customer Support Council. the new COLLABORATE mobile applica-
For me, it was about giving back to the OAUG As president, one of my focus areas is tion, which lets people network with fellow
community, because when I first started finding innovative ways to improve the attendees right on the app and search on
working in Oracle technology, I leveraged a lot benefits we currently provide. For example, different and trending topics.
of the education that was provided by OAUG in the past our Conference Paper Database
through resources such as OAUG eLearning has not been easy to use. But we just Carol Hildebrand writes about business,
and the Conference Paper Database. released a version that is highly searchable sports, and technology from Wellesley,
I currently serve on the OAUG Board of and easy to use. Massachusetts.
Directors, and I served as president-elect last Another area that Iand the entire
year. And because I worked very closely with boardwant to focus on is increased Next Steps
Margaret Wright [Johnsons predecessor], I member involvement. We want to chal-
will be able to continue with the vision and lenge each one of our members to be more JOIN OAUG
oaug.org
Paul S. Howell

the strategy that she and the board had. involved this year than last year. You dont
Oracle Magazine: Will you give a little per- have to run for president of OAUG, but take FOLLOW OAUG on Twitter
twitter.com/OAUG1
spective on that vision? a look to see where your involvement helps

July/august 2014 Oracle.com/oraclemagazine


Analysts Corner by DAVID BAUM 55

Deploy Applications in
Different Environments
Organizations look to todays application server platforms to
run high-performance enterprise applications and services.

O racle Magazine spoke with Maureen


Fleming, vice president of business
A lot of things have middleware vendors to build application plat-
form frameworks and services. Java-based
process management and middleware to come together cloud application platforms are evolving
research programs at International Data
Corporation (IDC), about the latest innova-
to build a cloud around standards that will drive some consis-
tency in how cloud applications can be built.
tions in application server technology. application. Oracle Magazine: What does the future hold
Oracle Magazine: What do organizations for application server technology?
look for in an application server platform? Fleming: Companies are virtualizing Java Fleming: Event-driven design is becoming
Fleming: Most organizations today are server farms and standardizing management more and more important with the growth
looking for a set of services that improve across the farm. Rather than having one of the Internet of Things and as a way to take
the ease with which they can deploy application server or server cluster per appli- advantage of the growing volumes of data
scalable, high-performance applica- cation, they are creating shared environments that can be harnessed for business value.
tions. Application servers such as Oracle to improve utilization. This permits admin- For example, new digital services are being
WebLogic Server can be purchased as part istrators to spin up or tear down instances as built using sensors embedded in industrial
of a suite with a broad set of additional needed and troubleshoot issues across the and consumer products that transmit data
middleware capabilities such as distributed farm. Development teams can choose the to a collector that aggregates and looks for
data caching and identity management. right application server while improving oper- indications that something is going wrong.
These additional services support mission- ational consistency and driving down costs. This prompts a notification to an applica-
critical application deployments. On the low end or mobile end, companies tion or backbone designed to manage the
Oracle Magazine: How are open source are starting to use lightweight platforms like response. The response may be executed on
and proprietary application servers being Raspberry Pi or even a tablet to serve appli- a mobile device; it may be a task generated
used today? cations. On the high end, they are turning to by an existing application; it may be built
Fleming: Some organizations are now engineered systems such as Oracle Exalogic. using BPM [business process management]
commingling open source application Engineered systems offer a great deal of technology; or it may be a custom applica-
servers and proprietary application servers, scalability in a plug-and-play environment tion running on an application server or
especially for custom-developed applica- that has been preconfigured to improve cloud application platform.
tions. You can do some amazing things with speed and performance. They let you run
open source technology, such as using a larger applications than youve been able David Baum (david@dbaumcomm.com) is
lightweight application server embedded in to run in the past, so you can dream bigger a freelance business writer based in Santa
a tablet or in highly distributed scenarios, in about the type of application you want to Barbara, California.
addition to serving classic custom applica- build without hitting prior logical limits. IDC (idc.com) is a global provider of market
tions. When it comes to running packaged Oracle Magazine: How are application servers intelligence, advisory services, and events for
applications, you have to make sure your evolving in an era of cloud computing? the information technology, telecommunications,
application server is certified to run those Fleming: Application servers are the least and consumer technology markets.
applications in an optimal way. Its impor- mature of all the tiers of the cloud. For
tant to pick an application server that is example, SaaS [software as a service] plat- Next Steps
recommended by the application vendor, forms predate the cloud as we know it today,
especially given the investments associated and some of these platforms are not con- READ more about
with these applications. structed to work with leading application Oracle WebLogic Server 12c
bit.ly/1kPVs9y
Oracle Magazine: How are businesses using server platforms.
application server technology to streamline A lot of things have to come together to DOWNLOAD Oracle WebLogic Server
bit.ly/1kPVu19
deployments and simplify maintenance? build a cloud application. This is motivating

oracle magazine July/august 2014


56
Time Capsule Flashbacks: Culture. Industry. Oracle. Oracle Magazine. BY RICH SCHWERIN

1956
1951 Tape Drive
The Remington Rand UNISERVO was the primary I/O
Hard Disk
The refrigerator-sized IBM 350 disk drive held 3.75 MB and
device on the UNIVAC I computer, and stored up to leased for US$3,200 a month. Inflation adjusted, thats
224 KB on a 1,200-foot-long metal tape. nearly US$28,000 todayor US$7,400 per MB.

1970s
Floppy Disks
Data storage in the 70s and into
the 80s? Floppy. From 8-inch to
5-inch to 3-inch, these disks
of thin, flexible magnetic storage
medium were state of the art. Just
ask your mom.

1999
2011

SD Cards
Initially 64 MB, the Secure
Digital (SD) memory card
2013
storage from SanDisk,
Matsushita, and Toshiba has
Extreme
been getting smaller in size Memory
and larger in capacity ever

2000
In a single rack, Oracles
since. (Todays MicroSD holds
Exadata Database
128 GB.)
Machine X4 supports
Storage from A to ZFS 88 TB of user data in
flasha capacity suffi-

USB Flash Drive Organizations are optimizing storage with


tiered Sun flash, disk, and tape solutions
cient to hold the majority
of online transaction
from Oracle and enabling unified storage processing databases in
The first ThumbDrive with the Oracle ZFS Storage Appliance. flash memory.
from Trek Technology
plugged into any USB port
REMINGTON RAND, WIKIPEDIA COMMONS

and offered a whopping 8


MB storage capacity. And FROM 8-INCH FLOPPIES TO 88 TB IN
within just a few years, FLASH, tell us about your first storage,
thumb drives were making YOUR TURN your ultimate storage, and where you
fashion statements. think storage will be in five years.
Sushi, anyone? Visit Facebook/OracleMagazine and let
us know. bit.ly/orclmagfb

JULY/AUGUST 2014 ORACLE.COM/ORACLEMAGAZINE


Oracle Cloud
Applications
HCM
Human Capital
Ca
Recruiting
Re ERP
Talent Financials
Procurement
CRM Projects
Sales
Supply Chain
Service
Service
vice
Marketing

More Enterprise SaaS Applications


Than Any Other Cloud Services Provider

Copyright 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates.

You might also like