Professional Documents
Culture Documents
Oracle20140910 Splita DL
Oracle20140910 Splita DL
IN MEMORY,
IN BUSINESS
Keep your information active and deliver
instant business transactions and analytics
with Oracle Database In-Memory
ORACLE OPENWORLD
AND JAVAONE
CONNECTING
CUSTOMERS
Attention technologists!
September 28 through
October 2 is conference
week in San Francisco
ON THE ROAD
Oracle technology delivers
rapid application development
for the mobile enterprise
2 VOLUME XXVIII - ISSUE 5 CONTENTS
CONNECTING CUSTOMERS,
CONTENT, AND CAREERS
Attention technologists! September 28
through October 2 is conference
week in San Francisco. —Tom Caldecott
/ 24
ON THE ROAD
Oracle technology delivers rapid
application development for the mobile
FASTER ANSWERS, enterprise. —David A. Kelly
/ 28
FASTER BUSINESS
It’s here! The Oracle Database In-Memory option STABILITY AND CHANGE
speeds queries 100 times and transactions 2 times, KDDI charts a steady course with Oracle
with no changes to applications. —Curran Mahowald SuperCluster T5-8 and Oracle Exadata
/ 16 Database Machine. —Philip J. Gill
Cover: I-Hua Chen
/ 34
Editorial
Editor in Chief Tom Haunert tom.haunert@oracle.com
Managing Editor Jan Rogers jan.rogers@oracle.com
Associate Editor Patty Waddington
Contributing Editor and Writer Blair Campbell
Technology Advisor Tom Kyte
Contributors Curran Mahowald, Leslie Steere
DESIGN
Senior Creative Director Francisco G Delgadillo
Senior Design Director Suemi Lam
Design Director Richard Merchán
Contributing Designers Jaime Ferrand, Arianna Pucherelli
Production Designers Sheila Brennan, Kathy Cygnarowicz
Publishing
Publisher Jennifer Hamilton jennifer.hamilton@oracle.com +1.650.506.3794
Associate Publisher and Audience Development Director Karin Kinnear karin.kinnear@oracle.com +1.650.506.1985
Audience Development Manager Jennifer Kurtz jennifer.s.kurtz@oracle.com
Advertising sales
President, Sprocket Media Kyle Walkenhorst kyle@sprocketmedia.com +1.323.340.8585
Western and Central US, LAD, and Canada, Sprocket Media Tom Cometa tom.cometa@oracle.com +1.510.339.2403
Eastern US and EMEA/APAC, Sprocket Media Mark Makinney mark.makinney@sprocketmedia.com +1.805.709.4745
Recruitment Advertising, Sprocket Media Josie Damian josie.damian@sprocketmedia.com +1.626.396.9400, x200
Advertising Sales Assistant, Sprocket Media Cindy Elhaj cindy@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
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.
What’s Next?
It’s always a question, and it’s always a good one.
Ideally you wouldn’t drive to work, but you can still save the environment from
APPS: GREEN DRIVING
50-YEAR PREDICTIONS
Percentage of US adults who feel that the following will/won’t occur
Just In Case
in the next 50 years. What will be possible in the future? People are more Your smartphone no longer needs to be a delicate,
optimistic about the ability to grow custom organs in a lab than about the fragile object that stays at home while you’re on
ability to control the weather. One thousand US adults were surveyed. an adventure. The Snow Lizard SLXtreme Case
protects your device from the harshest elements.
Won’t happen Will happen Dust, dirt, sand, and debris won’t harm it, and it’s
waterproof down to 6 feet, opening up possibili-
Lab-grown custom organs for transplant 15 81 ties for underwater photography and video. The
best part is that it’s solar powered: the 2,550 mAh
Computers create art as well as humans do 45 51 integrated battery is trickle charged by the solar
panel on the back of the case. With the floater kit and mounting set, your
Scientists will have solved teleportation 56 39 smartphone really can go with you to whatever rugged landscape you
dream of exploring. For iPhone 4/4s, iPhone 5/5s, and iPad. US$129.99
to US$199.99. snowlizardproducts.com
Humans will have long-term space colonies 64 33
Protect switches and routers Today, protecting your business network is more critical than ever.
APC™ by Schneider Electric Smart-UPS™ uninterruptible power
with APC by Schneider Electric supplies eliminate costly downtime by providing reliable, network-grade
power over a wide range of utility conditions. They keep employees
Smart-UPS battery backup. connected to business-critical applications whether they are in
house, at a co-location facility, or in the cloud. The Smart-UPS family
offers tower, rack, and convertible form factors to deliver flexibility for
any environment. And Schneider Electric installation services make
deployment a breeze! Trusted by millions worldwide, Smart-UPS
backup units are the intelligent choice!
by Dennis Bouley
©2014 Schneider Electric. All Rights Reserved. Schneider Electric, APC, Smart-UPS, 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-1209030_GMA-US_Note3
Sept. 28–Oct. 2, 2014
San Francisco
REGISTER NOW
Save $200 by Sept. 26
Education, Conversation, and Inspiration
• Cloud Computing • Engineered Systems • HR & Talent
• Big Data & Analytics • Customer Experience • Marketing
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.
Global Sponsor Innovation Sponsor Diamond Sponsor Premier Sponsors Grande Sponsors
Events 9
Conferences and sessions to help you stay HrOUG (Croatian User Group)
Conference
on the cutting edge October 14–17, Rovinj, Croatia
hroug.hr
October 14–16, London, England OUGN Oracle ACE Director Tour 2014
October 21, Oslo, Norway
Presented by Oracle, Modern Marketing Experience
bit.ly/TFFzcn
Europe helps attendees gain insight from experts in
marketing automation, social marketing, content mar- Dallas Oracle Users Group
keting, and big data. The conference is offered along Oracle Licensing Overview
October 23, Irving, Texas
transformation and execution tracks and is designed doug.org
for modern marketing executives and practitioners.
Attendees will learn the strategy and tactics needed to Morocco Java User Group Conference
November 4–6, Casablanca, Morocco
make modern marketing succeed in their organizations. bit.ly/1pdyBsZ
bit.ly/1liVpnH
J-Fall 2014, Netherlands Java
User Group
Gartner Symposium/ITxpo (HR) practitioners for two days of learning, November 5, Nijkerk, Netherlands
October 5–9, Orlando, Florida networking, and discussing HR solutions. bit.ly/1uN0eJj
fgtnr.it/U3tHld Higher Education User Group Alliance
This five-day conference for chief information Big Data TechCon Down Under
officers and senior IT executives offers more October 27–29, San Francisco, California November 5–7, Gold Coast, Queensland,
Australia
than 500 analyst sessions, workshops, round- fbigdatatechcon.com bit.ly/1pdyFJ2
tables, and mastermind keynotes; 10 role-based This is the how-to big data training conference
tracks; and 11 industry tracks. for professionals implementing and analyzing South African Oracle User Group
Conference
big data, featuring practical Hadoop training; November 9–11, Drakensberg, KwaZulu-Natal,
O’Reilly Strata Conferences classes on MapReduce, R, Hive, and Pig; big South Africa
October 15–17, New York, New York data analytics tutorials; and more. saoug.co.za
November 19–21, Barcelona, Spain
DEVOXX Belgium
fstrataconf.com Healthcare IT Summit November 10–14, Antwerp, Belgium
These conferences help attendees get up to November 2–4, Los Angeles, California devoxx.be
speed on emerging technologies by dissecting fbit.ly/1n2z24p
Oregon and Southern Washington
case studies, developing new skills through in- This conference features education and Oracle Users Group Meeting
depth tutorials, and sharing best practices. The insight for IT executives from healthcare November 11, Bellevue, Washington
New York conference includes Hadoop World. insurer and provider organizations to help oswoug.org
them better understand future market drivers, Sun Coast Oracle Users Group Meeting
HR Tech Europe business trends, economic factors, and tech- November 11, Tampa, Florida
October 23–24, Amsterdam, Netherlands nology opportunities affecting the healthcare soug.org
fbit.ly/1lsXSaX IT market.
UKOUG JD Edwards Conference
HR Tech Europe brings together more than November 12–13, Oxford, England
2,000 decision-makers, influencers, doers, key IT Roadmap Conference and Expo bit.ly/1pdxqtl
industry speakers, and senior human resources November 18, Dallas, Texas
Oracle Benelux User Group JD Edwards
December 3, Washington DC Update Event
Events locator fbit.ly/1kL8I0F November 14, Geertruidenberg, Netherlands
These conferences offer an in-depth look at bit.ly/1pdxzwT
Oracle Events the high-priority issues facing IT professionals DOAG 2014 Conference and Exhibition
oracle.com/events today, including security, analytics, data man- November 18–20, Nuremberg, Germany
Getty Images
Locate User Groups agement, mobile/bring your own device for the doag.org
oracle.com/technetwork/community
enterprise, and more.
Videos “Integrated Systems and Your IT Career: instead of the normal 18-to-30-month
Get Smart About SaaS and Cloud IDC Survey Findings” development cycle.
fbit.ly/1h1wCoL fbit.ly/1kyE1vC
Discover three important questions you should Learn the results of a recent International Data Resource Centers
ask your SaaS providers to find out if they’re using Corporation (IDC) survey, including details Oracle Systems and Oracle Applications
the most-modern cloud best practices. about how converged and integrated systems Expert Center
are changing the way IT departments work and fbit.ly/1oPNPnM
Introducing Oracle Enterprise Manager 12c which new skills will be in high demand. Find out how a complete, integrated hardware
Release 4 and software stack that’s engineered and certi-
fbit.ly/S4VY9a E-Books fied to work together can make IT faster, more
Oracle experts introduce key new capabilities Oracle Exadata: Engineered for Your efficient, and less complicated—especially when
for accelerated enterprise-scale cloud adoption, Database you run Oracle Applications on Oracle hardware.
expanded Oracle stack management, and enter- fbit.ly/1pBd5hH
prise data and service governance. Find out how Oracle Exadata can help you speed MySQL Best Practices for Oracle Database
up all database workloads, consolidate databases Administrators
Why Move Business Applications from IBM and simplify administration, and deliver unprec- f bit.ly/1mFAnfk
to Oracle edented performance. Discover MySQL best practices for Oracle
fbit.ly/TCPgZt Database administrators who are also using
Learn how your company can benefit from Oracle VM: Application-Driven Virtualization MySQL. This resource center features presenta-
improved performance, efficiency, and reduced for the Modern Data Center and the Cloud tions, white papers, case studies, and more.
TCO by moving enterprise applications from IBM fbit.ly/1oPMYU0
Power to Oracle’s SPARC servers. The demands of cloud computing and complex, Oracle University
business-critical enterprise applications require New: Get Unlimited Oracle Learning for
Webcasts that virtualization be application-driven, built One Year
“Oracle Database In-Memory” in, and integrated across all layers of the com- fbit.ly/1mlucO9
fbit.ly/1nNODqx puting stack. The latest Oracle VM e-book Access hundreds of video courses and labs and
Find out how Oracle Database In-Memory can explains why. connect live with instructors with Oracle’s new
deliver real-time analytics performance, accel- Unlimited Learning Subscription.
eration for all workloads, and applications that White Papers
work faster. “Oracle Linux: Engineered into a Business-
web locator
Class Solution”
“Zero Downtime Consolidation to Oracle fbit.ly/1p5uxbz
Oracle Consulting
Database 12c with Oracle GoldenGate 12c” In this new Oracle-sponsored white paper, oracle.com/consulting
fbit.ly/1pBbdFG industry analyst IDC describes the changing Oracle Events and Webcasts
Learn how to use Oracle GoldenGate 12c to Linux market, provides a look at Oracle’s Linux oracle.com/events
remove the barriers of risk and business inter- product stack, and offers an in-depth description Oracle Newsletters
ruption and move to an agile and cost-efficient of Progressive Insurance’s switch from Red Hat oracle.com/newsletters
private database cloud. Enterprise Linux to Oracle Linux. Oracle Podcast Center
oracle.com/podcasts
Oracle University
Webcast Series: Countering Adversaries “Converged Applications: It’s About Speed bit.ly/ouoramag
fbit.ly/1l1c7Zg to Deliver Change” Oracle Support
Oracle security experts discuss threat actors fbit.ly/1iiv4Sz oracle.com/support
such as espionage, organized crime, and This Wikibon report illustrates how an Oracle My Oracle Support
“hacktivists.” Learn what proactive steps you SuperCluster running Oracle E-Business myoraclesupport.com
can take to mitigate risks by understanding Suite can deliver change through converged My Oracle Support Communities
communities.oracle.com
each threat and its targets. applications that takes only 2 to 3 months
TUTORIALS AND VIDEOS New Oracle Exadata Database Machine Optimized for Large-Scale
Oracle Big Data SQL: Deep Dive In-Memory and Database Cloud Workloads
Oracle big data experts Paul Sonderegger Oracle’s newest addition to the Oracle service and database in-memory. Optimized
and Dan McClary provide a deep dive into
Exadata line of engineered systems, for the recently released Oracle Database
Oracle Big Data SQL, Oracle’s new solution
Exadata Database Machine X4-8, delivers In-Memory option, Exadata Database
for seamlessly integrating Hadoop, NoSQL,
and Oracle Database. extreme compute and data throughput for Machine X4-8 supports in-memory pro-
bit.ly/1pvXI6u large database workloads using powerful cessing with massive DRAM capacity,
8-socket database servers, intelligent together with transparent data tiering
Oracle Exadata X4 Overview storage, ultrafast PCI flash cards, and to flash and disk for less performance–
Tour an Exadata Database Machine X4
unified InfiniBand connectivity. critical data.
engineered system with Oracle product
Like its predeces- “Since Oracle Exadata Database Machine
manager Mahesh Subramaniam.
sors, the Exadata was introduced in 2008, Oracle has been
bit.ly/1o0Jw7N
Database Machine delivering industry-leading engineered
Manage Users and Roles for Oracle X4-8 excels at tradi- systems that help our customers attain
Cloud Services tional database work- the most value from their enterprise data,”
Follow step-by-step instructions for adding
loads such as online says Juan Loaiza, senior vice president of
users and assigning user roles for Oracle
transaction pro- systems technology at Oracle. “Exadata
Cloud services in this three-minute tutorial.
cessing (OLTP) and Database Machine X4-8 again raises the bar
bit.ly/1qwM1lg
data warehousing, and provides an ideal platform for Oracle
How and When to Write SQL in but it is specifically Database In-Memory. Together, the com-
PL/SQL with Steven Feuerstein evolved for a new bination enables customers to evolve into
Oracle Architect Steven Feuerstein steps
generation of work- real-time enterprises.”
viewers through the most important best
loads—database as a bit.ly/1mYU2vu
practices for SQL construction, ranging
from avoiding SQL repetition to full qualifi-
cation of variable and column names.
Oracle VM 3.3 Delivers Enterprise-Scale Performance Enhancements
bit.ly/1pvY0dG
Oracle VM 3.3, Oracle’s latest server virtu- VM Manager. Users can also install the
DOWNLOADS alization product, delivers enhanced ease OpenStack technology preview with Oracle
Oracle VM Server for x86 and of use for x86 and Oracle’s SPARC archi- VM 3.3 test environments and the latest
Oracle VM Server for SPARC tectures, improved management features, version of Oracle Linux.
Release 3.3 of Oracle VM adds improve- and expanded support for both Oracle and “Oracle VM 3.3 continues to refine ease-
ments to unified virtualization manage- non-Oracle workloads, including support of-use capabilities, provides more flexibility
ment for x86 and SPARC systems running for OpenStack. in network design, and delivers a new,
Oracle VM Server, in a single console. The new release extends support of intuitive VM console,” says Wim Coekaerts,
Oracle VM Server for x86 leverages Oracle’s the Oracle VM Guest Additions feature to senior vice president of Linux and virtual-
Unbreakable Enterprise Kernel Release 3, major guest operating systems, including ization engineering at Oracle. “This new
allowing the same high-performance, high-
Oracle Linux, Oracle Solaris, and Microsoft release will allow customers to more easily
scalability technology powering Oracle Linux
Windows, to provide administrators fine- deploy, manage, and maintain enterprise-
and Oracle engineered systems.
grained control over the configuration and scale applications across both x86 and
bit.ly/1p2maer
behavior of components running within SPARC environments in a unified way.”
Oracle Linux 7 the virtual machine, directly from Oracle bit.ly/1rEH72W
Oracle Linux 7 features include XFS,
Btrfs, Linux Containers, DTrace, Ksplice,
Xen enhancements, and the Unbreakable Oracle Launches Oracle Business Process Management Suite 12c
Enterprise Kernel Release 3.
The latest release of Oracle Business Process ronment, managers need process man-
bit.ly/1ryCcTB
Management Suite includes improvements agement tools that enable them to make
Oracle Business Process to the product’s Oracle Business Activity quick, impactful changes,” says Gangadhar
Management Suite 12c Monitoring and Business Architecture Konduri, vice president of product man-
Oracle Business Process Management
Modeling features and enhanced support agement at Oracle. “With Oracle Business
Suite 12c contains new features designed
for Adaptive Case Management and Oracle Process Management Suite 12c, we are
to deliver faster time to value when
implementing new business processes or Process Accelerators. helping organizations plan and manage
enhancing existing ones. “Business processes are integral to an their entire business architecture through a
bit.ly/1pvYlNw organization’s success or failure, and in flexible and secure solution.”
today’s rapidly changing enterprise envi- bit.ly/1pfPboj
Oracle Extends Big Data Portfolio with Oracle Big Data SQL MySQL Fabric Available Now
Oracle has announced Oracle Big Data SQL, limiting the true potential of big data,” says Oracle has announced the general avail-
SQL-based software that seamlessly inte- Andy Mendelsohn, executive vice president ability of MySQL Fabric, an open source
grates data across Apache Hadoop, NoSQL, of database server technologies at Oracle. framework for managing farms of MySQL
and Oracle Database, minimizing data “Oracle Big Data SQL harnesses the popular, servers. Available for download at bit.ly/
movement while increasing performance proven SQL query language to break down mysqlfabric, this integrated and extensible
and helping to eliminate data silos. these silos and finally bring big data into the system makes it easier to scale out and add
Oracle Big Data SQL runs on Oracle Big mainstream of an enterprise. Oracle con- high availability to MySQL applications.
Data Appliance and can work in conjunction tinues its leadership in database innovation “Many of the world’s largest websites and
with Oracle Exadata Database Machine. with this simple yet powerful way for orga- cloud-based applications rely on MySQL
“As organizations increasingly use nizations to access all of their data, leverage replication and sharding to deliver high
diverse datasources beyond relational existing investments and skills, and gain availability and scalability,” says Tomas
databases, such as Hadoop and NoSQL, new value and insights that can transform Ulin, vice president of MySQL engineering
data is becoming more and more siloed— their business.” at Oracle. “MySQL Fabric makes high avail-
hampering data analysis and insights and bit.ly/1sGuV4g ability with automatic failure detection and
failover, as well as automated data sharding,
accessible to all. With this integrated and
New Releases of Oracle Tuxedo 12c and Oracle Tuxedo Application open source framework, Oracle makes it
Runtime 12c easier to safely scale out MySQL applica-
Oracle has introduced the latest releases scalability customers need to develop and tions, either on premises or in the cloud.”
of Oracle Tuxedo 12c and Oracle Tuxedo manage the next-generation applications bit.ly/mysqlfabric
Application Runtime 12c (Oracle Tuxedo ART that move at the pace of business.”
12c). Oracle Tuxedo 12c, the industry’s #1 The new release of Oracle’s mainframe
application server for the deployment of C/ application rehosting platform, Oracle
Oracle Buys MICROS Systems
C++/COBOL/Java enterprise workloads in Tuxedo ART 12c, helps organizations speed Oracle has entered into an agreement to
private and public cloud environments, now up migration projects and accelerate adop- acquire MICROS Systems, a provider of
delivers enhanced reliability, availability, tion of the new environment. integrated software and hardware solu-
performance, and scalability for conven- “Even when customers recognize the tions to the hospitality and retail industries.
tional and enterprise cloud applications. benefits of moving to open, flexible, and Together, Oracle and MICROS will help
“Conventional and cloud-based applica- scalable platforms, the transition to the hotels, food and beverage facilities, and
tion environments are becoming increas- rehosted environment can be challenging,” retailers accelerate innovation and provide
ingly complex, and present IT departments says Xiong. “Oracle Tuxedo ART 12c Release 2 customers with complete, open, and inte-
with the unique challenge of managing products greatly simplify this transition grated solutions.
the applications and services developed in process by providing native mainframe “Oracle has successfully helped cus-
various programming languages and plat- equivalent capabilities, supporting familiar tomers across multiple industries harness
forms,” says Frank Xiong, group vice presi- operation interfaces, and greatly extending the power of cloud, mobile, social, big data,
dent of software development at Oracle. real-time monitoring and supportability of and the Internet of Things to transform their
“The latest release of Oracle Tuxedo 12c the migrated applications.” businesses,” says Oracle President Mark
provides a modern, open, and cloud-ready bit.ly/1nQg2t0 Hurd. “We anticipate delivering compelling
platform that delivers the performance and bit.ly/1mlKjek advantages to companies within the hospi-
tality and retail industries with the acquisi-
tion of MICROS.”
User Experience Enhanced for Oracle Applications Cloud bit.ly/1mSxwoH
Release 8 of Oracle Applications Cloud user interface, further enhancing the user
extends the simplicity, mobility, and exten- experience and mobility of business-crit-
sibility of the user experience for Oracle ical applications.
Oracle Acquires GreenBytes
Sales Cloud and Oracle Human Capital “We understand how people work. We Oracle has agreed to acquire GreenBytes,
Management Cloud. want users to know where to go. We have a provider of ZFS technology with domain
Infographic-inspired, simple screens and analytics, so that you can expertise in the areas of deduplication,
tablet-friendly, and see your status, click to get more informa- replication, and virtualization. GreenBytes
interactive visualiza- tion, and then commit to the task and go,” technology complements Oracle’s storage
tions and embedded says Jeremy Ashley, vice president, Oracle solutions and is expected to enhance Oracle
I-HUA CHEN
Oracle Enterprise Manager 12c Release 4: Cloud Acceleration Oracle SOA Suite 12c Available
Now available, Oracle Enterprise Manager Manager, we are extending this leadership Oracle SOA Suite 12c, the latest version
12c Release 4 lets organizations rapidly by providing enterprise-scale capabilities for of Oracle’s complete and unified applica-
adopt Oracle-based, enterprise-scale planning, delivering, and managing private tion integration and SOA solution, enables
private clouds. New capabilities provide clouds,” says Prakash Ramamurthy, senior organizations to easily integrate and
advanced technology stack management, vice president of systems and cloud manage- connect applications across their entire IT
secure database administration, and enter- ment at Oracle. “We call this ‘zero-to-cloud– ecosystem on a single, unified platform and
prise service governance, enabling Oracle accelerated.’ These enhancements help our includes new manageability enhancements
customers and partners to maximize data- customers to expe- for private cloud deployments. With the new
base and application performance and drive dite their adoption of release, organizations can achieve faster
innovation using self-service IT platforms. cloud computing and time to market and increased productivity
“Since its inception, Oracle has been prepare them for the with a low total cost of ownership.
leading the way in innovative, scalable, and next generation of “To capitalize on new business oppor-
high-performance solutions for the enter- self-service IT.” tunities, organizations need the flexibility
prise. With this release of Oracle Enterprise bit.ly/1mSvTXQ to use diverse solutions and environments
to best meet their needs, and this can pose
distinct and sizeable application integra-
New, Highly Optimized x86 Servers tion challenges,” says Amit Zavery, group
Oracle has announced the latest in its line of X4-8 further Oracle’s goal of simplifying vice president, Oracle Fusion Middleware.
workload-specific, enterprise-class servers: IT and significantly reducing operating “With Oracle SOA Suite 12c, we are helping
the Sun Server X4-4 and Sun Server X4-8. expenses for our customers by delivering organizations overcome those obstacles
The Sun Server X4-4 is well suited products that are best for the Oracle by delivering an integration platform that
for applications requiring large memory Database In-Memory option and business is specifically designed for organizations’
footprint virtual machines and is ideal analytics,” says Ali Alasti, senior vice presi- diverse application ecosystems. By enabling
for running real-time analytics software. dent of hardware development at Oracle. significantly simplified integration, Oracle
The Sun Server X4-8 is ideal for running “Through close collaboration with Intel, we SOA Suite 12c helps organizations speed
Oracle Database and, when combined are the first to announce servers based on time to market, increase productivity, and
with the Oracle Database In-Memory the new Intel Xeon E7-8895 v2 processors lower costs.”
option, can speed up query processing by and the first with unique capabilities that bit.ly/1ruKhpT
allowing even more of the database to be allow customers to dynamically address dif-
memory-optimized. ferent workloads in real time.”
“The Sun Server X4-4 and Sun Server bit.ly/1jCS04S
Oracle Buys LiveLOOK
Oracle has agreed to acquire LiveLOOK, a
leading provider of real-time, visual collabo-
Oracle ZFS Storage ZS3 Series Appliances Boost Virtualization and ration technology for cobrowsing and screen
Cloud Capabilities sharing. The addition of LiveLOOK will
The latest release of the Oracle ZFS Storage use common methods to deploy public and enable modern customer service organiza-
ZS3 series accelerates virtual machine private clouds and provide IT as a service. tions to directly engage with consumers,
(VM) deployment and monitoring, with the “Today’s heavily virtualized data centers bolstering customer satisfaction, agent effi-
midrange Oracle ZFS Storage ZS3-2 appli- demand efficient, high-performance ciency, and revenue growth across web and
ance supporting more than 16,000 VM storage in order to avoid performance mobile channels.
boots from a single issues and operational disruption caused “Consumers are increasingly conducting
platform in less than by unpredictable virtual machine workloads transactions across multiple digital chan-
seven minutes. Cloud and boot storms,” says Scott Tracy, vice nels such as web and mobile. Meeting
capabilities have been president of storage software at Oracle. consumer demands and exceeding their
extended in Oracle ZFS “The new capabilities delivered by the expectations for web and mobile service
Storage OS 8.2, adding Oracle ZFS Storage ZS3 systems provide and support will improve customer satis-
the OpenStack Cinder valuable architectural benefits and superb faction and enhance revenue,” says David
driver for simplified analytics to support high-density virtualized Vap, group vice president, Oracle Product
cloud provisioning environments. As a result, customers are Development. “With LiveLOOK, Oracle
and orchestration able to keep their operations running at full Service Cloud will enable customer service
as well as integrated speed in order to remain agile and respond and sales agents to deliver exceptional cus-
I-HUA CHEN
Melissa Data.
Architecting data quality success.
www.MelissaData.com 1-800-MELISSA
16
Mixed Workload
The database row format is ideal for appli-
cation transaction processing, and the
database column format is better for ana-
lytical queries. What if you could perform
both types of operations quickly without
compromise? “The innovation of the Oracle
[Database] In-Memory option is that we “The DBA can now focus not so much on
store the data both ways. We store it both
in row format and in memory, in columnar database performance, per se, but on making
format,” said Ellison. With Oracle Database
12c and Oracle Database In-Memory, the
the database more useful to the business. ”
—Larry Ellison, CEO, Oracle
row and column formats are simultane-
ously active and transactionally consistent.
Companies no longer need to choose can now run at twice the speed, because tions simply need to configure the memory
between optimal transaction performance indexes can be dropped. capacity, configure tables (or partitions)
and high-speed analytics. to be in memory, and delete the old
Oracle Database In-Memory not only Minimum Disruption, indexes that they don’t need anymore. The
increases the speed of queries and ana- Maximum Impact Oracle Database In-Memory option is also
lytics, but it also increases the speed of Ellison emphasized the fact that organiza- deployed completely transparently. “It just
online transaction processing (OLTP). “We tions using Oracle Database In-Memory works,” said Ellison.
have a lot of customers using our database do not need to make any changes to their Although the column format is new in
for transaction processing. We cannot SQL code or their applications. It is not Oracle Database In-Memory, the Oracle
compromise transaction processing,” said necessary to unload or reload any data, Database row format works the same as
Ellison. Using Oracle Database In-Memory, and no functions are restricted. To deploy before. “Just keep doing what you’re doing.
Oracle
OLTP that was slowed by analytic indexes Oracle Database In Memory, organiza- Logging works, backup works, recovery
Oracle Database, which means IT profes- Oracle E-Business Suite From 58 hours to 257x faster
13.5 minutes
sionals can expect the same maturity and
Oracle Fusion Financials Cloud Service From 10 minutes to 210x faster
reliability that are part of the proven Oracle 3 seconds
Database. All the advanced technologies
for storage tiering, database scale-up
and scale-out, recovery, and integrated with Oracle Exadata and SPARC M6-32 fault tolerance, the memory duplicated
security that Oracle has spent decades systems. Referring to the SPARC M6-32 big across nodes,” said Loaiza.
developing work transparently with Oracle memory machine, its 32 TB of memory, Organizations will do business
Database In-Memory. and Oracle Database In-Memory, Ellison differently once they have access to
Software engineered with hardware explained what the combination of tech- information at the speed in which Oracle
delivers even better performance, and nologies means for business. “This is the Database In-Memory delivers it. “You’re
Ellison discussed the ways in which the world’s fastest computer for business,” going to ask more-frequent questions,”
new Oracle Database In-Memory software said Ellison of the SPARC M6-32. “You can Ellison said. “You’re going to ask more-
leverages Oracle’s engineered systems. store all your data in memory; get all of complicated questions.”
He described the combination and per- your answers instantaneously.” With its extreme performance, avail-
formance of Oracle Database In-Memory ability, and simplicity, the Oracle Database
In-Memory, In Practice In-Memory option certainly makes a dif-
Oracle Senior Vice President Juan Loaiza ference in the speed of analytic queries
joined Ellison on stage to show an applica- and business answers. It’s the difference
tion running Oracle Database In-Memory. between walking and flying. It’s the differ-
First, Loaiza demonstrated running a query ence between getting answers in hours and
two different ways: by creating indexes getting them in seconds.
and by using Oracle Database In-Memory. “You’re going to change business pro-
Both got virtually instantaneous results, cesses as a result of having this informa-
but with Oracle Database In-Memory it was tion so quickly; being able to recompute
not necessary to figure out what queries this information so quickly,” concluded
would be run or to map the indexes. “One Ellison. “You’re going to become a real-
of the nice things about [Oracle Database] time enterprise.”
In-Memory is you don’t have to create the
indexes,” explained Loaiza. “You don’t have
to know the queries ahead of time. You just Curran Mahowald is an Oracle Magazine and
place all this data in the [Oracle Database] Java Magazine contributor.
In-Memory columnar store, and then all
the queries run fast, no matter what you Next Steps
query on.”
LEARN more about
Ellison and Loaiza assured the event
Oracle Database In-Memory
crowd that even though the data lives oracle.com/us/products/database/options/
in memory, it is still protected with the database-in-memory
Oracle Senior Vice President Juan Loaiza described strength and reliability of Oracle Database WATCH the Oracle Database In-Memory
Oracle Database In-Memory: “You’ve never seen Webcast
12c. “You’ve never seen anything like this
Oracle
M
“ obile will be more disruptive than
the web and the PC.” So said a tweet
“Developing a mobile regularly use on their mobile devices. Make
sure your mobile strategy looks for ways to
from Forrester Research this past spring application is not just leverage those capabilities in order to meet
(bit.ly/1pQeSMD). Given the head-spinning
rise in the popularity and use of smartphones
about developing a enterprise objectives.
And bear in mind that the transformation
and tablets in recent years, betting against user interface.” to enterprise mobility has benefits beyond
that prediction is probably not the smartest mobile. For example, Oracle’s Davelaar rec-
—Luc Bors, Oracle ACE
thing you could do with your money. ommends converting from more-complex
The mobile juggernaut, that great un– more than the devices themselves and the and less performant SOAP-based web
tethering that has freed people from their applications developed for them; it must services to more-lightweight and mobile-
desktops and laptops, shows no signs of also focus on creating a mobile-friendly back friendly REST/JSON web services. This
subsiding. A report from industry research end. “You will have to tailor some of the data change will help to streamline and simplify
and advisory firm Gartner confirms the loads, for instance,” says Davelaar. “You the back end in order to better accom-
obvious: sales of smartphones and tablets have to think about different strategies— modate any kind of user interface, not just
skyrocketed between 2012 and 2013 and data synchronization and much more.” those associated with mobile applications.
remain robust in 2014 (gtnr.it/1x5O9jq). And “A mobile application is not a solution That’s good strategy, and good business.
in April the LA Times reported that 2014 sales by itself—it’s part of your enterprise solu- The bottom line is straightforward:
of wearable devices, including smart watches tion,” agrees Oracle ACE Luc Bors, principal Your company has no choice but to adopt a
and web-enabled glasses, will triple sales of consultant at AMIS Services. “Developing a mobile strategy. And your role in defining
similar devices in 2013. mobile application is not just about devel- that strategy will help to determine your
If your organization has not yet come up oping a user interface. User interface devel- own mobility—as it relates to the direction
with a mobile strategy, you might want to opment is only 25 to 50 percent of the whole you travel on the org chart.
reprioritize your to-do list. But the key word mobile application. The rest of the work is
here is strategy. definitely in back-end services that provide Bob Rhubart
“Mobility is always changing,” says Chris data, and also in security.” (bob.rhubart@oracle.com)
Muir, senior principal mobility and devel- But while a mobile-friendly back end is is manager of the
opment tools product manager at Oracle. essential, the mobile application itself looms architect community
“You may solve the set of problems you large. If you thought you could simply squeeze on Oracle Technology
have today, but because the market moves your company website or critical web appli- Network, the host of the
so quickly, in a week, a month, a year, you’ll cation onto a smartphone screen and call it Oracle Technology Network ArchBeat podcast
have a whole range of things coming on a day, guess again. Today’s mobile devices series, and the author of the ArchBeat blog
board that need to be addressed.” offer a variety of capabilities that define the (blogs.oracle.com/archbeat).
The requirement for long-term thinking modern mobile experience. Don’t make the
should come as no surprise to architects, mistake of overlooking these features. Next Steps
for whom dealing with constant change “Not many enterprises seem to be lever-
is part of the job. But any mobile strategy aging mobility at any level beyond commu- LISTEN
that effectively anticipates the depth and nication and limited access to parts of enter- “Going Mobile: Developing Enterprise
Mobile Apps”
breadth of change must start with an under- prise applications,” says Oracle ACE Director bit.ly/1pQfmCo
standing of what mobility really means. Lucas Jellema, CTO at AMIS Services. That “Java EE 7, HTML5, and Mobile App
According to Steven Davelaar, a con- strategy leaves a lot of money on the table in Development”
sulting solutions architect with the ADF/ the form of location-based services, person- bit.ly/1k6IX6M
Oracle WebCenter A-Team, an effective alized cross-device behavior, offline opera- “Mobile Architectures and Oracle ADF Mobile”
bit.ly/1pQfy4H
mobile strategy must take into account tions, and gamification that consumers
Game Changers
Peers on communities and technologies that are radically enhancing the way they work
Company: City of Atlanta, Georgia Company: AuraPlayer Modernization Solutions, a Company: e-DBA, an Oracle Platinum Partner
Job title/description: Senior IT manager, Oracle technology company providing solutions that enable providing Oracle managed and cloud services,
Applications, responsible for managing a team Oracle customers to modernize their legacy Oracle professional services, and software asset
providing support for Oracle solutions Forms–based systems for new environments management
Location: Atlanta, Georgia Job title: CEO and cofounder Job title/description: Technology director,
Location: Brookline, Massachusetts responsible for overseeing the technologies
Length of time using Oracle products: deployed on client projects
Four years Length of time using Oracle products: 16 years
Location: London, England
Oracle credentials: Oracle Certified Professional
(several releases, including Oracle Database 10g)
Which new features in Oracle Database are How did you get started in IT? As a summer and Oracle Certified Master (Oracle9i Database),
you finding most valuable? I’m exploring the intern at Bell Canada, I was tasked with with 18 years of experience using Oracle products
Oracle Multitenant option of Oracle Database printing the e-mails of a woman who was on
12c as it relates to managing and replicating maternity leave and then cataloging them What’s your favorite tool on the job? I find
my development and test application into binders by project. After about a day, I Oracle Enterprise Manager Cloud Control 12c
instances. The ability to bring up or copy an got bored and decided to build a small macro to be a big help, and I’m a massive fan of
entire database without the need to build in Visual Basic that could automatically filter the Automatic Workload Repository and
another database server is tremendous. her e-mails into different folders on her Automatic Database Diagnostic Monitor
What technology has most changed computer. After she saw that, she quickly features—they really help me and the team
your life? Mobile. With BYOD [bring your moved me to the database department. break through the barrier and spend our time
own device] initiatives, the wide variety How are you using mobile computing at your fixing issues, rather than trying to find them.
of mobile platforms makes supporting company these days? As a mobile enablement How about a favorite technique? Having a
them a challenge. Oracle has been great company, we are working alongside Oracle to background in tech support is a big benefit;
at delivering updates to support these help Oracle Forms customers go mobile with it helps me break problems down quickly
constantly changing environments. their existing systems. Using Oracle’s mobile into smaller pieces and get to the root cause.
You recently became one of the first Oracle framework and development tools, we are I see a lot of people still trying to fix issues
ACE Associates. What was the process for able to build apps based on our web services at the top level, instead of building from
earning that status? Becoming an Oracle and deploy to both iOS and Android devices the ground up and figuring out where in the
ACE Associate is based on your contributions from one code base. It’s a huge timesaver for layers something’s actually broken.
to the Oracle community. Over the last our mobile projects. Which new features in Oracle Database are
year and a half, I really began to share What advice do you have about how to you finding most valuable? We’re doing a lot
my experiences with Oracle technology get into mobile development? I suggest of work with the Oracle Multitenant option,
over social media and to connect with following Oracle ACEs and Oracle product and we were also fortunate to be part of the
leaders in the community. Networking and managers on Twitter to find interesting Oracle Database In-Memory beta. These are
demonstrating knowledge of the technology blog posts and get more involved in the big game changers; they provide so much
is the starting point—and now I hope to add community. Another great information value that I think once people see them
to that body of knowledge by learning and source is YouTube. And definitely utilize the they’re going to want to move to Oracle
sharing, in order to become an Oracle ACE. user groups for free webinars! Database 12c.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates.
24
Connecting
Customers,
Content, and
Careers
September 28 through October 2 is conference week in San Francisco.
By Tom Caldecott
T
ens of thousands of Oracle technolo-
gists and business users head to Oracle Oracle OpenWorld is Central
OpenWorld and JavaOne San Francisco Oracle OpenWorld San Francisco, the world’s largest conference
every year to hear about the latest Oracle focused on Oracle technology, offers more than 2,500 sessions, labs,
demos, and meetups this year as well as more than 3,000 speakers
and Oracle-related technology, best practices, and
discussing everything from cloud computing to developer tools,
trends from industry experts and peers. applications, solutions, and industries.
This year, each conference will be more than a At the heart of Oracle OpenWorld’s customer-centric storytelling
world-class learning and networking opportunity: programming are nine focus areas that concentrate on the business
The focus is on customer conversations. More and technology topics and industries most significant to Oracle cus-
Oracle customers are scheduled to appear on con- tomers. Attendees will be able to choose from these focus areas, or
“Centrals,” covering customer experience (CX), human capital man-
ference stages than in previous years, and more
orange Photography
On the Road
Oracle technology delivers rapid application
development for the mobile enterprise.
Wes Rowell
By David A. Kelly
“We just put the applications manager at Oracle. “With Oracle ADF Mobile and Oracle Mobile
Application Framework, organizations have used—and will continue
in our app store and our users to use—their expertise in Java, JavaScript, or Oracle ADF to build
Ana Nicholson, solutions architect, and Mark Watson, lead architect, both of
Northumbrian Water has also used Oracle ADF Mobile to create a
Northumbrian Water, believe that their Oracle ADF Mobile application strategy
has produced benefits across the organization. mobile timekeeping application and rolled it out to 450 employees.
and running in no time. The time to market is a lot more rapid than
it is for traditional enterprise applications.”
Like most organizations, Oracle has made its deploy a rich set of back-end functionality to Huang, senior principal product manager at
applications mobile—from Oracle E-Business a range of mobile devices. Oracle has released Oracle. “We’ve definitely seen a huge adoption
Suite to Oracle Cloud applications. And like more than 40 Oracle ADF Mobile–created of mobility, and we’ve leveraged Oracle ADF
many of its customers, Oracle has used Oracle applications in the Apple App Store alone Mobile to very quickly build mobile applica-
ADF Mobile to do it. for solutions such as Oracle Cloud, Oracle tions for our solutions. With the availability of
Oracle’s application development teams E-Business Suite, and Oracle’s PeopleSoft and Oracle Mobile Application Framework, Oracle
have built new mobile applications using JD Edwards applications. Applications teams will be able to release
Paul S. Howell
Oracle ADF Mobile for the same reason that “Oracle ADF Mobile technology has allowed even more compelling applications that lever-
Oracle customers have used it—because it us to very quickly build mobile applications age the ever-increasing set of specialized
provided a quick and easy way to natively for core Oracle enterprise solutions,” says Joe device capabilities.”
and track truck locations. for the target platform. “To build mobile
snapshots
“Our first Oracle ADF Mobile application applications using Oracle ADF Mobile, you
took 10 weeks from beginning to end, and
Northumbrian Water don’t need an army of developers, but you
nwl.co.uk
now we can roll out updates as well as a new Headquarters: Durham, England do need a good design sense, a good archi-
application in 4 weeks. One week to build Industry: Water tecture, and a good understanding of your
the application, 2 weeks for testing and user Oracle products: Oracle Application data,” says Venkataraman. “With Oracle ADF
feedback, 1 week to release to the Apple App Development Framework, Oracle ADF Mobile, Mobile you don’t have to know Apple Xcode
Oracle JDeveloper, Oracle SOA Suite, Oracle
Store. True rapid application development or the Android SDK; you actually write it in
E-Business Suite 12, Oracle E-Business
with releases on a monthly basis!” says Bala Suite Adapter, Oracle Database 10g, Oracle Java, and Oracle ADF Mobile writes the Apple
Venkataraman, chief architect at TXI. Database 11g, Oracle WebLogic Server, Oracle or Android code for you. We can use one
TXI initially used Oracle ADF to build an Utilities Mobile Workforce Management platform and one codebase and deploy it to
online customer portal, and then it moved the web, to an iPhone, to an Android phone,
on to use Oracle ADF Mobile to create enter-
Texas Industries or to a tablet.”
txi.com
prise mobile applications. TXI uses Oracle Headquarters: Dallas, Texas
JDeveloper as the integrated development Industry: Construction materials Powering Up with Mobile Apps
environment for its development, since Oracle products: Oracle Application Managing electrical power requires man-
Oracle JDeveloper supports both web and Development Framework, Oracle ADF Mobile, aging information about locations on the
Oracle JDeveloper, Oracle WebLogic Server,
mobile app development. “The develop- power grid, and mobile apps can help power
Oracle Database, Oracle E-Business Suite,
ment process starts with identifying a Oracle Business Intelligence solutions companies do that more effectively and
datasource and creating services,” says efficiently. PowerSouth Energy Cooperative,
Venkataraman. “After you build out your PowerSouth Energy Cooperative based in Andalusia, Alabama, is improving
services, Oracle ADF Mobile becomes a plat- powersouth.com its business by managing location informa-
Headquarters: Andalusia, Alabama
form for rapid application development.” tion with Oracle ADF Mobile.
Industry: Utilities
By using Oracle ADF Mobile, TXI was Oracle products: Oracle Application PowerSouth is an electricity generation
able to create native apps for both Apple Development Framework, Oracle ADF Mobile, and transmission cooperative serving more
and Android devices. The initial ReadyTrac Oracle JDeveloper, Oracle WebLogic Server, than 900,000 customers throughout central
application has worked so well that TXI has Oracle Database and south Alabama and the northwest
developed three other mobile applications. Florida panhandle. Like many organizations,
“With Oracle ADF Mobile, even with a PowerSouth currently runs a number of
limited IT staff, we’ve been able to create good mobile applica- Oracle Applications, including Oracle E-Business Suite, and custom
tions—for different types of mobile platforms—which is huge for applications developed using Oracle Forms, Oracle Reports, PL/SQL,
us,” says Marshall. “Oracle ADF Mobile gives us flexibility to deploy Oracle Application Express, and more.
our custom apps to multiple platforms.” In 2013, PowerSouth partnered with PITTS America, a Troy,
In addition, building mobile apps using Oracle ADF Mobile Michigan–based company, to create its first two mobile
doesn’t require extensive expertise with native coding capabilities applications—one for managing and maintaining information
related to each substation, and the other to provide operational
Oracle Mobile Application Framework information to top managers, directors, and vice presidents.
PowerSouth decided to use Oracle ADF Mobile for the apps because
In June 2014, Oracle unveiled application development be the company wanted to be able to quickly, easily, and securely deploy
Oracle Mobile Application done with the new Oracle Mobile
enterprise applications to mobile devices such as Apple iPads.
Framework. Application Framework.
Oracle Mobile Application “The new Oracle Mobile “We needed to create mobile applications that would be easy
Framework simplifies the Application Framework offers an to use and let us capitalize on our existing infrastructure,” says
development of multiplatform easy transition for Java developers
Kenneth Jones, business systems supervisor at PowerSouth. “For
on-device mobile applications. to bring their development skills
Features include support for to the mobile world, leveraging us, Oracle ADF Mobile was the way to go. I really like what it can do
multiple integrated development their Java and JavaScript skills on a mobile device.”
environments, including Oracle with the tools they already use,”
For the mobile app related to substation information mainte-
JDeveloper and Eclipse (through says Chris Tonas, vice president
Oracle Enterprise Pack for Eclipse); of mobility and development nance, the goal was to give field inspectors powerful and real-time
support for multiple develop- tools at Oracle. “By integrating tools for inspecting and maintaining the cooperative’s substations.
ment languages, including Java, the mobile application developer
In addition to capturing data about each substation, PowerSouth’s
JavaScript, and HTML; support experience on both the front and
for Apache Cordova plug-ins; and back end, we are helping develop- field inspectors can also take photographs and collect GPS informa-
support for applications developed ers deliver mobile applications tion to document situations and equipment. The end result is that
under Oracle ADF Mobile. Oracle to their organization faster and
field inspectors can get their jobs done faster, with a higher level of
recommends that new mobile more efficiently.”
detail, while collecting more-precise maintenance information.
“More people are demanding the ability to capture and view data out
in the field than ever before. . . . Oracle ADF Mobile is helping us
overcome those challenges and get data to and from the field.”
—Kenneth Jones, Business Systems Supervisor, PowerSouth
PowerSouth chose Oracle ADF Mobile because the company wanted to quickly, easily, and securely deploy enterprise applications to mobile devices. “We needed to create
mobile applications that would be easy to use and let us capitalize on our existing infrastructure,” says Kenneth Jones (right), business systems supervisor at PowerSouth.
The new substation information application runs on an iPad and be able to get it out there somehow,” says Jones. “Oracle ADF Mobile
communicates wirelessly using a secure VPN connection back to is helping us overcome those challenges and get data to and from the
the organization’s Oracle WebLogic Server. It can also be used in an field, extending our enterprise applications to our mobile workers. For
offline mode when no wireless signal is available. No user training is PowerSouth, using Oracle ADF Mobile has worked out really well.”
required for the apps, and they tie into PowerSouth’s existing infra-
structure, so the company didn’t have to purchase any additional
servers or other back-end hardware. David A. Kelly (davidakelly.com) is a business, technology, and travel
“We’ve been able to give our employees in the field a lot of informa- writer who lives in West Newton, Massachusetts.
tion about each substation that they never had before, such as the
Next Steps
previous month’s inspection,” says Jones. “It not only makes it easier
to record the information, but it allows us to be more proactive on our
LEARN more about
Marc Bondarenko/Getty Images
maintenance of the substations as well as analyze trends over time.” Oracle ADF
From Jones’ perspective, the need for mobile applications is only oracle.com/technetwork/developer-tools/adf
going to increase. “More people are demanding the ability to capture Oracle ADF Mobile
and view data out in the field than ever before. I believe there’s going oracle.com/technetwork/developer-tools/adf-mobile
to be a constant push over the next few years to make more data Oracle Mobile Application Framework
oracle.com/technetwork/developer-tools/maf
readily available in the field, and as an IT organization, we’ve got to
Machine engineered
systems had more than
enough performance for our
needs,” says Kato Toshio,
general manager of the
EPC Network Technology
Division at KDDI.
35
STABILITY
AND CHANGE
In Japan’s dynamic mobile telecom market, KDDI
charts a steady course with Oracle SuperCluster
T5-8 and Oracle Exadata Database Machine.
By Philip J. Gill
Enterprise M3000 servers from Oracle loaded into a user data cache that runs
to handle the increased number of sub- BACK-END BOOST in Oracle TimesTen In-Memory Database
scribers and the growing data volume. While the Oracle SuperCluster T5-8 server has on the Oracle SuperCluster T5-8 server,”
Although that expansion provided dramatically improved KDDI’s User Authentication Toshio explains.
System performance, what’s at the back end of
the performance KDDI needed, at least “The core Oracle Exadata database
that system is equally important. For KDDI, that
temporarily, it eventually also brought back end is an Oracle Exadata Database Machine. updates the Oracle TimesTen In-Memory
management complexity. “When we “The User Authentication System needs to Database automatically, which enables
access the users’ history of the services, which
scaled up our server farm to 40 units, the quicker authentication between mobile
are stored on the back-end database server at all
management workload and costs got out times,” says Kato Toshio, general manager of the devices and Oracle SuperCluster,” he
of hand,” says Toshio. “Updating server EPC Network Technology Division at KDDI. continues. “The access log is also stored
When initially installed at KDDI, the Oracle
software, for example, would take many and passed along to the billing system,
Exadata Database Machine consolidated 2 TB of
hours to complete because there were so data previously on two SPARC Enterprise M3000 which runs on another system.”
many physical servers.” servers from Oracle onto a single system and pro- For added safety, KDDI has installed
vided four times greater transaction performance.
To reduce complexity and costs, not one but three Oracle SuperCluster
“By replacing those servers with a single Oracle
KDDI decided to consolidate its 40 Exadata Database Machine, we also reduced floor T5-8 servers, explains Toshio. All three
servers onto three Oracle SuperCluster space by 25 percent and power consumption by are production machines, and any one
15 percent,” Toshio adds.
T5-8 engineered systems, built spe- machine working alone can maintain
“Of course, what matters most is database
cifically for high-throughput, high- performance,” Toshio concludes. “Thanks to continuous, uninterrupted service.
performance applications. The decision Oracle Exadata, the SQL processing speed of our Besides the extra level of availability,
Oracle database is approximately 20 times faster.”
to go with Oracle SuperCluster was Toshio says the new Oracle SuperCluster
designed to minimize disruption and T5-8–based User Authentication System
maintain stable, transparent services provides 12 times faster performance
to subscribers. than the previous system, while reducing
“Staying with Oracle Solaris and floor space by 50 percent and electricity
SPARC was our first choice because consumption by 15 percent.
the system is mission-critical and it “We were very concerned about
would require little or no changes to our whether we would get the system per-
existing software,” says Toshio. Besides, formance we needed to stably handle
he adds, “Oracle Solaris also has better the transition from 40 servers, while
troubleshooting tools, such as DTrace, maintaining sufficient disk I/O,” says
and SPARC systems are more reliable Toshio. “But through careful prepara-
than commodity Intel servers.” tion, we confirmed that the Oracle
Toshio admits that KDDI took on SuperCluster T5-8 and Oracle Exadata
additional schedule and deployment Database Machine engineered systems
challenges when choosing Oracle had more than enough performance for
SuperCluster T5-8. “Planning and imple- our needs.”
mentation required very close coordina- For KDDI, Oracle engineered systems
tion between all parties, particularly provide benefits beyond reliability,
because when KDDI selected Oracle SuperCluster T5-8, the product transaction performance, and high availability. “Oracle engineered
had not yet begun shipping, so pretesting on the actual equipment systems are pretested, preconfigured, and proven by Oracle,” Toshio
was not possible,” he says. says. “For a rapidly changing environment and industry such as
“To overcome this challenge,” he continues, “Oracle assembled ours, it is a huge benefit to build and run the system quickly without
servers, storage, InfiniBand switches, and other required compo- having to take the extra time for tuning, configuring, and testing.” t
nents to create a simulated Oracle SuperCluster. Testing proceeded
successfully with the simulation, and when the just-released Oracle
Philip J. Gill is a San Diego, California–based writer and editor.
SuperCluster T5-8 engineered system was deployed, it became the
first one in use as a production solution.” NEXT STEPS
We provide applications to fnancial institutions, Volante Designer 5.0 has been tested and optimized
nationwide public identifcation, law enforcement on Oracle Exalogic Elastic Cloud to execute in excess of
agencies, healthcare and to whoever needs the one million operations per second. Volante is an Oracle
convenience and security of biometric authentication. Gold Partner.
We are experts in Oracle Data Warehouse and Oracle and reporting capabilities in corporate proftability.
Business Intelligence technology; Oracle Application • NEOS BI Framework is leveraging pre-built modules and
Analytics; Oracle E-Business Suite; and Oracle’s PeopleSoft, best practices in all project phases.
Siebel and JD Edwards applications. We deliver location NEOS is helping its clients reach new levels in business
transparent services for on premise as well. excellence. Be one of them.
For more information visit
www.stepaheadsolution.com For more information visit
and www.youtube.com/ www.neos.hr
watch?v=weptOGyjLiE
OracleMagazine
Oracle Magazine
@OracleMagazine
Copyright © 2013, 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.
Middleware Developer BUSINESS ANALYTICS BY MARK RITTMAN 43
moviedemo, which contains a single Hive Intelligence Enterprise Edition 11g (11.1.1.7) an entry that resolves Oracle Big Data
table, which, in turn, maps to a web server is on your organization’s network, you will Lite Virtual Machine to its correct IP
172.16.107.221 bigdatalite.localdomain
bigdatalite
Final Report
Oracle Business Intelligence Enterprise
Edition 11g (11.1.1.7) can report against a
wide range of enterprise datasources and
can bring those datasources together into
a single analysis, with the underlying data
extraction complexity hidden from the
user. Recent releases of Oracle Business
Figure 4: The final analysis, combining Hive and Oracle Database data Intelligence Enterprise Edition 11g intro-
duced the ability to connect to Hadoop as
won’t need this for the example, so return Server. Your repository should then, in a datasource, and using Oracle Big Data
to the CUSTOMER table in the Physical its final state, look like the one shown Lite Virtual Machine is a great way to get
layer, double-click it to edit it, select the in Figure 3. familiar with big data technologies such as
Columns tab, and click Delete to delete Hadoop, HDFS, Hive, and MapReduce.
the ADDRESS_POINT column from that Easy Reporting Against
physical table. Then repeat the process Blended Datasources
of using Ctrl-click and dragging the three You can now open up the Oracle Business
tables into the new business model, Intelligence website and create your first Mark Rittman is an
which should now work for you (without report using data from Hive and Oracle Oracle ACE Director and
returning an error). Database. To do this, navigate to the Oracle cofounder of Rittman
6. Now, within the new business model, Business Intelligence website (for example, Mead, an Oracle Gold
you need to set default aggregation http://localhost:7001/analytics if you Partner based in the UK,
types for the measure columns in the are working with a local VM) and enter with offices in the US,
movieapp_log_stage logical table. To your login credentials, such as weblogic/ India, and Australia. Rittman has worked with
do so, locate the table within the busi- welcome1. Then, from the website menu, do Oracle’s business intelligence, data integration,
ness model, click the + button next to the following to create a sample analysis: and data warehousing products for more than
the table name, and then double-click 1. Select New -> Analysis, and then select 15 years, and he writes for the Rittman Mead
the rating column within it. In the your subject area from the list of subject blog at rittmanmead.com/blog.
Logical Column dialog box, select the areas, which—if you have followed the
Aggregation tab and then choose Avg for previous steps—will be called Movie Next Steps
Default Aggregation Rule. Repeat this Recommendation Analysis.
step once again for the sales column, but 2. With the Criteria tab selected, select the LEARN more about big data
oracle.com/us/technologies/big-data
set its Default Aggregation Rule to Sum, following three subject area columns as
READ more Rittman
and then click OK. the analysis criteria:
Rittman Mead blog
7. Finally, to create a Presentation layer • movieapp_log_stage.rating rittmanmead.com/blog
subject area for this business model, • movieapp_log_stage.sales Oracle Magazine business
click and drag the business model • CUSTOMER.COUNTRY intelligence columns
bit.ly/omagbi
within the Business Model and Mapping and use the Filter menu item for the
layer, drop it into the Presentation layer, CUSTOMER.COUNTRY column to create DOWNLOAD
Oracle Big Data Lite Virtual Machine
and then click Save. Click Yes when the following filter condition: bit.ly/1iofYOV
asked if you want to check the reposi- Oracle Business Intelligence Enterprise
tory for consistency, and then click Yes COUNTRY is equal to / is in Canada; Edition 11g (11.1.1.7)
and OK in the various dialog boxes as Netherlands; United Kingdom bit.ly/1kQW3Ey
the repository is checked in and saved Hive ODBC drivers
bit.ly/1j0mtXX
back to Oracle Business Intelligence 3. Click the Results tab to see the results of
It’s All In
Leverage the in-memory column store in Oracle Database
In-Memory to supercharge database performance—
without changing application code.
a solution to their problems. COL1 COL2 COL3 COL4 CO COL1 COL2 COL3 CO CO
L4 L4 L1
There is a solution, Maria assures them, COL CO
COL1 COL2 COL4 COL1 COL2 COL3 COL4
one that requires neither application code 4 L3
values of these selected columns have been Code Listing 1: Altering the COSTS table to put partitions in memory
extracted from all the rows.
Heli sees the problem immediately. If the alter table costs modify partition COSTS_Q4_2003 inmemory no memcompress
database were able to read the column values priority high;
… script truncated for brevity …
from all the rows immediately instead of
alter table costs modify partition COSTS_1996 inmemory memcompress for
performing the additional tasks of locating capacity high priority none;
the starting points of the rows and then alter table costs modify partition COSTS_1995 inmemory memcompress for
capacity high priority none;
the relative positions of the columns inside
them, the performance would be fantastic.
Precisely, Maria confirms, and that calls for Code Listing 2: Displaying in-memory attributes of the COSTS table
a new design called a column store database,
in which the columns—not the rows—are select partition_name, inmemory_priority,
stored together, as shown in Figure 2. inmemory_distribute, inmemory_compression
from user_tab_partitions
Columns from the rows are stored together
where table_name = 'COSTS'
in a new structure called a column unit (CU). order by partition_position;
The CU is not the same as a data block, she
PARTITION_NAME INMEMORY INMEMORY_DISTRI INMEMORY_COMPRESS
clarifies. The CU can be much bigger than the
———————————————————— ——————————— —————————————————————— ————————————————————————
typical 8 K data block. This special arrange- COSTS_1995 NONE AUTO DISTRIBUTE FOR CAPACITY HIGH
ment of columns enables the query to grab COSTS_1996 NONE AUTO DISTRIBUTE FOR CAPACITY HIGH
COSTS_H1_1997 NONE AUTO DISTRIBUTE FOR CAPACITY HIGH
the values of the selected column from all the
COSTS_H2_1997
rows immediately—without going through COSTS_Q1_1998 NONE AUTO DISTRIBUTE FOR CAPACITY HIGH
the time-consuming task of identifying rows COSTS_Q2_1998 NONE AUTO DISTRIBUTE FOR CAPACITY HIGH
COSTS_Q3_1998 NONE AUTO DISTRIBUTE FOR CAPACITY HIGH
and the columns inside.
COSTS_Q4_1998 NONE AUTO DISTRIBUTE FOR CAPACITY HIGH
John is skeptical. This column-store- COSTS_Q1_1999 NONE AUTO DISTRIBUTE FOR CAPACITY HIGH
database concept is not new. Database COSTS_Q2_1999 NONE AUTO DISTRIBUTE FOR CAPACITY HIGH
COSTS_Q3_1999 NONE AUTO DISTRIBUTE FOR CAPACITY HIGH
vendors have been providing this technology
COSTS_Q4_1999 NONE AUTO DISTRIBUTE FOR CAPACITY HIGH
for years. But we can’t use it, John says, for COSTS_Q1_2000 MEDIUM AUTO DISTRIBUTE FOR CAPACITY HIGH
other types of operations, particularly OLTP. COSTS_Q2_2000 MEDIUM AUTO DISTRIBUTE FOR CAPACITY HIGH
COSTS_Q3_2000 MEDIUM AUTO DISTRIBUTE FOR CAPACITY HIGH
The traditional Oracle Database storage
COSTS_Q4_2000 MEDIUM AUTO DISTRIBUTE FOR CAPACITY HIGH
format, the row store, processes data change COSTS_Q1_2001 HIGH AUTO DISTRIBUTE FOR CAPACITY HIGH
operations most efficiently. So, John con- COSTS_Q2_2001 HIGH AUTO DISTRIBUTE FOR CAPACITY HIGH
COSTS_Q3_2001 HIGH AUTO DISTRIBUTE FOR CAPACITY HIGH
tinues, queries may be faster with a column
COSTS_Q4_2001 HIGH AUTO DISTRIBUTE FOR CAPACITY HIGH
store database, but a row store database is COSTS_Q1_2002 HIGH AUTO DISTRIBUTE FOR CAPACITY LOW
the right choice for OLTP. COSTS_Q2_2002 HIGH AUTO DISTRIBUTE FOR CAPACITY LOW
COSTS_Q3_2002 HIGH AUTO DISTRIBUTE FOR CAPACITY LOW
Why not have it both ways? asks Maria.
COSTS_Q4_2002 HIGH AUTO DISTRIBUTE FOR CAPACITY LOW
The good news is that these two choices COSTS_Q1_2003 CRITICAL AUTO DISTRIBUTE FOR QUERY
need not be mutually exclusive. In Oracle COSTS_Q2_2003 CRITICAL AUTO DISTRIBUTE BASIC
COSTS_Q3_2003 CRITICAL AUTO DISTRIBUTE BASIC
Database 12c Release 2 (12.1.0.2), we have
COSTS_Q4_2003 CRITICAL AUTO DISTRIBUTE BASIC
the option of using both types of stores in
the same database. And, she continues, the
column store exists entirely in memory. The issues this statement to create the in- the overall database size. With Oracle
combination of the column store structure memory column store: Database In-Memory, however, the DBA
and memory residency makes the perfor- can choose specific data to populate the in-
mance of analytical queries soar. alter system set inmemory_size=48g memory column store. Even better, the DBA
scope=spfile; can choose individual partitions of tables
Configuration rather than entire tables. Maria explains
Maria gathers her visitors around her desk This is the only configuration step the basic syntax for putting tables in the in-
to demonstrate how Oracle Database required to enable the column store. This memory column store:
In-Memory works. is not a dynamic operation; the database
The in-memory column store is a new instance needs to be recycled to enable the alter table TableName inmemory;
pool in the system global area (SGA), she new column store.
explains. The DBA decides how much Because the size of this sample column Maria pauses and directs her audience’s
memory to allocate to this new pool and store is only 48 GB, it may be smaller than attention to a very important character-
istic of this process of populating tables Code Listing 3: Checking for segments in the in-memory column store
from disk to the in-memory column store.
The version of the table in the in-memory select partition_name, populate_status, bytes_not_populated “Not_Pop”,
column store is in the new column store bytes, inmemory_size, bytes/inmemory_size comp_ratio
FROM v$im_segments;
format for better performance. On disk,
however, the table continues to be stored in PARTITION_NAME POPULATE_S Not_Pop BYTES INMEMORY_SIZE COMP_RATIO
the traditional row store format. When users ———————————————————— —————————————— —————————— —————————— ——————————————————— ———————————————
COSTS_Q3_2000 COMPLETED 0 8388608 1179648 7.11111111
modify the data in that table, the version of
COSTS_Q4_2001 COMPLETED 0 8388608 1179648 7.11111111
the table in the buffer cache is updated and COSTS_Q1_2001 COMPLETED 0 8388608 1179648 7.11111111
written back to the disk. When the data is COSTS_Q2_2000 COMPLETED 0 8388608 1179648 7.11111111
COSTS_Q3_2001 COMPLETED 0 8388608 1179648 7.11111111
queried, however, the in-memory column
COSTS_Q4_2000 COMPLETED 0 8388608 1179648 7.11111111
store version of the table is used. COSTS_Q1_2000 COMPLETED 0 8388608 1179648 7.11111111
When the INMEMORY attribute is set COSTS_Q2_2001 COMPLETED 0 8388608 1179648 7.11111111
for a segment—a table or a partition—that
segment is automatically loaded into the Code Listing 4: Query for evaluation
in-memory column store. A new background
process, Maria explains—IMCO—coordi-
select /*+ gather_plan_statistics */ PROD_NAME, TIME_ID,
nates the populating of the data. The actual avg(UNIT_PRICE) avg_cost
data populating is done by two new back- from costs c, products p
where p.prod_id = c.prod_id
ground processes—SMCO and Wnnn.
group by PROD_NAME, TIME_ID
John, seeing a potential issue, points out having avg(unit_price) > 1000
that when the table data gets updated, the order by PROD_NAME, TIME_ID;
buffer cache is where the update occurs, so
select * from
the in-memory column store version is no table(dbms_xplan.display_cursor(format=>'TYPICAL'));
longer the most current version of the table.
Doesn’t that make the data access of the
updated table from that column store incor- the MEMCOMPRESS subclause of the help performance but rather takes up valu-
rect? John asks. Not at all, assures Maria. INMEMORY attribute. She reminds everyone able space. Good point, concedes Maria, and
Oracle Database automatically keeps the that this compression is inside the in- continues that the DBA can define a table
in-memory column store transactionally memory column store only; the segment to be in the in-memory column store but
consistent with the row store format in the on the disk is not affected. There are five can also exclude some columns. Different
buffer cache, similar to how an index is kept options for the MEMCOMPRESS subclause— compression levels can also be defined for
transactionally consistent with a table. FOR DML, FOR QUERY LOW (the default), different columns in the column store. Maria
FOR QUERY HIGH, FOR CAPACITY LOW, demonstrates with a table named T1. It is in
In-Memory Options and FOR CAPACITY HIGH—from lowest the in-memory column store, but its columns
Heli raises a good question: what if the to highest compression. The higher the c4 and c5 should not be in the in-memory
total size of all the segments placed in the compression, the less space occupied in the column store. In addition, columns c3 and c2
in-memory column store is more than in-memory column store but the more CPU should be compressed with the CAPACITY
48 GB? “No worries,” Maria responds. Oracle consumed by data accesses. If compres- LOW option whereas the other columns
Database will determine which segments sion is not needed, the DBA can use the NO should be compressed with QUERY LOW
are loaded in what sequence and how long MEMCOMPRESS option. (the default). Maria issues the following SQL
they stay there, based on a priority that can John asks how the in-memory column statement to accomplish all that:
be defined in the ALTER statement with store works with the multiple nodes in an
the PRIORITY subclause of the INMEMORY Oracle Real Application Clusters (Oracle alter table t1 inmemory
attribute. The PRIORITY subclause takes four RAC) database. By default, Maria responds, memcompress for
options—CRITICAL, HIGH, MEDIUM, and the column store is distributed among the capacity low (c2,c3)
NONE. The last option, Maria explains, does caches of all nodes. It also can be duplicated no inmemory (c4,c5);
not populate the segment into the column on all Oracle RAC nodes by use of another
store automatically. That populating occurs clause: DUPLICATE. Case Study
only when someone selects from the table. Heli is impressed, but she has a concern. Every one of Maria’s guests wants to see
In addition, Maria continues, to save Her queries do not select many of the how Oracle Database In-Memory works in
space, a DBA can compress the data columns of a table, so having those columns an actual use case. Maria demonstrates
in the in-memory column store, using in the in-memory column store does not with the SH schema that comes with Oracle
Database. The COSTS table is partitioned Code Listing 5: Execution plan with the in-memory column store
by range—one partition per quarter or, in
the case of very old data, one partition per ————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
half year or per year. Sophie knows that |Id| Operation |Name |Rows |Bytes |Cost(%CPU)|Time |
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
Acme uses something similar to this table
| 0|SELECT STATEMENT | | | | 7 (100)| |
in its major application and that that table |*1| FILTER | | | | | |
is accessed frequently and thus should be a | 2| SORT GROUP BY | | 1799| 84553| 7 (58)|00:00:01|
|*3| HASH JOIN | |82112| 3768K| 4 (25)|00:00:01|
good candidate for the in-memory column
| 4| TABLE ACCESS FULL |PRODUCTS| 72| 2160 | 3 (0)|00:00:01|
store, with some compression to save space. | 5| PARTITION RANGE ALL | |82112| 1363K| 1 (100)|00:00:01|
Sophie also explains that more-recent parti- | 6| TABLE ACCESS INMEMORY FULL |COSTS |82112| 1363K| 1 (100)|00:00:01|
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
tions are queried much more frequently than
older ones. Because the level of compression
affects CPU consumption, Maria makes a Code Listing 6: Execution plan without the in-memory column store
rule: apply lesser levels of compression or
no compression at all for segments that are —————————————————————————————————————————————————————————————————————————————————————————————————————————————————
accessed more frequently—that is, more- |Id|Operation |Name |Rows |Bytes |Cost (%CPU)|Time |
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————
recent partitions. Older partitions, which
| 0|SELECT STATEMENT | | | | 140 (100)| |
are accessed less frequently, can be more |*1| FILTER | | | | | |
aggressively compressed to save space. She | 2| SORT GROUP BY | | 3665| 168K| 140 (3)|00:00:01|
|*3| HASH JOIN | |82112| 3768K| 137 (1)|00:00:01|
also makes a rule that higher priority (the
| 4| TABLE ACCESS FULL |PRODUCTS| 72| 2160 | 3 (0)|00:00:01|
PRIORITY clause) for populating the in- | 5| PARTITION RANGE ALL | |82112| 1363K| 134 (1)|00:00:01|
memory column store should be assigned | 6| TABLE ACCESS FULL |COSTS |82112| 1363K| 134 (1)|00:00:01|
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————
to more-recent partitions, because she
wants them to be loaded sooner and stay
in memory longer. With this set of require- shows the segment amount remaining Next, Maria takes a typical query from
ments in place, Maria alters the COSTS table while the cache is being populated. Acme’s major application, joining the COSTS
by using the SQL shown in Listing 1. • INMEMORY_SIZE: This column shows the table with the PRODUCTS table, which is not
The USER_TABLES view—or the USER_ size of that segment in the in-memory defined to be in memory. Listing 4 shows
TAB_PARTITIONS view for partitioned column store. the query as well as a query on execution
tables—provides in-memory column store • INMEMORY_PRIORITY, INMEMORY_ statistics to demonstrate how well the query
information on the selected table. Three DISTRIBUTE, INMEMORY_ performed. (She uses the SET TIMING ON
new columns in these views— INMEMORY_ COMPRESSION: These columns are the command before running the query to get
PRIORITY, INMEMORY_DISTRIBUTE, priority, Oracle RAC distribution, and the response time.) The query in Listing 4
INMEMORY_COMPRESSION—display the compression attributes of that segment, took 3.64 seconds to execute. Listing 5
priority, the distribution in an Oracle RAC respectively, and they provide the same shows the execution plan. Maria then dis-
database, and the compression type, respec- information as the identically named ables the use of the in-memory column
tively. Maria uses the SQL shown in Listing 2 columns in the USER_TABLES and USER_ store by executing the following SQL:
to get these details for each partition. TAB_PARTITIONS views.
To find out what segments are in the Maria executes the SQL shown in alter session
in-memory column store, Maria queries a Listing 3 to check for the segments in the in- set inmemory_query = disable;
new dynamic performance view—V$IM_ memory column store and how much they
SEGMENTS. She explains some important have been compressed. Heli notes a very Then she executes the Listing 4 query
columns of the view: important fact: not all the partitions are again. This time the query does not use the
• OWNER, SEGMENT_NAME, PARTITION_ visible in the in-memory column store. The in-memory column store and the elapsed
NAME: The column names describe the reason, Maria explains, is simple: the seg- time jumps to 6.99 seconds—a 92 percent
information included there. ments where she has defined the priority to increase! Everyone in Maria’s office wants
• BYTES: This column shows the size of the be NONE are not populated automatically in to know what happened. To answer that
segment on disk. the column store. For example, the priority question, Maria draws their attention to the
• POPULATE_STATUS: This column shows of the COSTS_1995 partition is set to NONE, execution plan of the second query execu-
when the cache is populated from this as shown in Listing 2, so that partition is tion, shown in Listing 6. The two plans are
segment on disk. After populating is com- not yet in the column store. When someone almost identical, except for step 6, “TABLE
plete, this column shows COMPLETE. selects from that partition, the in-memory ACCESS INMEMORY FULL.” The CPU cost is 1
• BYTES_NOT_POPULATED: This column column store will be populated. for the first execution (with the in-memory
column store), Maria observes, but 134 for in-memory column store and then kept impressed, leave the meeting happy and
the second (without the in-memory column there or moved out after the overall per- with a clear action plan. t
store). The CPU had to do extra work to get formance has been checked. For guidance
the data from the buffer cache when the in- on compression, Maria suggests using the
Arup Nanda (arup@
memory column store was not used, hence DBMS_COMPRESSION package to estimate
proligence.com) has
the 92 percent performance penalty. Maria the space savings a segment could have in
been an Oracle DBA
reminds everyone that the performance the in-memory column store.
since 1993, handling
boost demonstrated in Listing 4 came
all aspects of database
purely from the in-memory column store CONCLUSION
administration, from
without code changes or additional indexes. Maria’s visitors want a quick solution to a
performance tuning to security and disaster
Her visitors wonder how to decide which common performance problem but without
recovery. He was Oracle Magazine’s DBA of the
segments are good candidates for the changing code or adding indexes. In this
Year in 2003 and received an Oracle Excellence
in-memory column store. Maria suggests article, Maria solves the problem by marking
Award for Technologist of the Year in 2012.
simple rules: Tables whose entire set of relevant tables to be populated into the in-
rows, even for a few columns, are selected memory column store in Oracle Database
NEXT STEPS
by queries are great candidates for the In-Memory. Oracle Database transparently
new in-memory column store. Tables or gets the data from disk to this store, and
LEARN more about
partitions that participate in OLTP transac- Maria does not need to choose between the Oracle Database In-Memory
tions more than in queries will not benefit two different store technologies—column bit.ly/inmemfeature
bit.ly/inmemdoc
as much, so she advises that they not be and row. She can choose both in the same
put into the in-memory column store. Oracle database and put segments in either DOWNLOAD Oracle Database 12c
bit.ly/databasedownloads
When in doubt, tables can be tested in the store as appropriate. Her visitors, quite
Whatever your needs, AbeTech will help you find the solutions you
need to optimize every aspect of your business. Call us now to see
how our best-in-class service can help your company make the
most of the Oracle experience!
800.478.8644 | www.abetech.com
Oracle Database
Persistence Doesn’t
Always Pay
Sometimes you don’t want a database table and SQL.
Sometimes you just need to collect your thoughts.
PACKAGE meme_tracker
changed to protect the innocent), an up-and- IS
PROCEDURE reset_memes;
coming Web 3.0 paradigm shifter that ana-
lyzes internet memes, tracks them to their FUNCTION already_saw_meme (
sources, and best of all predicts new memes. meme_target_in VARCHAR2, meme_in IN VARCHAR2)
RETURN BOOLEAN;
The developers at extremememe.info are
very knowledgeable about Oracle Database PROCEDURE add_meme (
and PL/SQL, but as is the case with many meme_target_in VARCHAR2, meme_in IN VARCHAR2);
END;
developers, they have little time to explore
new technology. They mostly struggle to keep
up with the demands of their users. And even CREATE TABLE temp_processed_memes Joe looked rather confused, so I took a
when they discover a great new feature, it (meme VARCHAR2(1000) UNIQUE) step back (conceptually) and explained the
can be a challenge to convince management / situation as follows:
to commit the resources to apply the new Without doubt, the general strategy that
feature to stable production code. Then he put together the simple and intui- Oracle Database developers should follow is
As demonstrated in my last article, I tive package specification shown in Listing 1. to do everything they can in SQL. What they
helped the developers at extremememe “Congratulations, Joe,” I told him. “Your cannot do in SQL, they should do in PL/SQL.
.info improve the performance of a critical specification doesn’t have a single comment, And what they cannot do in PL/SQL, they
batch job by applying bulk processing (BULK and it doesn’t need one. You came up with should do in whatever language they are
COLLECT and FORALL). clear, understandable names so that the using to build their user interfaces. (This is a
A week later, I visited extremememe.info code tells its own story. Show me more.” “mantra” created by Tom Kyte and to which I
to see how they were doing. Joe, one of their So Joe showed me the package body (in wholeheartedly subscribe.)
newer developers, pulled me aside to show Listing 2), and then he opened up the script There is, however, a hidden assumption
me a program he’d been working on. he was using (in Listing 3) to test the package in this set of language priorities: the task at
“It’s another batch job,” he explained. “I and demonstrate its intended usage. hand should be well suited to and require
need to keep track of memes that were refer- I asked Joe three questions: SQL. To offer an obvious example, if you
enced in the job, and then avoid processing 1. “Do you always reset the processed need to create a radio group to display on a
those memes again within the job. We’ve also memes table—temp_processed_ web page, you don’t want to use SQL for that.
expanded the memes that we are tracking; memes—before starting the job?” His In the case of the meme_tracker package,
instead of just memes for humans we are also answer: Yes. however, it is code running in the database,
working with memes for dogs, so we have to 2. “Do you ever access the processed implemented in PL/SQL. So why wouldn’t it
keep those two lists separate. I remember memes table after ending the job?” His make sense to use SQL? The prefix “temp” on
you saying that I should do everything I pos- answer: No. the table name pretty well gives it away: Joe
sibly can in SQL, and that I should build APIs 3. “What do you want first—the good decided to use a persistent relational table
with packages, so that’s what I did.” news or the bad news?” Joe asked for the as the container for his processed memes.
And then he showed me. I was most good news. But, in his mind, it was just a temporary table.
impressed with the clarity and readability of “OK, the good news is that you took an Insert the data from the current job, use it
his code, and horrified by his approach. important piece of advice, and you applied it: during the job, and empty the table.
First, he created a table to hold the you used lots of SQL. The bad news, unfortu- No doubt about it, Joe was using the
memes that had already been processed: nately, is also that you used lots of SQL.” table as a container for temporary, session-
specific data. That’s why Joe called it a tem- Code Listing 2: The meme_tracker package body
porary table. Unfortunately, calling it tem-
porary doesn’t make it temporary. When you PACKAGE BODY meme_tracker
execute a CREATE TABLE statement, that IS
PROCEDURE reset_memes
table is permanent (until you drop it), even if
IS
you take all the steps needed to ensure that BEGIN
there is nothing in the table. DELETE FROM temp_processed_memes;
COMMIT;
So what’s wrong with that? If the data
END;
is really only needed within your session,
then you are paying a substantial penalty FUNCTION already_saw_meme (
meme_target_in VARCHAR2, meme_in IN VARCHAR2)
in performance to read and write tables.
RETURN BOOLEAN
Plus, you have created a database object IS
that is not needed: unnecessary “noise” in BEGIN
SELECT 'x' INTO l_dummy
your schema. Finally, this could create sub-
FROM temp_processed_memes
stantial confusion in the future when other WHERE meme = meme_target_in || '-' || meme_in;
developers need to work with this package RETURN TRUE;
EXCEPTION WHEN NO_DATA_FOUND THEN RETURN FALSE;
and try to figure out where and how this
END;
table is used besides this one process.
PROCEDURE add_meme (meme_target_in VARCHAR2, meme_in IN VARCHAR2)
IS
Use a Different Kind of Table
BEGIN
“If I don’t use SQL and don’t use a database INSERT INTO temp_processed_memes (meme) VALUES (
table, how am I supposed to keep track of meme_target_in || '-' || meme_in);
COMMIT;
my memes?” asked Joe.
EXCEPTION WHEN DUP_VAL_ON_INDEX THEN NULL;
“Simple,” I replied. “Use a different kind END;
of table.” END;
I imagine some readers are now thinking:
well, of course. Use a global temporary Code Listing 3: Test/demonstration script for meme_tracker package
table. That way the data in the table will
not persist past the session. It’s true that a
BEGIN
global temporary table would address a part meme_tracker.reset_memes;
of the problem with Joe’s approach. But it meme_tracker.add_meme ('DOG', 'CAT');
meme_tracker.add_meme ('HUMAN', 'CAT VIDEO');
still relies on SQL when it is not needed, and
meme_tracker.add_meme ('HUMAN', 'HONEY BOO BOO');
it still will not offer the best performance for
in-session data. IF meme_tracker.already_saw_meme ('DOG', 'CAT')
THEN
No, for this kind of situation, Joe should
DBMS_OUTPUT.PUT_LINE ('DOG-CAT-FOUND');
take a look at PL/SQL-specific tables, other- END IF;
wise known as collections. PL/SQL developers
IF NOT meme_tracker.already_saw_meme ('DOG', 'CAT VIDEO')
can declare, populate, and work with data in
THEN
a collection entirely within PL/SQL. That data DBMS_OUTPUT.PUT_LINE ('DOG-CAT VIDEO-NOT FOUND');
exists only for the duration of the session, END IF;
END;
and it is much faster to read/write collections
than it is to read/write relational tables.
I pointed to one more concern I had about For a relational table, this means having to change the package specification and
Joe’s meme_tracker package approach. His two columns (and in many cases, two tables). body. If other developers have already been
package subprograms accept a meme target In the case of collections, you can instead making calls to subprograms in a package,
and a meme, but his table includes just a take advantage of a very nifty feature: nested you have a responsibility to those devel-
single meme column. Joe concatenates the collections, or collections within collections. opers to make sure that all existing invoca-
two values with a dash as a separator. But tions remain valid.
what if a meme or meme target contains a Backward-Compatibility Concerns In the case of the meme_tracker package,
dash? Joe could add rules and code to ensure Before reimplementing an existing piece I will be changing the way Joe implemented
that this doesn’t happen, but it would make of code, you should always check to see the data structures used to support the
much more sense to build these two distinct where and how it is being used. If it is not package API. Because Joe had already
pieces of data into the design. yet in use, then you have complete freedom broken out the meme target from the meme
in his parameter lists, it shouldn’t be neces- Code Listing 4: meme_tracker package body reimplemented
sary to make any changes to the specifica-
tion. All existing invocations, therefore, will PACKAGE BODY meme_tracker
not be affected. IS
SUBTYPE meme_target_t IS VARCHAR2(100);
SUBTYPE meme_t IS VARCHAR2(1000);
Collections in the Package Body c_was_processed CONSTANT BOOLEAN := TRUE;
When I am done with the meme_tracker
TYPE memes_for_target_t IS TABLE OF BOOLEAN
package rewrite, I will no longer need the
INDEX BY meme_t;
temp_processed_memes table. But I don’t TYPE processed_memes_t IS TABLE OF memes_for_target_t
want to drop it until the rewrite is complete, INDEX BY meme_target_t;
g_processed_memes processed_memes_t;
because it would disrupt existing users.
So let’s begin the rewrite by removing all PROCEDURE reset_memes
references to that table! IS
BEGIN
Listing 4 contains the reimplementation
g_processed_memes.DELETE;
of the meme_tracker package body. END;
Defining the collections. Collections are
FUNCTION already_saw_meme (
data structures, just like relational tables. I
meme_target_in VARCHAR2, meme_in IN VARCHAR2)
have learned over the years, mostly through RETURN BOOLEAN
painful lessons (that is, mistakes), that if IS
BEGIN
I don’t get the design of my tables right,
RETURN g_processed_memes
the resulting coding exercise is much more (meme_target_in)
difficult. Conversely, if I do take the time (meme_in) = c_was_processed;
EXCEPTION
to think through my table design, I end up
/* PL/SQL raises NDF if you try to "read" a collection
writing a much smaller amount of much element that does not exist */
more intuitive code. The same holds true WHEN NO_DATA_FOUND THEN RETURN FALSE;
END;
with collections.
And when you are working with nested PROCEDURE add_meme (
collections, sorting out the structures can be meme_target_in VARCHAR2, meme_in IN VARCHAR2)
IS
tricky. In this regard, I have two suggestions:
BEGIN
1. Use subtypes to give names to all g_processed_memes (meme_target_in)(meme_in)
application-specific data with which you := c_was_processed;
END;
will be working.
END;
2. Employ the same data design tech-
niques with collections as you would
with tables. 1 SUBTYPE meme_target_t IS I need to indicate that a meme has been
Here is the code I wrote in the new VARCHAR2(100); processed, so I create a constant to hold
meme_tracker package body (in Listing 4) to that indicator value. As you will see in a
define my collections: I declare my first subtype, which is later section, neither the value nor its type
nothing more than an alias for an existing or matters; I could have declared this constant
1 SUBTYPE meme_target_t IS base type. In this case, I am simply “hiding” (and the following collection type) to be
VARCHAR2(100); the fact that a meme target is a string with a DATE or NUMBER.
2 SUBTYPE meme_t IS VARCHAR2(1000); maximum size of 100 characters. You might
3 c_was_processed ask: Why bother? And the answer lies in lines 4 TYPE memes_for_target_t IS
CONSTANT BOOLEAN := TRUE; 4 through 7. TABLE OF BOOLEAN
4 TYPE memes_for_target_t IS 5 INDEX BY meme_t;
TABLE OF BOOLEAN 2 SUBTYPE meme_t IS VARCHAR2(1000);
5 INDEX BY meme_t; My first collection type declaration! It’s
6 TYPE processed_memes_t IS I declare another subtype, this time a list of TRUE-FALSE values: has a meme
TABLE OF memes_for_target_t “hiding” the fact that a meme is a string been processed or not? But which meme?
7 INDEX BY meme_target_t; with a maximum size of 1,000 characters. The INDEX BY clause of the type declaration
8 g_processed_memes processed_memes_t; gives me the answer: elements in collec-
3 c_was_processed tions of this type are indexed by the name
Let’s take the code one line at a time. CONSTANT BOOLEAN := TRUE; of the meme.
When I showed Joe these declarations, collection is a collection of type memes_for_ g_processed_memes
he was surprised by that INDEX BY clause. target_t. Not only that, this new collection (meme_target_in)(meme_in)
“I thought you could only index by PLS_ type is indexed by the meme target, as you := c_was_processed;
INTEGER with collections,” he said. “It looks can see by my use of the appropriate subtype END;
you are indexing by string—indirectly.” (meme_target_t ) in the INDEX BY clause.
Joe is right: my INDEX BY clause uses a If you are new to nested collections, the
SUBTYPE that’s based on a VARCHAR2 dec- 8 g_processed_memes processed_memes_t; syntax in this procedure may look quite odd.
laration. And that’s not only perfectly valid So let’s parse the add_meme procedure,
but highly efficient, at least for relatively And, finally, I declare the actual collec- step-by-step:
small strings (less than 100 characters or so). tion variable that will hold all my lists of 1. g_processed_memes is the identifier
I took this approach for two reasons: processed memes. I define it at the package that “points” to the collection.
1. A collection declared using this type is level, rather than inside any particular 2. (meme_target_in) is the index value of
indexed by a string, not an integer (the packaged subprogram, which means that a single element in g_processed_names.
usual way that collections in PL/SQL the state of that collection will persist in But, remember, each element is actually
and arrays are indexed). This means that my session in between calls to the subpro- a collection in its own right: a list of pro-
once I have the meme, I can very quickly grams. It is, in essence, a global variable that cessed memes for a given target.
and easily find out if it is in the collection can be referenced only inside the package 3. (meme_in) is the index value of a single
and therefore has been processed. body, and so I use the “g_” prefix. element in g_processed_names (meme_
2. I use the subtype to make my code self- My collection design is complete. Now target_in). Each element in this collec-
documenting. Without the subtype, I it's time to implement the subprograms and tion is the name of a meme.
would have needed to add a comment if I test the results. 4. c_was_processed is the value assigned
had any hope of a person understanding Resetting the processed memes. In the to the list of processed memes. At first
the significance of the INDEX BY clause: original SQL-based implementation of the glance, this might seem a little odd.
meme_tracker package, Joe dropped all the I always assign the same value to the
/* Indexing by the meme */ rows in the table and then committed that collection? Then how do I know which
TYPE memes_for_target_t IS transaction. (And, by the way, the commit meme has been processed? By looking
TABLE OF BOOLEAN and rollback in that original implementation at the index value, which is the name of
INDEX BY VARCHAR2(1000); were completely unnecessary, because the the meme.
rows were being used only in that session.) That’s why it doesn’t matter what value
Comments have their place in code, and With the reset_memes procedure in my I use to add each new collection element—I
they should certainly be used to explain collection implementation, I simply use the need and care only about the index value.
complex algorithms. I always prefer, DELETE method: a procedure that is defined Checking for a processed meme. It doesn’t
however, to let the code speak for itself—tell for all collections and is invoked by attaching take much code to determine if a meme has
its own story—and the subtype can play an it to the collection name with dot notation. already been processed, when using a nested
oversize role (compared to the simplicity of collection. For reference, here is the header
the feature itself) in this storytelling. PROCEDURE reset_memes of the already_saw_meme function from the
So I have a collection (or list) of memes. IS meme_tracker procedure specification:
Am I ready to write my subprograms now? No. BEGIN
My memes are categorized by their “target” g_processed_memes.DELETE; FUNCTION already_saw_meme (
(HUMAN or DOG). I don’t see any evidence of END; meme_target_in VARCHAR2,
a target in that collection declaration. meme_in IN VARCHAR2)
Does this mean I am going to concatenate Adding a processed meme. To indicate that RETURN BOOLEAN
the target to the meme, separating them with a meme has been processed, I need to add it
a colon? I suppose I could, but that would to the list of memes for the specified target. Before I show you the new implementa-
be ugly and error prone. Instead, I place this Again, because of my careful collection tion, let’s review the three scenarios I need
meme collection inside another collection. design, I get the job done with a minimum to handle in the function:
of code in the meme_tracker package body: 1. The combination of meme target and
6 TYPE processed_memes_t IS meme passed to the function is defined
TABLE OF memes_for_target_t PROCEDURE add_meme ( in the collection.
7 INDEX BY meme_target_t; meme_target_in VARCHAR2, 2. No meme with the specified target
meme_in IN VARCHAR2) (meme_target_in) has yet been processed.
My second collection type declaration is IS 3. At least one meme with the specified
the “outer” collection. Each element in this BEGIN meme target has been processed, but
not the meme passed to already_saw_ results in a NO_DATA_FOUND exception is to stop relying on relational tables and
meme in the current call to the function being raised. SQL, and instead write programs that
(meme_in). If scenario 3 is true, g_processed_ use collections.”
For scenario 1, the function will find a memes(meme_target_in) identifies an A part of me wanted to howl in frustra-
defined element and can return TRUE. element in the outer collection, but g_ tion. But I stayed calm and reminded myself
For scenario 2, there will not be an processed_memes(meme_target_in) that any lack of comprehension by Joe is my
element in g_processed_memes for that (meme_in) remains undefined and so fault, not his.
meme target, and therefore certainly no PL/SQL raises the NO_DATA_FOUND excep- “May I suggest a slight modification to
element in g_processed_memes (meme_ tion. In both cases, this meme has not yet that lesson?” Joe nodded. I summed it up
target_in) for the meme_in value. been processed, so FALSE is returned. as follows:
For scenario 3, there will be an element in And that’s the reimplemented meme_ “Use the right tool for the right job. We
g_processed_memes for that meme target, tracker package. programmers are paid to solve problems,
but no index value in g_processed_memes After I finished showing it to Joe, I could not to come up with the most elegant SQL
(meme_target_in) for the meme_in value. see him wrestling with the fact that such a statement or the coolest PL/SQL algorithm.”
Now I am ready for the function body: small amount of relatively trivial code could SQL is an incredibly powerful and effi-
do so much. The elegance of the code is, cient data manipulation language, and it is
BEGIN however, a direct consequence of my up- also optimized to move data in and out of
RETURN g_processed_memes front analysis and the resulting decision to relational tables, providing full ACID (atom-
(meme_target_in) use nested collections and string indexing. icity, consistency, isolation, durability)
(meme_in) = support. You should take full advantage of
c_was_processed; But Is It Faster? SQL, but also recognize that there is a price
EXCEPTION Both implementations of the meme_tracker to be paid for all that functionality.
WHEN NO_DATA_FOUND package (SQL-based and collection-based) If you have a requirement that does not
THEN RETURN FALSE; require a small amount of code. Furthermore, need the full power of SQL, such as manipu-
END; the collection implementation is likely to be lation of data that is created and discarded
a bit more difficult for someone unfamiliar entirely within your session, PL/SQL offers
The RETURN statement takes care of sce- with collections to understand, compared to alternatives that are faster.
nario 1: the left side of the Boolean equality the SQL solution. So why use collections for
expression repeats the same construct used this requirement? Steven Feuerstein
to record the meme as processed: You do not need SQL, because the data (steven.feuerstein@
does not need to persist beyond the duration oracle.com) is an
g_processed_memes of the job. Yet you pay a price in performance architect for Oracle,
(meme_target_in) for using SQL. That may come as a surprise, specializing in PL/SQL.
(meme_in) because Oracle Database so thoroughly opti- His books, including
mizes the performance of SQL statements. Oracle PL/SQL Programming, and more
The right side references the same value No matter how much SQL performance than a thousand PL/SQL quizzes at PL/SQL
I used to define that element in the nested is optimized, however, there are a certain Challenge (plsqlchallenge.com) provide in-depth
collection: c_was_processed. number of CPU cycles that must be consumed resources for PL/SQL developers.
The EXCEPTION section handles both to use SQL from PL/SQL.
scenarios 2 and 3. It might seem odd to see I put together a script to compare the Next Steps
a handler for NO_DATA_FOUND when there performance of the original SQL and collec-
is no SELECT-INTO in the body of the func- tion implementations of the meme_tracker READ Oracle-hosted online article content
tion. It makes perfect sense, however, when package (meme_tracker.sql, available at bit.ly/plsqlnest
you know that the PL/SQL runtime engine bit.ly/1mLLesO); the results are shown READ more Feuerstein
bit.ly/omagplsql
raises this same exception when you try to in Table 1, available in the Oracle-hosted
READ more about PL/SQL
“read” an element in a collection that has version of this article at bit.ly/plsqlnest,
oracle.com/plsql
not been defined. along with information on why the col-
DOWNLOAD
So if scenario 2 is true, there is no lection implementation is faster and this Oracle Database 12c
element defined in g_processed_memes for issue's PL/SQL Challenge. bit.ly/databasedownloads
index value meme_target_in, and this code meme_tracker.sql
Use SQL Before PL/SQL—But . . . bit.ly/1mLLesO
g_processed_memes “So,” said Joe, after all was said and done, TEST your PL/SQL knowledge
plsqlchallenge.com
(meme_target_in) “the lesson I have learned from this rewrite
Oracle Database
On Implicit Conversions
and More
Our technologist looks at implicit conversions, logic
bombs, SQL injection, and reduced access paths—in one
question and answer.
22 end; RR format, you present the century and the behavior of your code. I have seen this
23 / the year in a date converted into a string happen hundreds, if not thousands, of times
with just the year component. So 1812 in my career.
Procedure created. will become simply 12. Later, when you So, what potential “fix” could you put
convert it back to a date with DD-MON-RR, in place? One quick one would be to use
Line 10 of this code is the culprit here. It you’ll take that two-character year and explicit conversions and explicit date masks.
has not one but two implicit conversions. look at what the current year is. Using the If the developer’s goal was to have the date
The code in line 10 is equivalent to rules documented in Oracle Database SQL be the full YYYY (enabling you to search for
Language Reference (at bit.ly/1mbT8N9), 1812, 1912, 2012, and so on whenever you
10 where created = the string “12” will be converted to the want to), then explicitly code it:
TO_DATE(''' || century and year 2012, because this article
TO_CHAR(p_date) ||''')'; was written in 2014. (If I’d written this 10 where created = TO_DATE(''' ||
article in 1949, it would have returned 1912. TO_CHAR(trunc( p_date, 'd'),
When I concatenate the P_DATE variable If I were to write this article in the future, 'dd-mm-yyyy' ) ) ||''',
with a VARCHAR2 variable, it must be con- in 2050, it would return 2112). The very ''dd-mm-yyyy'' )';
verted from a DATE datatype to a VARCHAR2 passage of time affects, by default, what
datatype, and that is done by implicitly data your application returns! This is a By using the TRUNC( p_date, ‘d’ ) func-
applying TO_CHAR —using the default NLS_ logic bomb just waiting to happen. tion, you explicitly remove the time com-
DATE_FORMAT for the current session—to The other part of the logic bomb is that, ponent. By explicitly using the DD-MM-
the P_DATE variable. by default, the time component is stripped YYYY format in the TO_CHAR call, you
Later, when the query is executed, it off. I specified “13:00:00” in my date save just the day, the month, and the full
compares the CREATED database column, input to the procedure. With the default year (including the century). Later, in the
which is a DATE column, with the string pro- NLS_DATE_FORMAT, that time component TO_DATE call, you use the same format to
duced by the TO_CHAR implicit conversion. is stripped away. reconstitute your date. Now it no longer
To make that possible, the string returned I have encountered developers who say matters what NLS_DATE_FORMAT might be
by the TO_CHAR function must be converted “we want the date to be a sliding date based set in your database—your code will execute
back into a date with the default NLS_DATE_ on the current year, and we want the time in a known manner, regardless. You are no
FORMAT setting once again. component stripped off.” To them I say longer subject to external changes. Your
“great, perfect; then write that code—be code is stable, predictable, and free of the
Logic Bombs and Default Settings explicit.” The reason? A simple change by a logic bomb.
Think about the logic bombs inherent DBA at some point in the future will change But is this the right way? Is it the correct
in such an approach. By default, the the default behavior the developers are approach? Probably not, because there is
NLS_DATE_FORMAT in a database is implicitly relying on. That is, the code works a way to completely avoid the conversions
DD-MON-RR. If I were to pass a date such today—by accident—but breaks tomorrow altogether. You have a date input, you have
as TO_DATE( ’18-JUN-1812 13:00:00’, because a default has changed. For example, a date column, and there should be no need
‘DD-MON-YYYY HH24:MI:SS’ ), what date the application might have been developed to convert the date to a string and back into
would I be searching for in the above query? in Europe, where displaying the date as day- a date. You can—and should—achieve this
Would it be the 18th of June, 1812, at 1 p.m.? month-year is the standard. Now the same easily by using bind variables:
Almost certainly not, but it could be! That is application is to be deployed in the US,
the disturbing part: You cannot answer the where the standard date display is month- 7 l_query := '
question I just posed. No matter what you day-year. So, to accommodate that change, 8 select *
answer, I’ll say you are wrong and prove it. the DBA changes the NLS_DATE_FORMAT to 9 from all_users
By default, in a “normal” Oracle data- MM/DD/YYYY. Now that you are no longer 10 where created = :x';
base with default settings, searching with using the RR format, the full year is pre- 11
the date TO_DATE( ’18-JUN-1812 13:00:00’, served and the behavior of the application 12 dbms_output.put_line( l_query );
‘DD-MON-YYYY HH24:MI:SS’ ) will search changes over time. Or perhaps the default 13 open c for l_query
for the 18th of June, 2012. And it will con- NLS_DATE_FORMAT is changed to MM/DD/ using trunc(p_date,'d');
tinue to do that for a few more years, at YYYY HH24. Now, all of a sudden, a portion
which point the code will start searching of the time is preserved and the outcome of If you bind in the date, you will be com-
for the 18th of June, 2112 (all by itself, your application changes. paring a date with a date. There are no
without a change in a line of code!). That is This is the nightmare that is reliance on conversions, and there is no chance of a loss
because the default NLS_DATE_FORMAT default implicit conversions. An external of information (as there can be with the RR
currently is DD-MON-RR. By using the change can and will affect you; it will change date format). Less work is performed by the
code overall (so this is more performant). In OPS$TKYTE is the owner of the INJ SQL> exec ops$tkyte.inj(sysdate)
my experience, this is the correct solution: stored procedure. By default, if someone
avoid the logic bomb, avoid doing as much else ran the INJ procedure in a “normal” select *
work, and avoid some other nasty surprises Oracle database with all default settings, from all_users
I’ll talk about in a moment. that user—user A in this example—would where created = '06-jun-2014' or 1=1--’
expect to see FB_DEMO.....
SQL Injection Issues BIG_TABLE.....
Many years ago, in the January/February SQL> create user a identified by a; SCOTT.....
2005 issue of Oracle Magazine (bit.ly/ User created. B.....
tkinject), I wrote about the issue of SQL CLONEDEV.....
injection in code. The problem of SQL injec- SQL> grant create session to a;
tion is just as rampant today in 2014 as it Grant succeeded. PL/SQL procedure successfully completed.
was almost a decade ago—if anything, it is
worse today than a decade ago, with many SQL> grant execute on inj to a; Notice how different the resultant SQL text
major attacks against websites and data- Grant succeeded. is. It now shows all the rows in that table—not
bases involving SQL injection. Therefore, it just the rows matching some date input. You
is paramount to protect yourself from SQL SQL> connect a/a might say, “That is OK; the user is allowed to
injection vulnerabilities wherever possible. Connected. see that table,” but what about this:
If you consider the original INJ procedure
code, the one with the double implicit con- SQL> exec ops$tkyte.inj(sysdate) SQL> alter session set
version, you’ll find a major SQL injection flaw 2 nls_date_format = '''"union all
in it. Study that code, and see if you can find select * select ename,0,null from emp_t"--';
it before reading further. There is a very high from all_users Session altered.
probability that the vast majority of readers where created = '06-JUN-14'
will not be able to express how the code PL/SQL procedure successfully completed. SQL> select sysdate from dual;
is “SQL-injectable.” Therein lies a serious
problem. If you can look at a piece of code That is a well-formed query. SYSDATE SYSDATE
you know is SQL-injectable (I’ve told you it is) has been converted into a sensible string ———————————————————————————————————————————————————————————————
and you cannot tell why it is SQL-injectable, and can be converted back into a date to 'union all select ename,0,null
how can you write code that is free from be compared with the CREATED column. from emp_t-—’
SQL injection? I’ll give you a method for But what if user A changes the NLS_DATE_
writing code that cannot be SQL-injected in FORMAT? (Note: You need no privileges to That looks interesting. If OPS$TKYTE,
a moment, but let’s look at the INJ stored change the NLS_DATE_FORMAT. Every user the owner of the INJ stored procedure, has
procedure first and discover how to exploit it. who can connect to the database can do a table called EMP_T, the following should
If there is a user who has CREATE this). Perhaps the user can also change the query it and I might be able to see the data:
SESSION privileges in your database and meaning of the SQL statement. For example,
EXECUTE privileges on the INJ stored SQL> select * from ops$tkyte.emp_t;
procedure, that user will have read access SQL> alter session set select * from ops$tkyte.emp_t
to virtually every object the owner of that 2 nls_date_format = *
procedure has read access to. That is 'dd-mon-yyyy"'' or 1=1 --'; ERROR at line 1:
right—a user with just CREATE SESSION Session altered. ORA-00942: table or view does not exist
privileges and the ability to execute that
procedure can read any table the owner of SQL> select sysdate from dual; SQL> exec ops$tkyte.inj(sysdate)
that procedure can read. That is a pretty
big security hole (and it gets worse: if the SYSDATE select *
user also has CREATE PROCEDURE privi- —————————————————————————————— from all_users
leges in that database, the user can use 06-jun-2014' or 1=1 – where created = ''union all
that procedure to do anything the owner of select ename,0,null from emp_t--'
that procedure can do!). All of a sudden, the default conversion SCOTT.....
So how does someone exploit this of SYSDATE no longer results in anything ALLEN.....
SQL injection flaw? Easy. It’s just a resembling a date. It now looks a bit like JONES.....
matter of playing around with the default SQL! I (user A) run the buggy INJ stored pro- BLAKE.....
NLS_DATE_FORMAT. cedure again: CLARK.....
PL/SQL procedure successfully completed. Code Listing 1: Procedure P, with implicit conversion and compilation warnings
The first query shows that I (user A) do SQL> alter session set plsql_warnings='enable:all';
not have access to OPS$TKYTE.EMP_T, so
SQL> create or replace procedure p authid definer
I cannot select from it. However, I can trick
2 as
the stored procedure owned by OPS$TKYTE, 3 l_rec t%rowtype;
who does have access, to show it to me. 4 l_key number := 5;
5 begin
Using UNION, I can see anything I want that
6 select * into l_rec from t where x = l_key;
OPS$TKYTE can see. If I don’t know what 7 for x in (select plan_table_output
else OPS$TKYTE can see, I can add UNION 8 from TABLE( dbms_xplan.display_cursor()))
9 loop
to a query against the dictionary views to
10 dbms_output.put_line( x.plan_table_output );
see what is available: 11 end loop;
12 end;
13 /
SQL> alter session set
SP2-0804: Procedure created with compilation warnings
2 nls_date_format = '''"union all
select tname,0,null from tab"--';
Session altered. Code Listing 2: Execution of P, with full table scan
constraint t_pk primary key, Code Listing 3: Revised procedure P, with no compilation warnings
3 y varchar2(30)
4 ); SQL> create or replace procedure p authid definer
Table created. 2 as
3 l_rec t%rowtype;
4 l_key varchar2(5) := '5';
SQL> insert into t 5 begin
2 select user_id, username 6 select * into l_rec from t where x = l_key;
7 for x in (select plan_table_output
3 from all_users;
8 from TABLE( dbms_xplan.display_cursor()))
47 rows created. 9 loop
10 dbms_output.put_line( x.plan_table_output );
11 end loop;
SQL> commit;
12 end;
Commit complete. 13 /
Procedure created.
Table T has a primary key; column X is
SQL> show errors
that primary key, and it is a VARCHAR2. No errors.
However, the application that places data
into table T puts only numbers in there.
Code Listing 4: Execution of revised P, with index unique scan
So, even though T.X is a VARCHAR2, the
only thing end users and developers see is
SQL> exec p
numbers. As far as they are concerned, T.X
is a number. So, when they query it, they SQL_ID 18796jgha0hwz, child number 1
tend to use a number as an input. This will, ———————————————————————————————————————————————————————
SELECT * FROM T WHERE X = :B1
of course, cause an implicit conversion, and
you can easily see this in action. Let’s use Plan hash value: 1303508680
a small stored procedure P, which queries —————————————————————————————————————————————————————————————————————————————
| Id | Operation | Name | Rows |
table T, as shown in Listing 1.
—————————————————————————————————————————————————————————————————————————————
This simple procedure queries table T, | 0 | SELECT STATEMENT | | |
but it uses NUMBER (L_KEY) to compare | 1 | TABLE ACCESS BY INDEX ROWID| T | 1 |
|* 2 | INDEX UNIQUE SCAN | T_PK | 1 |
the VARCHAR2 column T.X values. This will
—————————————————————————————————————————————————————————————————————————————
cause an implicit conversion, but it is not
readily apparent in the code. That is why I Predicate Information (identified by operation id):
—————————————————————————————————————————————————————————————————————————————
enabled PL/SQL warnings (a feature of
2 - access("X"=:B1)
PL/SQL since Oracle Database 10g), and
the PL/SQL warning facility will actually
alert me to these evil implicit conversions: my predicate is “WHERE X = :B1” and X is P and the expected plan is used, with the
the primary key. I would typically expect to expected index unique scan.
SQL> show errors see an index unique scan to retrieve this
Errors for PROCEDURE P: data, but the predicate information section Back to the Beginning
of the plan report shows what the issue is. And that is a very long answer to the original
LINE/COL ERROR The true predicate is “TO_NUMBER(“X”) = question. Here is the original query plan:
—————————— ————————————————————————————————————————— :B1”—not just “X = :B1”. The implicit con-
6/42 PLW-07204: conversion away version leaps into view. That implicit con- SQL> DELETE
from column type may result version negates the use of the index on T.X 2 FROM OAUTH2_REFRESH_TOKEN
in sub-optimal query plan to access the data. The index is on T.X, not 3 WHERE "ID"=
on TO_NUMBER(T.X). '8A81B295444C2881014452803709648E'
PL/SQL is warning me that on line 6 If I modify the procedure to compare 4 /
(“WHERE x = l_key”), I have an implicit con- strings with strings (as I should!), I will see 1 row deleted.
version issue. That this fact can easily something completely different, as shown —————————————————————————————————————————————————————————————
be pointed out is a great bonus of using in Listing 3. |Id| Operation | Name |
PL/SQL. Before I look at solutions, let’s run The first thing to notice in Listing 3 is —————————————————————————————————————————————————————————————
the procedure as is, as shown in Listing 2. that there are no warnings at all—the code | 0| DELETE STATEMENT| |
Notice that I am performing a full scan compiles cleanly. But even better, the code | 1| DELETE | OAUTH2_REFRESH..|
of table T, which is unexpected, because in Listing 4 executes the updated procedure |*2| INDEX FULL SCAN| SYS_C00203982 |
Predicate Information sion being applied to the ID column, and Next Steps
(identified by operation id): they can do that by
——————————————————————————————————————————————————— 1. Using WHERE “ID” = hextoraw(‘8A81B29 ASK Tom
2 - filter(RAWTOHEX("ID")= 5444C2881014452803709648E’ ) or Tom Kyte answers your most difficult technology
questions. Highlights from that forum appear in
'8A81B295444C2881014452803709648E') 2. Binding a RAW(16) instead of binding this column.
a VARCHAR2(32), which is the correct asktom.oracle.com
Recall that ID is a primary key and a approach (use bind variables!) or FOLLOW Tom on Twitter
RAW(16). I would expect “WHERE ID = 3. Binding a VARCHAR2(32) but wrapping @OracleAskTom
:x” to use an index unique scan—not an the bind in a HEXTORAW call, such as READ more Tom
bit.ly/omagasktom
index full scan—but it doesn’t. And the WHERE ID = hextoraw(:x)
READ more about
reason it doesn’t use an index unique scan SQL injection
stands out in the predicate information bit.ly/tkinject
section. An implicit conversion is being bit.ly/tkbinject
applied to the ID column, because ID is a Tom Kyte is a database EXPLORE
Oracle Learning Library
RAW(16) and you are comparing it with a evangelist in Oracle’s oracle.com/goto/oll
VARCHAR2(32). You are forced to implicitly Server Technologies DOWNLOAD Oracle Database 12c
convert the RAW(16) to a VARCHAR2(32). division and has worked bit.ly/databasedownloads
That implicit conversion negates the use for Oracle since 1993. He LEARN more about
of the index! is the author of Expert Oracle Database 12c
oracle.com/database
The solution for the performance issue Oracle Database Architecture (Apress, 2005,
FOLLOW Oracle Database on Twitter
lies in the application. The application 2010) and Effective Oracle by Design (Oracle @oracledatabase
developers should avoid the implicit conver- Press, 2003), among other books.
cybernoor.com 925.924.0400
into it. Answer D is incorrect because all B. A CDB can contain multiple seed PDBs. defined current container that it can access.
PDBs plugged into a CDB share the Oracle C. A CDB can share a database instance Which statement explains how the root
metadata that is stored in the CDB. Answer E with a non-CDB. container, CDB$ROOT, differs from a PDB?
is incorrect because the Oracle Multitenant D. A CDB cannot exist without a root A. CDB$ROOT contains only the Oracle
option is compatible with and complements container. system metadata, whereas a PDB con-
both Oracle Real Application Clusters and E. A CDB can have PDBs that have a user tains metadata from the CDB into which
Oracle Active Data Guard. with the same username across the PDBs. it is plugged and application metadata.
The correct answers are D and E. The B. CDB$ROOT contains both Oracle system
Multitenant Architecture minimal contents of a CDB are the root con- metadata and application metadata,
In the multitenant architecture, a container is tainer CDB$ROOT and PDB$SEED. Because whereas a PDB contains only user-
a collection of schemas, objects, and related PDBs exist in isolation from one another, defined data.
structures. A container appears to be a logi- users and objects with the same names can C. CDB$ROOT contains all the Oracle
cally separate, independent database. Each be stored within each PDB. system metadata and a part of the
container in a CDB has a unique ID and name. Answer A is incorrect because a CDB can application metadata, whereas a PDB
A container is classified either as a PDB contain zero PDBs. Answer B is incorrect contains all application metadata
or root container (also called the root). The because a CDB can have only a single seed along with the user-defined data for
root is a collection of schemas, schema PDB, which cannot be modified and exists that application.
objects, and nonschema objects to which as a template for the creation of new PDBs. D. CDB$ROOT contains only the Oracle
all PDBs belong. The root does not store Answer C is incorrect because although system metadata, whereas a PDB con-
any user data. both a CDB and a non-CDB can exist on the tains all application metadata and the
A CDB has a single set of background same server, they function as independent user-defined data for that application.
processes and SGA that is used by all PDBs entities because of their architectural dif- The correct answer is D. The root contains
plugged into that CDB. A database instance ferences. A CDB shares a set of background metadata only for the Oracle system and is
is associated with a single CDB. A data- processes and SGA with its PDBs, but a a metadatabase with no user-defined data.
base instance cannot be shared between a non-CDB requires a nonsharable set of A PDB is typically created for an application
non-CDB and CDB. background processes and SGA. and therefore contains that application’s
Every CDB has the following containers: metadata and user-defined data. PDBs
• One root container, called CDB$ROOT, Horizontal Partitioning of the access required Oracle system metadata
that stores Oracle-supplied metadata and Oracle Data Dictionary from the CDB that they are plugged into.
common users (database users known in Horizontal partitioning of the Oracle data
every container belonging to that CDB). dictionary is at the heart of the multitenant Conclusion
• One seed PDB, called PDB$SEED—a architecture. This is a conceptual parti- Enterprise database consolidation leads to
system-supplied template that the CDB tioning, not a physical table partitioning. greater scalability and improved resource
can use to create new PDBs. The seed PDB The CDB$ROOT root container contains utilization, which reduce server and storage
cannot be modified. a set of tablespaces and their data files, hardware costs while increasing application
• Zero or more PDBs. which implement the data dictionary tables availability. The Oracle Database 12c multi–
A PDB is a user-created entity containing to hold the metadata only for the Oracle tenant architecture retains the separation
a collection of schemas and schema objects system. The root’s metadata describes each of individual databases and requires no
that store the data and code required for an PDB that is plugged into it. This metadata changes to applications, and it simplifies
application. No PDBs exist when a CDB is for a PDB is deleted from the root when that DBA tasks such as provisioning, patching,
first created. A PDB can be plugged into only PDB is unplugged. The root, therefore, can and upgrading.
one CDB at a time. be considered a metadatabase only.
A CDB can have multiple PDBs plugged Each PDB has its own set of tablespaces
Anita Mukundan is a principal certification
in at any given time, and each PDB exists and corresponding data files that implement
exam developer at Oracle. She has been with
in complete isolation from the other PDBs the data dictionary tables to hold an applica-
the company since 2007.
plugged into the same CDB. Each PDB retains tion’s metadata, and a set of tablespaces that
granular control over its schemas and objects. hold the application’s user-defined data. Next Steps
From the perspective of a user or applica- The root differs significantly from a PDB
tion, the PDB appears as if it is a traditional in that it never holds any user-defined data. LEARN more about the Oracle
non-CDB database. From the operating Both the root and the PDBs have distinct Certification Program
system perspective, the CDB is the database. data dictionaries and can be the “focus” of a education.oracle.com
Which statements are true about a CDB? foreground process. Therefore a session, at READ Inside OCP columns
bit.ly/insideocp
A. A CDB cannot exist without a PDB. every moment of its lifetime, has a uniquely
yo u h av e
Developing highly complex algorithms Good skills in Microsoft VC++, MFC, and STL
cutting-edge graphical user interfaces Experience with XML, COM, and databases
family was very scientifically focused. My dad looking for opportunities to mentor others.
was a calibrations engineer, and there was As women, we need to provide that guidance. JOIN OAUG
oaug.org
never a thought in our household that girls Oracle Magazine: Moving on to the tech-
70:1 Compression
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.