Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Copyright 2015. LoadSpring is a trademark of LoadSpring Solutions, Inc. All Rights Reserved. loadspring.com Follow us on:
MAY/JUNE 2015
GUARD THE
CROWN JEWELS
Secure your most important
business data where it lives with
Oracle Database security
BREAKAWAY SPEED
MEMORABLE
PERFORMANCE
FIGURING OUT
WHAT TO FIX...
TO FIXING IT.
Chris M., Data Services Manager
CONTENTS
BREAKAWAY SPEED
/ 24
MEMORABLE
PERFORMANCE
GUARD THE
CROWN JEWELS
Data breaches continue to make headlines. Secure
your most important business data where it lives:
in the database. Tom Haunert
/ 28
/ 21
Up Front / 5
Community / 14
Technology / 33
PARTNER NEWS / 14
BOOK BEAT / 14
COMMUNITY
BULLETIN / 16
ORACLE MOBILE
APPLICATION
FRAMEWORK / 33
Happenings in Oracle
Technology Network
Roland Smart
Technology by Example
Good sample data and real
examples tell the story.
Tom Haunert
MASHUP / 6
News, views, trends,
and tools
At Oracle / 8
EVENTS / 8
Find out about upcoming
technology and industry
events.
RESOURCES / 10
Your guide to the latest
Oracle videos, webcasts,
white papers, and more
BRIEFS / 12
The latest product news
ARCHITECT / 17
PEER-TO-PEER / 19
Thinking Green
BUSINESS
ANALYTICS / 39
PL/SQL / 43
Dynamically
Dangerous Code
Theres a right time to use
dynamic SQL, but theres
never a right time for
SQL injection.
Steven Feuerstein
ASK TOM / 51
On More-Secure
Applications
Our technologist shows
how to build security into
application design.
Tom Kyte
Comment / 56
IN THE FIELD / 56
Keeping Pace
EDITORIAL
Editor in ChiefTom Haunerttom.haunert@oracle.com
Managing EditorJan Rogersjan.rogers@oracle.com
Associate Editor Patty Waddington
Contributing Editor and Writer Blair Campbell
Technology Advisor Tom Kyte
Contributor Leslie Steere
DESIGN
Senior Creative Director Francisco G Delgadillo
Design Director Richard Merchn
Contributing Designers Jaime Ferrand, Arianna Pucherelli
Production Designers Sheila Brennan, Kathy Cygnarowicz
PUBLISHING
PublisherJennifer Hamiltonjennifer.hamilton@oracle.com+1.650.506.3794
Associate Publisher and Audience Development DirectorKarin Kinnearkarin.kinnear@oracle.com+1.650.506.1985
Audience Development ManagerJennifer Kurtzjennifer.s.kurtz@oracle.com
ADVERTISING SALES
President, Sprocket MediaKyle Walkenhorstkyle@sprocketmedia.com+1.323.340.8585
Western and Central US, LAD, and Canada, Sprocket MediaTom Cometatom.cometa@oracle.com+1.510.339.2403
Eastern US and EMEA/APAC, Sprocket MediaMark Makinneymark.makinney@sprocketmedia.com+1.805.709.4745
Recruitment Advertising, Sprocket MediaJosie Damianjosie.damian@sprocketmedia.com+1.626.396.9400, x200
Advertising Sales Assistant, Sprocket MediaCindy Elhajcindy@sprocketmedia.com+1.626.396.9400, x201
Mailing-List Rentals Contact your sales representative.
EDITORIAL BOARD
Ian Abramson, Karen Cannell, Andrew Clarke, Chris Claterbos, Karthika Devi, Kimberly Floss, Kent Graziano, Taqi Hasan,
Tony Jambu, Tony Jedlinski, Ari Kaplan, Val Kavi, John King, Steve Lemme, Carol McGury, Sumit Sengupta,
Jonathan Vincenzo, Dan Vlamis
SUBSCRIPTION INFORMATION
Subscriptions are complimentary for qualified individuals who complete the form found at
oracle.com/oraclemagazine. For change of address, mail in label with the new address to:
Oracle Magazine, P.O. Box 1263, Skokie, IL 60076-8263.
MAGAZINE CUSTOMER SERVICE
oracle@halldata.com Fax +1.847.763.9638 Phone +1.847.763.9635
RESOURCES
Oracle Products
+1.800.367.8674 (US/Canada)
Oracle Services
+1.888.283.0591
Oracle Press Books
oraclepressbooks.com
PRIVACY
Oracle Publishing allows sharing of its mailing list with selected third parties. If you prefer that your
mailing address or e-mail address not be included in this program, contact Customer Service at
oracle@halldata.com.
Copyright 2015, Oracle and/or its affiliates. All Rights Reserved. No part of this publication may be reprinted or otherwise reproduced without permission from the editors. ORACLE MAGAZINE IS PROVIDED ON
AN AS IS BASIS. ORACLE EXPRESSLY DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ORACLE BE LIABLE FOR ANY DAMAGES OF ANY KIND ARISING FROM YOUR
USE OF OR RELIANCE ON ANY INFORMATION PROVIDED HEREIN. The information is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into
any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality
described for Oracles products remains at the sole discretion of Oracle. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Oracle Magazine (ISSN 1065-3171) is published bimonthly with a free subscription price by: Oracle, 500 Oracle Parkway, MS OPL-3A, Redwood City, CA 94065-1600. Periodicals Postage Paid at Redwood City,
CA, and additional mailing offices. POSTMASTER: Send address changes to: Oracle Magazine, P.O. Box 1263, Skokie, IL 60076-8263.
Technology by Example
H
This From the Editor was inspired by an e-mail
conversation with Oracle ACE Director and Oracle
Magazine columnist Mark Rittman. In discussing
Marks next article for Oracle Magazine, I questioned his idea for introducing sample data into
the hands-on how-to steps he was planning to
describe. The article steps involved moving big
data between systems, and Marks plan for using
sample big data for the article was to load it quickly
from a single file. When I questioned the idea of
true sample big data coming from a single data file,
Mark pointed out that a more realistic alternative to
loading sample big data could be a long article all by
itself. An excellent point.
Thanks, Mark, for the example explanation and
editorial inspiration.
NEXT STEPS
READ more about Oracle Database
sample schemas
bit.ly/1dazDlV
READ
Oracle Magazine hands-on how-to articles
oracle.com/technetwork/oramag/magazine/
tech-articles
Oracle Magazine customer stories
bit.ly/1E09L50
REGISTER for Oracle OpenWorld 2015
oracle.com/openworld
CONNECT:
bit.ly/orclmagcom
bit.ly/orclmagfb
EXAMPLES OF SAMPLES
An important part of many good information
technology examples is a representative set
of sample datadata that enables everyone
who follows the example process to also
see how that example could be applied to
ones own business and technology. Oracle
Database, for example, has included sample
data for many years, going back to the venerable SCOTT schema and continuing with the
HR (human resources), OE (order entry), PM
(product media), SH (sales history), and IX
(information exchange) schemas.
If youre a regular reader of Oracle
Magazine, youve seen these schemas or data
derived from these schemas used often in
the magazines hands-on how-to technology
articles. Some of the magazines technology
writers also create ad hoc sample data that
provides what seems to be the exact amount
of information required for an article in
the shortest possible space. I respect that
efficiency, and as an editor who has to make
all content fit in pages, columns, boxes, and
so on, I appreciate the brevity.
EXAMPLE ADDITION
In addition to featuring hands-on how-to
articles that are rich with examples, Oracle
Magazine features stories of Oracle customers succeeding with Oracle technology.
These customers demonstrate by example
their own business and technology challenges and solutions for other business and
technology leaders to see. And in the same
way a technologist can extrapolate a solution
from the presentation of examples, business
and technology leadersvisionariescan
see success and create their own new
success strategies based in part on the experience of a small sample of some of Oracles
400,000 customers.
You can see tens of thousands of Oracle
customers and technologists, and hear their
success strategies and stories in person, at
Oracle OpenWorld 2015 in San Francisco,
California, October 2529. Register early. Be
an example.
twitter.com/oraclemagazine
linkd.in/orclmag
ORACLE MAGAZINE MAY/JUNE 2015
MashUp
Planning your summer vacation? These helpful travel apps will make it even more enticing.
GateGuru
Citymapper
Billing itself as
the ultimate urban
transport app,
Citymapper does the
work of navigating
14 major cities for
you. Choose the
subway, bus, train,
car, bike, or walking.
Citymapper plans
routes, then gives
you information
about distance,
times, and prices.
Free (Android, iOS).
citymapper.com
Time Out
City Guides
Image It
Insider information
takes on a new
meaning with Time
Out city guides
covering more than
50 cities worldwide.
Get highlights for
history, food, art,
entertainment,
nightlife, and more,
all informed by local
expertise. Free
(Android, iOS).
timeout.com/
city-guides
Instant Inspection
Been longing for your very own tricorder? SCiO, a molecular sensor
that fits in the palm of your hand, is for anyone who wants instant
information about the things theyre interacting with or consuming. This tiny device reads the chemical make-up of materials
such as food, plants, medication, plastics, and oils using a nonintrusive, no-touch optical sensorand with every scan, the device
gets smarter. Discover how much fat is in any salad dressing, how
much sugar is in a particular piece of fruit, how pure an oil is, and
more. US$249. consumerphysics.com/myscio/scio
More than 85 percent of CIOs in a recent survey say theyre currently taking steps or
are planning to take steps in 2015 to improve IT security. Topping the list? Enhancing
employee training on IT security issues. Responses came from 2,400 CIOs at US companies
with 100 or more employees, and multiple responses were allowed.
CIOS CURRENT OR PLANNED MEASURES FOR ENHANCING IT SECURITY
54%
45%
41%
41%
41%
Other measures 1%
Source: Robert Half Technology, roberthalf.com/technology
QUIZ YOURSELF!
Power to Go
Hit the road this
summer with the
worlds smallest battery
pack with a standard
wall outlet. Power your
laptop, tablet, phone,
speakers, radio, television, lights, and more
anything, in fact, that can charge by USB or by a standard wall
plug. The ChargeAll Portable Power Outlet comes in two sizes
and uses AC power for household appliances and DC power for
12V electronics. Starting at US$269.95. chargetech.com
EVENTS
Technology Events
ODTUG Kscope
bit.ly/1KPBuYM
bit.ly/1Mho6yk
bit.ly/17p8qcL
nyoug.org
SANSFIRE
infoShare
June 1112, Gdansk, Poland
ftheinfoshare.org
The ninth annual free infoShare IT and new
media conference brings together tech leaders,
entrepreneurs, and investors to discuss IT,
mobile technology, security, innovations,
trends, new media, startups, and project and
team management.
EVENTS LOCATOR
Oracle Events
oracle.com/events
Locate User Groups
oracle.com/technetwork/community
Gigaom Structure
MobileBeat
July 1314, San Francisco, California
fbit.ly/1Adm8rr
More than 1,000 attendees focus on using
mobile technologies for growth. Key themes this
year include personalized advertising, customer
nurturing, big data, user acquisition and monetization, mobile apps, industries, and analytics.
MozCon
July 1315, Seattle, Washington
fmoz.com/mozcon
Attendees get three days of forward-thinking
sessions covering search engine optimization,
social media, community building, content
marketing, brand development, conversion rate
optimization, the mobile technology landscape,
analytics, and more.
bgoug.org/en
neoaug.org
devoxx.co.uk
bit.ly/1LT7J81
ukoug.org
bit.ly/1Ja0kmc
bit.ly/1r3gQyD
otmsig.com
bit.ly/1pxm5AM
GETTY IMAGES
Push a Button
Move Your Database
to the Oracle Cloud
Same Database
Same Standards
Same Architecture
cloud.oracle.com/database
or call 1.800.ORACLE.1
Copyright 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates.
10
RESOURCES
VIDEOS
E-BOOKS
INFOGRAPHICS
WHITE PAPERS
How Efficient IT Shapes High Tech Success
fbit.ly/1CjoC9j
Learn how seamlessly integrated IT addresses
the challenges of converging global markets,
increasing customer demands, greater supply
chain complexity, and unprecedented strain on
existing IT infrastructures.
RESOURCE CENTERS
Oracle Private Platform as a Service (PaaS)
Online Assessment
fbit.ly/paasassessment
Take this assessment to find out your private
PaaS adoption maturity relative to your peers,
and identify next steps to help drive your strategy.
CONNECT:
MAY/JUNE 2015 ORACLE.COM/ORACLEMAGAZINE
oracle.com/blogs
facebook.com/oracle
PODCASTS
Infinity Insurance Secures Sensitive
Personally Identifiable Information
fbit.ly/1AsdXu5
Infinity secures sensitive data, such as social
security, payment card, and drivers license
numbers, with Oracle Advanced Security.
DBA Security Superheroes: With Great
Power Comes Great Responsibility
fbit.ly/1rTMH5v
Michelle Malcher discusses the 2014 IOUG
Enterprise Data Security Survey Report, and
confirms that, more than ever, organizations
need database administrators with comprehensive security knowledge.
WEB LOCATOR
twitter.com/oracle
Oracle Consulting
oracle.com/consulting
Oracle Events and Webcasts
oracle.com/events
Oracle Newsletters
oracle.com/newsletters
Oracle Podcast Center
oracle.com/podcasts
Oracle University
bit.ly/ouoramag
Oracle Support
oracle.com/support
My Oracle Support
myoraclesupport.com
My Oracle Support Communities
communities.oracle.com
linkedin.com/company/oracle
bit.ly/plusOracle
@OraclePress
Press Headlines
New Oracle Consumer Study
Challenges Retailers to Adapt to
Modern Retail Marketplace
fbit.ly/1c1kdQm
I-HUA CHEN
12
BRIEFS
I-HUA CHEN
13
Book Beat
Expert Oracle Exadata,
Second Edition
By Andy Colvin, Karl
Arao, Martin Bach, Frits
Hoogland, Kerry Osborne,
Randy Johnson, Tanel Pder
Apress
apress.com
Expert Oracle Exadata,
Second Edition, covers the mechanics that
underlie Oracle Exadata to help readers
understand how its hardware and software
work together to create a superior platform
for running Oracle Database. The authors
share their real-world experience with
Oracle Exadata and introduce readers to
new performance-enhancing concepts
such as offloading SQL processing to the
storage layer. The book provides a roadmap
to laying out the Oracle Exadata platform
to best support existing systems.
I-HUA CHEN
14
PARTNER NEWS
I-HUA CHEN
15
16
Community Bulletin
BY ROLAND
SMART
News, People,
Happenings
in and
Oracle
Happenings
Technology
in the
Network
Oracle Technology
Network
Deploying Oracle
Database 12c on
Oracle Solaris 11
Get Certified
in Oracle
Mobile
Development
Data Visualization
for Oracle Business
Intelligence 11g
Available Now:
MySQL Cluster 7.4
Designed to deliver 99.999
percent availability, MySQL
Cluster 7.4 provides improved
performance for both readonly workloads and read/write
operations. It also includes
a host of new geographic
redundancy features, enabling
update-anywhere replication
between distant clusters.
MySQL Cluster 7.4 is available in both open source and
commercial editions. Download
the quick start guide, evaluation
guide, and complete software
package at bit.ly/downloadMySQL-Cluster.
I-HUA CHEN
PODCAST ROUNDTABLE
ON API MANAGEMENT
MJ15_Community_R1_gtxcel.indd 16
5/12/15 4:03 PM
CONNECT:
blogs.oracle.com/archbeat
My goal is to
achieve excellence
in everything
Im doing.
Andre Araujo, Senior System Engineer, Oi S.A.
increase access to industry opportunities, and
also help my company on its path to gaining
Oracle PartnerNetwork Specialized status.
Next up on his list to pursue are Oracle
Communications Session Border Controller
Certified Implementation Specialist and
perhaps Cisco Network Programmability
Design Specialist certifications.
Oracle ACE Associate Rodrigo Radtke de
Souza is a consultant, solution architect, and
software development advisor at Dell. For
me, certifications were always a very good
way to consolidate my knowledge around a
specific technology. Back in the days when I
was a Java developer, I wanted to be sure that
I knew the details and nuances of that technology. He credits the Sun Certified Java
Programmer (SCJP 6) and Sun Certified Web
Component Developer (SCWCD 5) certifications as essential in achieving that goal. But
his journey didnt end there.
When I migrated to Oracle development, Oracle Database SQL Expert certification helped me to create a solid knowledgebase around the basic principles of SQL, he
says. His latest certification is Oracle Data
Integrator 11g Certified Implementation
Specialist. Having a certification, he says,
allows you to demonstrate to others that
your knowledge is compatible with market
expectations for that technology. For his
next round of certifications, Souza has his
sights set on Oracle Hyperion Planning,
Oracle Essbase, and Oracle Business
Intelligence Enterprise Edition.
The stories of these three individuals
facebook.com/brhubart
twitter.com/brhubart
represent their specific interests and strategies. Architect Enterprise Applications with
Java EE and SOA Adoption and Architecture
Fundamentals are the most popular courses
among Oracle Universitys architecturerelated offerings. Not surprisingly, database
courses are the most popular overall.
Oracle ACE Director Eric Helmer, vice
president of Global IT Services at ADI
Strategies and a board member of the
Oracle Applications Users Groups Oracle
Hyperion special interest group, highly
recommends database certification as a
starting point. Every enterprise solution
has a database back end, he explains. I
guarantee it will not be long before you will
grow into corporate systems and solutions
that could catapult your career in myriad
directions. It happened to me.
If you plan to load yourself into the career
catapult, what target will you aim for? What
skills, certifications, or other enhancements
do you plan to add to You 2.0? Join the discussion and share your plans: bit.ly/1EyeYhN.
Bob Rhubart
(bob.rhubart@oracle.com)
is manager of the
architect community
on Oracle Technology
Network, the host of the
Oracle Technology Network ArchBeat podcast
series, and the author of the ArchBeat blog.
NEXT STEPS
READ training/certification stories
bit.ly/1EyeYhN
EXPLORE Oracle Universitys architecturerelated training/certification resources
bit.ly/1EyfPiq
LEARN about the Oracle PartnerNetwork
Specialized program
oracle.com/partners
linkedin.com/in/bobrhubart
ORACLE MAGAZINE MAY/JUNE 2015
17
Convert to Digital!
Thinking Green
These peers recall monochrome monitors, enjoy the outdoors, and optimize energy use.
FRANK MUNZ
TOSHIKAZU FUKUOKA
19
Database 12c
Built for
the Cloud
Use Less Hardware
Lower Operating Costs
Manage Many as One
No Application Changes
oracle.com/database
or call 1.800.ORACLE.1
Copyright 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates.
21
BY TOM HAUNERT
GUARD THE
CROWN JEWELS
SECURE YOUR MOST IMPORTANT BUSINESS DATA
WHERE IT LIVES: IN THE DATABASE.
D
I-HUA CHEN
ata breaches continue to make headlines, and they are not just
about stolen credit card information anymore. Data breaches
are now targeting different industries and different types of
information. Whats going on, and what can organizations do to protect
their corporate data?
Oracle Magazine sat down with Vipin Samar, vice president of Oracle
Database security, to talk about the latest data breaches, how data
breach threats are evolving, and how to work with the wide variety of
data that needs protection in the enterprise.
22
Encryption Is Key
Oracle Magazine: Who and where are the attackers, and what are
their strategies?
Samar: The attackers are different types of people with different
motivations: they may be curious insiders, criminals, hacktivists,
or even nation-states. But just as the attackers are diverse, the
attack vectorshow the attackers attempt to break inare many
and varied. There is no one way to attack information technology.
Looking at the common data breach themes over the last 18 months,
however, a key strategy of many recent successful attacks has been
to get inside the company network not by brute force, but through
the use of social engineering, a phishing attack, or some malware to
gain access to the company network or endpoints as an authorized
user. And once an attacker is inside the network, the company assets
are only as safe as the remaining IT security.
23
24
BREAKAWAY SPEED
Specialized Bicycle Components pulls ahead with Oracle
engineered systems and software solutions.
ROBERT BIRNBACH
BY DAVID BAUM
Super and
More
Oracle SuperCluster
engineered systems
are ideal for Oracle
Database and DBaaS
implementations.
Oracle ZFS Storage
Appliance delivers
enterprise-class
network-attached
storage. Through
coengineering and
integration with
Oracle Database,
Oracle ZFS
Storage Appliance
complements the
extreme performance
of engineered
systems, including
Oracle SuperCluster.
26
At the company
headquarters in
Morgan Hill, California,
Specialized Bicycle
Components analyzes
rider position and
bicycle performance
in its state-of-the-art
wind tunnel.
ROBERT BIRNBACH
inventory depletion and automatically replenish the regional distribution centers from the global distribution center. Over time,
Pollard expects that this system will shorten lead times and speed
up inventory turns for the burgeoning Asian market, especially for
items that have relatively constant demand.
This system will make us much more efficient and ensure that
dealers receive their fair share of inventory each month, Pollard
explains. Our long-term goal is to give dealers visibility clear back
to the assembly phase. They will know the delivery dates by which
we will have inventory replenished. Having accurate visibility into
inventory gives us a huge competitive advantage.
CRAFTING A BI STRATEGY TO GUIDE THE FIRM
Specialized is the #1 bike brand in the world, and arguably one of
the most popular bike brands in history. To ensure that the company
can continue to deliver the products its customers demand, Pollard
and his team are defining an advanced analytics strategy based on
Oracle Business Intelligence software and an Oracle Exalytics engineered system.
The Oracle Business Intelligence implementation will give us
real-time information that people can react to daily, rather than
reports that are often a week old, says Pollard. With our current BI
system, our inventory is moving so fast that by the time somebody
pulls together a report the situation may have changed and the data
may be out of date.
By contrast, the new Oracle Exalytics system will enable managers to drill into real-time inventory and sales data, from highlevel summaries to low-level details. This type of analysis is especially important for demand planning. Specialized has 900 types of
bikes and thousands of equipment SKUs. Demand planners have to
create monthly forecasts so the factories can adjust their capacity
28
MEMORABLE
PERFORMANCE
29
30
SNAPSHOT
Die Mobiliar
mobi.ch
Headquarters: Berne, Switzerland
Industry: Financial services
Employees: More than 4,000
Revenue: CHF 596.4 million in 2014
Oracle products: Oracle Database 12c,
Oracle Database In-Memory option, Oracle
Database 11g, Siebel Customer Relationship
Management applications
For the first test, the team chose a recurring business operation. We selected a
typical business case at Mobiliar today, says
Kreth. When we sell to a new customer,
that customers information is entered in a
DB2 database, but that data isnt visible to
the sales data warehouse until the contract
is signed. But that happens later, and we
cant go back two days after a customer has
signed a contract and say, Hey, if you also
bought car insurance from us, we could give
you this extra discount.
Oracle Database 12c (Release 12.1.0.2)
was installed on a seven-blade, Intel Xeon
Jochen Maas, head of base service, IT operations (left), and Paolo Kreth, team leader for database
based server with 384 GB of main memory
management systems at Die Mobiliar, directed a move from the mainframe to Java, open systems, and Oracle
Database 12c with the Oracle Database In-Memory option.
per blade and the Linux operating system. It
was then populated with the same data that
optimal performance for online transaction processing (OLTP), and
ran on the firms sales data warehouse.
the in-memory column format delivers the best performance for
For the first test, the team enabled Oracle Database In-Memory
analytics. (See the Best of Both Worlds sidebar for information on
on the seven-blade server and essentially tested the system as is,
Oracle Database In-Memory.)
changing only one table partition. Says Kreth, We wanted to see
what would happen if we just took the data, activated the Oracle
THREE SCENARIOS
Database In-Memory option, and did nothing.
To prove the performance benefits of the Oracle Database
The answer confirmed the companys new database strategy, he
In-Memory option, Kreth and his team set up a proof of concept to
says. Some queries were faster, some were slower, but overall the
test three different database scenarios that are typical of the firms
Oracle Database In-Memory option increased query performance,
current operations.
he notes. Our management was very happy. They did not have to
The Oracle Database In-Memory option is a technology whose time has come, thanks to the availability of inexpensive RAM and a new generation
of 64-bit operating systems, says Maria Colgan,
master product manager at Oracle.
Organizations are demanding to be able to
analyze their data in real timewithout having
a negative impact on OLTP [online transaction
processing] performance and without having to
wait for the classic ETL [extract, transform, and
load] process to load into the data warehouse,
says Colgan. Analytic queries tend to hit a
subset of columns out of a table with millions
or billions of rows, whereas OLTP applications
31
NEXT STEPS
[PARTNER Q & A
ADVERTISING SUPPLEMENT
Mobile Developer
I-HUA CHEN
GETTING STARTED
Ensure that youre using the studio edition
of Oracle JDeveloper 12c (12.1.3)available
as a free download on Oracle Technology
Networkwith the Oracle Mobile
Application Framework v2.1 extension.
You also need either Apple Xcode 6.1 or
the Google Android SDK with API 21, configured for deploying and testing Oracle
Mobile Application Framework from Oracle
JDeveloper. Apple Xcode is available for
Macs only; the Android SDK is available for
both Mac and Windows PCs. The Oracle
Mobile Application Framework documentation provides relevant setup instructions at
bit.ly/mafinst.
Download the sample application at
bit.ly/omagmaf1, and save the o35maf2432441.zip file to a local folder on your
computer. (Do not use spaces in the folder
name.) Unzip the o35maf-2432441.zip file,
and then unzip each of the two extracted
files. The local folder now contains two
subfolders, each containing an Oracle
JDeveloper workspace:
The HrServicesSubset folder contains a
demonstration REST HR web service that
Figure 1: ViewEmployees.amx page and the initial state of the phone book app in the iOS Simulator
33
34
35
36
37
NEXT STEPS
DOWNLOAD the sample application for
this article
bit.ly/omagmaf1
READ more about Oracle Mobile
Application Framework
oracle.com/maf
WATCH Oracle Mobile Application
Framework YouTube training channel
youtube.com/user/OracleMobilePlatform
JOIN the Oracle Mobile Application
Framework Google+ community
bit.ly/1A4h5sd
Cloud Developer
I-HUA CHEN
39
40
BUSINESS ANALYTICS
41
42
BUSINESS ANALYTICS
CONCLUSION
Oracle Business Intelligence Cloud Service
makes it possible to quickly deploy
analyses and dashboards as part of the
Oracle Cloud platform without the need
for on-premises software installs or the
help of the IT department. In this article,
youve seen how to quickly create reports
and a dashboard that can be shared with
coworkers within your department, using
simple self-service tools and the ability
to upload spreadsheets and other files to
create your reporting data set.
Mark Rittman is an
Oracle ACE Director and
cofounder of Rittman
Mead, an Oracle Gold
Partner based in the UK,
with offices in the US,
India, and Australia. Rittman has worked with
Oracles business intelligence, data integration,
and data warehousing products for more than
15 years, and he writes for the Rittman Mead
blog, at rittmanmead.com/blog.
NEXT STEPS
LEARN more about
Oracle Business Intelligence Cloud Service
bit.ly/1Cft0Dc
bit.ly/oraclebicshelp
bit.ly/oraclebicsoll
READ more Rittman
Rittman Mead blog
rittmanmead.com/blog
Oracle Magazine business intelligence columns
bit.ly/omagbi
DOWNLOAD sample data for this article
bit.ly/omagbics1
ORACLE DATABASE
.EM_UPDATE_COL_VALUE", line 11
ORA-06512: at line 2
BEGIN
1000);
em_update_col_value ('employees',
'employee_id',
END;
100,
'salary',
1000);
END;
No rows found
BEGIN
em_update_col_value ('departments',
'department_id',
10,
'department_name',
'Jolly Fun');
END;
/
ORA-00933: SQL command not properly ended
ORA-06512: at "SYS.DBMS_SQL", line 1053
ORA-06512: at "QDB_BETA
43
44
PL/SQL
45
BEGIN
em_update_col_value ('departments',
|| table_in
'department_id',
10,
|| update_col_in
'department_name',
|| ' = '''
'Jolly Fun');
|| value_in
END;
|| pkey_col_in
|| ' = '''
|| pkey_value_in
|| '''; END;';
46
PL/SQL
Which of the following choices create(s) a procedure named PLCH_SHOW_NAME so that after
the following block executes, both Oak and
Sam are displayed on the screen?
BEGIN
plch_show_name ('PLCH_TREES', 1);
plch_show_name ('PLCH_PERSONS', 1);
END;
/
a.
c.
b.
CREATE OR REPLACE PROCEDURE plch_show_name
(table_in IN VARCHAR2, pky_in IN INTEGER)
IS
l_value
VARCHAR2 (100);
BEGIN
EXECUTE IMMEDIATE
'BEGIN SELECT nm INTO :val FROM '
|| table_in
|| ' WHERE pky = '
|| pky_in
|| '; END;'
USING OUT l_value;
DBMS_OUTPUT.PUT_LINE (l_value);
END;
/
DBMS_OUTPUT.PUT_LINE (l_value);
END;
/
d.
CREATE OR REPLACE PROCEDURE plch_show_name
(table_in IN VARCHAR2, pky_in IN INTEGER)
IS
l_value
VARCHAR2 (100);
BEGIN
EXECUTE IMMEDIATE
'SELECT nm FROM '
|| DBMS_ASSERT.sql_object_name (table_
in)
|| ' WHERE pky = :pky'
USING pky_in
INTO l_value;
DBMS_OUTPUT.PUT_LINE (l_value);
END;
/
Go to where the
conversation lives.
Connect with Oracle Magazine on your favorite social
channel and be a part of our growing community.
Join Us.
OracleMagazine
Oracle Magazine
@OracleMagazine
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.
48
PL/SQL
|| table_in
Code Listing 3: The further updated em_update_col_value procedure, with error handling
PROCEDURE em_update_col_value (
table_in
IN VARCHAR2,
pkey_col_in
IN VARCHAR2,
pkey_value_in
IN INTEGER,
update_col_in
IN VARCHAR2,
value_in
IN VARCHAR2)
IS
l_statement
VARCHAR2 (32767);
PROCEDURE report_results ...
BEGIN
l_statement :=
'BEGIN update '
|| table_in
|| ' set '
|| update_col_in
|| ' = '
|| value_in
|| ' where '
|| pkey_col_in
|| ' = '
|| pkey_value_in
|| '; END;';
EXECUTE IMMEDIATE l_statement;
report_results;
EXCEPTION
WHEN OTHERS
THEN
em_error_log_pkg.log_error (l_statement);
RAISE;
END;
l_statement :=
'UPDATE '
|| DBMS_ASSERT.SQL_OBJECT_NAME (
table_in)
|| ' SET '
|| DBMS_ASSERT.SIMPLE_SQL_NAME (
update_col_in)
|| ' = :my_value WHERE '
|| DBMS_ASSERT.SIMPLE_SQL_NAME (
pkey_col_in)
|| ' = :my_pky';
BEGIN
em_update_col_value(
'employees',
'employee_id;more code here',
49
1000000,
'salary',
1000);
END;
/
ORA-44003: invalid SQL name
Steven Feuerstein
(steven.feuerstein@
oracle.com) is an
architect for Oracle,
specializing in PL/SQL.
His books, such as
Oracle PL/SQL Programming, and more
than a thousand PL/SQL quizzes at PL/SQL
Challenge (plsqlchallenge.com) provide in-depth
resources for PL/SQL developers.
NEXT STEPS
TEST your PL/SQL knowledge
plsqlchallenge.com
READ more Feuerstein
bit.ly/omagplsql
READ more about
PL/SQL
oracle.com/plsql
SQL injection
www.polarbearsinternational.org
ORACLE DATABASE
On More-Secure
Applications
51
52
ASK TOM
quota 5m on users;
User created.
SQL> grant create session to a;
Grant succeeded.
SQL> connect a/a
SQL> grant create session,
2
create table,
3
4
Connected.
create procedure
to b;
Grant succeeded.
COUNT(*)
---------------------
55
as
ERROR at line 1:
select *
from all_users;
Table created.
SQL> create or replace
2
procedure truncate_table_t
authid DEFINER
as
begin
execute immediate
end;
Procedure created.
SQL> grant select on t to a;
Grant succeeded.
on truncate_table_t
to a;
Grant succeeded.
53
on this table. You might say, Our application enforces securitydont worry. But
that does worry me, because you will have
a bug in your applicationsomewhere,
someday. And then the audit trail will be
100 percent exposed to tampering.
If instead you put the audit trail into its
own schema and create two code schemas
one for the typical application user and the
other for the typical administrative application user, youll be able to grant INSERT privileges on the audit trail table to the first code
schema and SELECT privileges on the audit
trail to the second code schema. Now the
first schema can create the code that inserts
into the audit trail. The second schema can
create some views for reporting or use stored
procedures that return ref cursors instead.
Last, youll create a schema that has
CREATE SESSION and EXECUTE privileges
on the code in the first application schema
and then create an administrative login that
has CREATE SESSION and EXECUTE privileges on the code in the second schema.
This is the concept of least privileges put
into action to the fullest. The administrative schema will use code in the application
schema to audit itself and will be able to
report onbut not modifythe audit trail.
The application schema will also be able
to audit itself but not read the audit trail
(because it has no reason to).
To witness this multischema architecture idea in actionwith all the details,
code, and moresee the Database 2 Day
Developers Guide, Chapter 9, Developing a
Simple Oracle Database Application, at
bit.ly/devguidemultischemaapp.
into
SELECT * FROM EMP WHERE ENAME
LIKE '' or 1=1 '
' or 1=1
54
ASK TOM
CONCLUSION
Security is a #1 concern these days. In the
pastbefore the internetsecurity was a
bit easier. Our databases were not exposed
to billions of potential attackers and didnt
have as much sensitive information in them.
Today a child could attack your database just
for fun (search for sql injection toolkit, and
you might be surprised at what is out there).
Attacking a website is not hard.
Fortunately, protecting yourself and minimizing your exposure is not that hard either.
Employ least privilegesyes, that seems
like more work for the development team,
but look at what you get out of it: minimized
exposure, better documentation, and a solid
understanding of who uses what objects and
why. It is not only a security feature; it also
makes your entire code base better, easier to
maintain, and easier to understand.
Use encapsulation and modularization via multiple schemas to set up walls
NEXT STEPS
ASK Tom
Tom Kyte answers your most difficult technology
questions. Highlights from that forum appear in
this column.
asktom.oracle.com
FOLLOW Tom on Twitter
@OracleAskTom
READ more Tom
bit.ly/omagasktom
READ more about Oracle Database Security
bit.ly/2daysecure
bit.ly/oradbsecurity
bit.ly/dbvault
bit.ly/12cdbsecurity
DOWNLOAD Oracle Database 12c
bit.ly/epBiUG
LEARN more about Oracle Database 12c
oracle.com/database
FOLLOW Oracle Database
on Twitter
@oracledatabase
on Facebook
facebook.com/oracledatabase
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.
56
Keeping Pace
We need to
support our new
users and offer
them opportunities
to advance their
careers.
Melissa English, President, OAUG
series, thats terrific. But also we want
to help people connect with each other
through networking opportunities at our
OAUG Connection Point events and at
COLLABORATE conferences.
For example, we host a luncheon
for women in technology each year at
COLLABORATE, which is a great opportunity for women from all walks of life, in all
points in their careers, and from all industries to talk to one another.
Oracle Magazine: How is OAUG growing
its membership?
English: We need to support our new users
and offer them opportunities to advance
BLAKE J. DISCHER
MJ15_InTheField_R2_gtxcel.indd 56
5/12/15 4:06 PM
Only Oracle
Compresses
Your Data 12x
More Data.
Less Storage.
Less Energy.
Run Faster.
Oracle ZFS Storage and
FS1 Flash Storage
oracle.com/goto/compression