Professional Documents
Culture Documents
ow
you
T
Vis prid oad
r
ww ith use
it w e w
.qu gea rs
est r fro :
.co
m/ m the
Toa T
dM oad
all Ma
ll.
Get more, do more and save more with Toad for Oracle.
Learn how Quest uses Toad to save money and improve productivity.
Carol Fawcett, VP of IS, explains how in this new video at www.quest.com/bank
©2009 Quest Software, Inc. All rights reserved. Quest and Quest Software are trademarks or registered trademarks of Quest Software.
All other brand or product names are trademarks or registered trademarks of their respective holders. DBM_Toad4Oracle_Piggybank_Q2_2009.
M AY /JUN E 2 0 09
O R AC L E .C O M/ O RA C L EM AGA ZI NE
UNITED
DEVELOPMENT
Bring together the languages, technologies, and
applications your integrated business demands with
Oracle tools and development solutions
Extreme Performance.
Alternative thinking about business intelligence
hp.com/go/oracle/exadata
Individual results are dependent on a number of factors and actual results may vary significantly. HP and Oracle make no warranty on system performance.
©2008 Hewlett-Packard Development Company, L.P..
CONTENTS VOLU M E XXIII, ISSUE 3
UNITED
DEVELOPMENT FEATURE S
11
From Our Readers / 7
Readers tell us what they think.
AT ORAC LE
From the Editor / 8
Events / 11 OTN Bulletin / 15
Pure Tools —Tom Haunert
Find out about current and Learn what’s happening with Oracle’s most
upcoming industry events. dynamic online community.
Resources / 13 Briefs / 16
Your guide to Oracle Webcasts, Interview / 19
podcasts, blogs, education Pascal Laik, Oracle’s vice president of master data
offerings, and more management (MDM) products, talks about Oracle’s
solutions for MDM.
ORACLE MAGAZINE M AY / J U N E 2 0 0 9 3
contents
55 tec hnology
s ecur it y
Creating Custom Authentication / 55
Build single sign-on/sign-off for a suite of applications
20
in Oracle Application Express. —Raj Mattamal
66 c om ment
in the field
Mixing It Up / 66
There’s never been a better time to get involved
through networking. —Ian Abramson
all s ecur e
41
Good Reporting, Good Governance / 67
Measuring “How are we doing?” in Oracle
d eve lo per Software Security Assurance
—Mary Ann Davidson
f r am e wo rks
Extending a Helping Hand / 41
analy st ’s c or ne r
Add custom features to improve team productivity.
Getting Grounded in the Cloud / 68
—Steve Muench
Developers find challenges—and
opportunities—in new architecture.
o dp.n et
—David Baum
The Right Transaction / 45
Choose the ODP.NET transaction type that fits your
business rules. —Mark Williams
p l /s Ql pra ctic es
The Magic Kingdom / 47
Choose the best way to manage literal values.
—Steven Feuerstein
b r ow se r-b a se d
Converting Forms / 51
Modernize Oracle Forms applications with Oracle
Application Express. —David Peake
4 m ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
Don't you just love
PL/SQ L De velo pe r?
d eS ign
Senior creative director Francisco G. Delgadillo
design director Richard merchán
Production designer Sheila Brennan
e ditorial boar d
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
S u b S c r i P t i o n i n F o r m at ion r eSourc eS
Subscriptions are complimentary for qualified individuals who complete the subscription card found in each oracle Products
issue or online at oracle.com/oraclemagazine. For change of address, mail in label with the new address to +1.800.367.8674 (u.S./Canada)
Oracle Magazine, P.O. Box 1263, Skokie, IL 60076-8263. oracle Services
+1.888.283.0591
mag a z in e c u Sto m e r S ervi ce oracle Press books
oracle@halldata.com, fax +1.847.763.9638, phone +1.847.763.9635 www.oraclepress.com
P r i vacy
Printed by Brown Printing
Oracle Publishing allows sharing of our 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 © 2009, oracle and/or its affiliates. all Rights Reserved. no part of this publication may be reprinted or
other wise 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 Oracle’s products
remains at the sole discretion of Oracle. Oracle is a registered trademark of Oracle Corporation 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-3C,
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.
6 m ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
f r o m o u r READERS
oracle magazine m ay / j u n e 2 0 0 9 7
f r o m t h e editor
Pure Tools
Use tools as their creators intended, extend their range, and reinvent them.
any years ago I was helping a couple of car I don’t know if the mechanics were motivated by the con-
mechanic friends with some work on a backlog versation, feeling better about the problem because of the time
of repairs. (I did simple work, such as spark plug away from it, or if irony rules the world, but when they got back
changes—so no, I can’t help rebuild your transmis- to the car, the problem was solved within minutes, with the
sion.) On one car, the mechanics were working together on a current tools—“pure,” extended, and specialty—in the shop.
particular problem with a variety of automotive tools.
These professional mechanics had a collection of tools that tHe iSSUe At HANd
was simply overwhelming, to the point where if you needed a The May/June issue of Oracle Magazine has come to be known
tool that wasn’t in the “active” tool cart, you searched through as our developer issue, and in this issue’s cover feature, “United
drawers and drawers of “archived” tools until you almost inevi- Development” (page 26), Mike Hichwa, Oracle’s vice president
tably found the tool you needed. Yes, almost inevitably. of software development, database group, looks at the supply
As many different standard (and metric) tools as these of current technologies and the demand for development tools.
mechanics had, they didn’t have every tool they might ever “Today’s developers are forced to pay attention probably to 20
need. So as new technologies were introduced and new cars technologies, where before they could concentrate on maybe
required new, specialized tools, they bought new multipurpose three or four,” he says. “That puts extra emphasis on the need
tools, modified existing tools to enable different access or extend for better tools.”
useful reach, and created or bought specialty tools that might Fortunately, all sorts of development tools—pure, extensible,
only ever get used on a single job. and specialty—are readily available through traditional channels
That day when I was helping out, after my friends had as well as new development environments.
invested some time in that one problem car (trying all sorts For example, Oracle Application Express is available for
of creative solutions with all sorts of active, archived, modi- download, and a hosted version has been available for some
fied, and specialty tools from other jobs) they took a break time at apex.oracle.com. It is also now available for cloud devel-
and started talking strategy. There was a specialty tool manu- opment with Oracle Database and Oracle Fusion Middleware
factured specifically for this and only this procedure, and the in the Amazon Elastic Compute Cloud. In “Converting Forms”
mechanics knew it. But the current job was on a rare make (page 51), author David Peake walks through the use of tools
and model car they didn’t think they were likely to see again, old and new: he describes how to use the specialized Oracle
so they didn’t want to invest in that new tool. Forms to Oracle Application Express 3.2 migration process to
During the strategy conversation, there was some mis- take advantage of the latest database releases and Web 2.0 inter-
directed cursing about “the trouble with tools,” and at some activity. And in “Creating Custom Authentication” (page 55),
point, one of the mechanics started defending tools, quoting author Raj Mattamal describes how to extend Oracle Application
the adage “the right tool for the right job” and reminding us Express authentication schemes to provide a custom solution for
that using the wrong tool is a mechanic’s error. It’s not the tool’s sign-on and sign-off for a suite of applications.
fault, he said, adding, “Tools are pure.” For Oracle Fusion Middleware developers, there are always
new tools to try, extend, and build. In “Extending a Helping
nextStePS
Hand” (page 41), author Steve Muench uses pure Java, the
thoroughly extensible Oracle JDeveloper 11g, and Oracle
Application Development Framework (Oracle ADF) to create
reAd more about
oracle development tools framework extensions for Oracle ADF business components.
oracle.com/tools For .NET developers working with Oracle Database, Oracle
doWNLoAd Data Provider for .NET (ODP.NET) is the pure provider. In “The
oracle Application express Right Transaction” (page 45), author Mark Williams extends
otn.oracle.com/products/database/application_express/download.html
best-practice information for managing transactions within .NET
oracle Jdeveloper 11g applications that access Oracle Database via ODP.NET.
otn.oracle.com/software/products/jdev
8 M ay / J u n e 2 0 0 9 oracle.com/oraclemagazine
Data Quality Solutions for Oracle
Telephone Area Code & Prefix Name Parsing & Genderizing
Geocoding
Multiplatform Tools
Now, finding the right data verification tools doesn’t have to BEFORE
be so puzzling. Melissa Data offers customizable APIs, Web john smith iii phd
services and enterprise applications to match your budget melissa data corp.
22382 Empresa 92688
and business needs. For solutions to cleanse, validate and 7145895200
john@800miAL.con
standardize your contact data, we’re ready to help you find
the perfect fit.
AFTER
• Global address verification for 240 countries Melissa Data Corp.
John Smith III PhD
• Clean and validate data at point-of-entry or in batch
22382 Avenida Empresa Ste 100
• Correct misspellings, missing directionals, and confirm Rancho Santa Margarita, CA 92688-2112
deliverability 949-589-5200
John@melissadata.com
• Enhance addresses with County, Census, FIPS, etc. Delivery Indicator: Business
*Highlights indicate added and/or corrected data.
• Append lat/long coordinates to the ZIP, +2 and +4 levels
Realtime NCOALink
Change-of-address
• Work natively with Oracle Forms, PL/SQL, C++, VB NET, Web Service
C#, ASP and Java available
• COLLABORATE with thousands of Oracle users to share success stories, challenges and solutions for Oracle technology and applications.
• LEARN from experts and leaders in the Oracle community from more than 900 education sessions by the IOUG, OAUG and Quest, presenting best
practices and tested solutions.
• DISCOVER technology solutions and strategies with access to more than 200 of the leading IT solution providers exhibiting in one open forum.
• GAIN inside information and insight from Oracle leadership and technology visionaries, and leverage our users groups’ collective voice to Oracle.
Mark your calendar now for COLLABORATE 09. Registration is open now.
Presented by:
oracle magazine m ay / j u n e 2 0 0 9 11
EvEnts
OHUG Conference Telecom, cable, content, media, entertain- Oracle OpenWorld 2009
oracle.com/openworld
June 14–17, Las Vegas, Nevada ment, and internet companies are all trying to
Getty ImaGes
12 M ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
a t O r a c l e resources
oracle magazine M AY / J u n e 2 0 0 9 13
ResouRces
Learn to build a simple Oracle Business data for planning and optimization of facil- BLOGS
Intelligence Interactive Dashboard start- ity space. Tim Perez, information systems oracle enterprise Manager
ing with basic requests created in Oracle coordinator from USPS, and Steven Pierce, blogs.oracle.com/oem
Interactive Dashboard and Answers, and of Oracle spatial partner Johnston-McLamb, Chung Wu, director of product management
then move on to more-complex tasks such explain how USPS visualizes and analyzes at Oracle, is the primary author of this blog,
as including pivot tables, charts, gauges, spatial data with Oracle Database and which provides the latest information and
prompts, and embedded content. Oracle Fusion Middleware MapViewer. perspectives on Oracle Enterprise Manager.
Architect Roundtable: Architects and oracle IRM
DEMOS Communication (Parts One and Two) blogs.oracle.com/irm
oracle.com/webcasts/demos oracle.com/techcasts Simon Thorpe, a senior sales consultant
oracle Financial Analytics with Eddie Awad, Oracle ACE director, and Jeff at Oracle, provides insight into informa-
oracle essbase Davies, senior principal product manager tion rights management (IRM) and related
Follow a day in the life of a CFO as she uses at Oracle and an author with a focus issues in the “official blog” about Oracle
Oracle’s enterprise performance manage- on service-oriented architecture (SOA), Information Rights Management.
ment system to respond to changing market discuss the communication issues that face Insight-Driven Retailing Blog
conditions. You’ll see how Oracle Financial software architects and whether Enterprise blogs.oracle.com/retail
Analytics works in tandem with Oracle 2.0 tools can close the communication gap. David Dorf, director of technology strategy
Essbase in this three-minute demo. They offer insight into how effective com- for Oracle Retail, is the primary author of
oracle’s Record-to-Report solution munication can bring new life to faltering this retail-focused blog.
Achieving management excellence SOA initiatives.
requires the integration of all manage- Go Green with Oracle Document Management
ment processes. Learn about the record- oracle.com/applications/podcasts-
to-report management process, through sustainability.html
webLocAToR
which systems and data are combined to Brian Dirking, principal product director at oracle Blog center
oracle.com/blogs
meet internal and external reporting needs. Oracle, and Greg Crider, senior director of
product marketing at Oracle, discuss how oracle consulting
oracle.com/consulting
PODCASTS Oracle document management customers
oracle events and Webcasts
Architect Roundtable: Enterprise 2.0 (Part One) have saved their organizations thousands oracle.com/events
oracle.com/techcasts of dollars and also helped the environment
oracle Podcast center
Oracle ACE Vince Salvato, Oracle by reducing their paper consumption. oracle.com/podcasts
ACE Director Bex Huff, and Oracle InfiniBand Networks Drive Extreme My oracle support
Product Manager for Enterprise Content Performance for Data Warehousing www.myoraclesupport.com
Management Billy Cripe discuss the connec- oracle.com/database/podcasts.html oracle Newsletters
tion between social media and Enterprise Voltaire’s InfiniBand interconnect solu- oracle.com/newsletters
2.0 and the level to which Enterprise 2.0 is tions are a key component of Oracle oracle support
oracle.com/support
understood among IT stakeholders. Exadata, helping drive extreme perfor-
USPS Leverages Location Data with Oracle mance for large Oracle data warehouses. oracle university
oracle.com/education
oracle.com/database/podcasts.html Asaf Somekh, vice president of market-
oracle on Twitter
Hear how the United States Postal Service ing at Voltaire, discusses how Voltaire’s twitter.com/oracle
(USPS) is making innovative use of location InfiniBand interconnect can dramatically
14 M AY / J u n e 2 0 0 9 oracle.com/oraclemagazine
a t O r a c l e OTN BULLETIN By ju stin Kestelyn
A List to Remember
Community content is the lifeblood of OTN.
recently compiled and posted a sciously refer to blogs here, as opposed a new five-day Oracle training course
list of the most-popular technical to bloggers, since some blogs feature for end users of Oracle JDeveloper 11g
articles and how-tos published by multiple authors) have thus far demon- and its associated Oracle Application
Oracle Technology Network (OTN) strated talent or flair that caught my eye: Development Framework (Oracle ADF)
in 2008. When reviewing this list, you Social CRM [customer relationship man- Business Components and Oracle ADF
will note that in every case the authors agement]. This blog’s many authors from Faces Rich Client. That course is now
involved are end users (customers and the Social CRM team each hew to the officially part of the SAGE catalog.
consultants), not Oracle employees. It same standard: sharing personal experi- This is the first case we know of in
nearly goes without saying that content ences and opinions in an informal voice. which Oracle ACEs from around the
like this, and the desire to share it, is the This is an approach one can’t take for globe have reached out to work together
lifeblood of OTN. granted in the blogosphere. Visit blogs on a curriculum or other training
The 2008 list is exceptional in depth .oracle.com/socialcrm. materials—or at least the first time such
as well as scope. It appears that OTN fans Frank Buytendijk Blog. Buytendijk is vice materials have seen the light of day.
are interested not only in pragmatic tuto- president for enterprise performance You can review the Oracle JDeveloper
rials that are tightly focused on product management (EPM) at Oracle, but course description, as well as other cur-
features (“Oracle Database 11g: The Top you’d never know it. (I mean that as a ricula, at www.sagecomputing.com.au/
New Features for DBAs and Developers,” compliment.) Buytendijk uses his blog courses/COURSES.pdf. ■
by Arup Nanda) but also in more- to convey personal interests as well his
wide-ranging examinations about best views on subjects relevant to EPM. Go to Justin Kestelyn (justin.kestelyn@oracle.com) is senior
practices (“Basic Java Persistence API Best blogs.oracle.com/frankbuytendijk. director, Oracle Technology Network and developer
Practices,” by Dustin Marx), conceptual Fusion ECM [enterprise content manage- programs, as well as OTN editor in chief.
discussions (“Filtering and Grouping: ment]. Blog author Billy Cripe is an
A Comparison of SQL, Linux Scripting, Enterprise 2.0 practitioner as well as a OTNLOCATOR
and Ruby,” by Casimir Saternos), and pundit. He constantly asks for feedback OTN Home
“extreme” evaluations (“Build Your Own and polls his readers—and that attitude otn.oracle.com
Oracle Extended RAC Cluster on Oracle shows through in his blog. Read it at OTN Headlines
VM and Oracle Enterprise Linux,” by blogs.oracle.com/fusionecm. otn.oracle.com/pub/news
Jakub Wartak). As usual, the OTN com- This is a rather small sampling, but Free Software Downloads
otn.oracle.com/software
munity has proven to be richly diverse, in subscribing to the RSS feeds associated
interests as well as approach. with these blogs would be a good start Documentation
otn.oracle.com/documentation
See the complete list at www.tinyurl if you want to dip your toes into the
Technology Centers
.com/58ox8z. rapidly deepening Oracle blogosphere. otn.oracle.com/tech
For a complete, aggregator-like view,
Podcasts
Best of the Blogosphere visit blogs.oracle.com. otn.oracle.com/techcasts
In 2005, when blogs.oracle.com first Technical Articles
“saw the light” of the internet, there oracle aces in alliance otn.oracle.com/pub/articles
were scarcely 30 Oracle employee blog- Recently I got word from Oracle ACE Blogs
gers to be found. Four years later, there Director (Oracle Fusion Middleware) blogs.oracle.com
are hundreds, ranging in focus from Chris Muir about an interesting mile- Discussion Forums
forums.oracle.com
infrastructure to industries to application stone for the Oracle ACE program. Muir
families. (Although blogs.oracle.com is and other members of his Australia- Developer Events Calendar
otn.oracle.com/events
not, strictly speaking, a developer-only based outfit, SAGE Computing Services
Oracle ACE Program
zone and is not formally an arm of the (including Oracle ACE Penny Cookson), otn.oracle.com/goto/oracle-ace
OTN brand, I am proud to consider worked closely with fellow Oracle ACE
OTN on Twitter
myself its godfather.) Director Lucas Jellema and his colleagues www.twitter.com/oracletechnet
A few of these new blogs (I con- at Netherlands-based AMIS to design
oracle magazine m ay / j u n e 2 0 0 9 15
d i d y O u KNOW
? a t O r a c l e briefs
Oracle leads embedded dbms market Oracle Unveils Oracle crM automatic upgrades, requiring little or
Oracle was the overall leader in the On DeManD 16 no upfront IT investment.
embedded database management system
(DBMS) market in 2007. Oracle’s share of
the market was 26.3 percent in 2007, up
O racle CRM On Demand 16, the latest
release of Oracle’s on-demand CRM
service, is now available. It features
Oracle sOUrcing On DeManD
nOw available
from 23.7 percent in 2006. Total worldwide
embedded DBMS software revenue in 2007
was US$1.97 billion, with 50.8 percent
advanced customization capabilities and
new partner relationship management
functionalities so that organizations
O racle has introduced Oracle Sourcing
On Demand, a software-as-a-service
(SaaS) solution that drives more-efficient
coming from the Americas; 35.3 percent can extend their applications and CRM and more-effective strategic sourcing.
coming from Europe, Middle East, and Africa; systems to meet unique business require- Based on Oracle Sourcing and Oracle
and 13.9 percent coming from the Asia ments. A hosted solution, Oracle CRM Sourcing Optimization, Oracle Sourcing
Pacific market. On Demand, Standard Edition for single On Demand is preconfigured and hosted
Source: IDC tenant, is also available. by Oracle, which reduces time to value
www.oracle.com/corporate/analyst/reports/ Oracle CRM On Demand 16 allows and accelerates return on investment.
infrastructure/dbms/idc-215446.pdf organizations to customize applications Oracle Sourcing On Demand cuts the
at the user interface, business process, time necessary for sourcing by making
and data layers. Built on a foundation it easier for organizations to complete
dbas Have Plenty tO dO
for enabling unlimited custom objects, sourcing events, to ensure that agree-
The top three operational database
it provides additional prebuilt custom ments are implemented as soon as they
management challenges are database
objects and delivers a high degree are signed, and to generate more-
performance, data recovery and availability,
of flexibility to define relationships effective contracts. The new service also
and upgrading to new database versions,
between custom and prebuilt objects. supports sourcing for lowest total cost
according to a survey of more than 400 DBAs.
New partner relationship manage- by enabling cross-functional collabora-
More than half (53 percent) said their most
ment functionality in Oracle CRM On tion among experts from finance, pur-
significant database project in 2009 will be
Demand 16 leverages and extends the chasing, and lines of business in order
an upgrade. Of DBAs surveyed, 40 percent
current partner license option to provide to easily optimize cost, quality, risk,
support or oversee 11 or more database
a broad set of indirect channel manage- and innovation. Oracle Sourcing On
instances, and 36 percent expect data volume
ment capabilities, as well as enhance- Demand also includes packaged inte-
to grow 25 percent or more in 2009. Almost
ments that support key functionality and gration to and from Oracle Purchasing
half—49 percent—said their mission-critical
business processes critical to the man- to ensure that the right information is
databases required six or more hours of
agement of an indirect sales channel. available within the relevant system.
planned downtime in 2008.
“Oracle continues to lead the industry Customers can go live rapidly
Source: GoldenGate Software with the most complete best-of-breed because they need only a browser in
www.goldengate.com/news/pressreleases/ CRM-on-demand service that helps orga- order to utilize Oracle Sourcing On
pr_dbta_survey_021709.html nizations of all sizes and industries maxi- Demand. Oracle hosts and manages all
mize their business needs,” says Anthony of the additional functionality, hardware,
eurOPean cOmPanies Plan data Lye, Oracle senior vice president of databases, servers, firewall settings, and
center exPansiOns CRM. “Oracle CRM On Demand 16 and preconfigured applications.
More than 80 percent of European companies the new customization capabilities are Oracle Sourcing On Demand deliv-
surveyed in October 2008 plan to expand indicative of how only Oracle offers the ers self-paced, online training targeted at
their data centers in the next two years, flexibility and choice organizations need developing the skills users need to drive
according to a Web-based survey of IT to drive measurable business results at effective sourcing outcomes. It also pro-
decision-makers in the U.K., France, Germany, every customer touchpoint.” vides a dedicated, functional help desk
and Ireland. More than 25 percent of survey Oracle’s hosted solution, Oracle CRM with 24/7 access to subject matter experts.
respondents plan to start expansion projects On Demand, Standard Edition for single “The current economic environment
in 2009. Companies project a 21 percent tenant, enables organizations to access presents a unique opportunity to drive
increase in average power capacity per rack a fully dedicated hardware and software mammoth savings from strategic sourc-
of 5.78 kilowatts, up from 4.7 kilowatts in the stack, unlimited custom objects, and ing,” says Cliff Godwin, senior vice
previous year’s survey. optional enterprise disaster recovery. The president of applications technology at
Source: Digital Realty Trust private hosting model provides a cost- Oracle. “Oracle Sourcing On Demand
investor.digitalrealtytrust.com effective option that is easy to use and can deliver immediate impact to an
fast to deploy with virtually seamless organization’s bottom line, helping offset
16 m ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
Product SPotlight: Oracle Introduces Oracle Enterprise Manager 10g Release 5
the effects of shrinking revenue, infla- policies. Any unauthorized activities can as automating time-consuming regula-
tionary pressures, and new risks.” be detected immediately using Oracle tory compliance reporting functions.”
Audit Vault’s alerts dashboard.
Oracle BrOadens dataBase auditing and In addition, Oracle Audit Vault Oracle delivers Oracle Beehive
MOnitOring capaBilities delivers prebuilt, customizable reports On deMand
oracle magazine m ay / j u n e 2 0 0 9 17
briefs
Exchange. It is also designed to operate Oracle HyperiOn strategic Finance FOr employee engagement and the ability to
with existing infrastructures such as banking 11 available understand where your organization is
LDAP directories and voice mail systems.
In addition, each Oracle Beehive On
Demand customer gains a dedicated envi-
O racle has released Oracle Hyperion
Strategic Finance for Banking 11, a
financial modeling application that helps
being successful and where you need to
apply more attention or refocus efforts,”
says John Webb, vice president, product
ronment, ensuring maximum privacy and executives understand the full financial management at Oracle.
security while also facilitating integration impact of alternative corporate strategies.
with other on-premises and on-demand The new release features integration Oracle tO buy mvalent
applications. Customers also leverage
Oracle’s Statement on Auditing Standard
70 audited operations to meet their own
with Oracle Crystal Ball, a spreadsheet-
based application for predictive mod-
eling, forecasting, and optimization.
O racle has agreed to acquire mValent,
a provider of application configura-
tion management solutions. The acqui-
compliance requirements. This integration allows organizations to sition is expected to enhance Oracle
“This new offering enables custom- manage risk and uncertainty in capital Enterprise Manager with extensive capa-
ers to conserve capital and benefit from investment and financing decisions. bilities for managing application con-
predictable, competitive pricing—paying The product also includes integration figurations across IT environments.
only for what they use while still making with Oracle Hyperion Financial Data “Effective application configuration
the necessary improvements to their Quality Management, which enables auto- management is increasingly important
enterprise collaboration infrastructure,” mated data sourcing from general ledgers as businesses look to improve operating
says Marc Schwarz, senior vice presi- and budgeting and consolidation systems. efficiencies,” says Richard Sarwal, senior
dent, Oracle On Demand. “Businesses are looking for ways to vice president of product development
better manage risk and improve the at Oracle. “With the addition of mValent,
Oracle Financial analytics adds accuracy of their forecasts,” says Bill Oracle expects to be able to address this
capabilities FOr public sectOr agencies Guilmart, vice president of product need by providing customers with the
integration with the Oracle E-Business can reduce the risk of noncompliance, Oracle Hyperion strategic finance
oracle.com/appserver/business-intelligence/
Suite, support for third-party datasources, improve productivity, identify underper- hyperion-financial-performance-management/
and prebuilt ETL [extract, transform, and forming areas, identify workforce seg- hyperion-strategic-finance.html
load] maps as well as financial dashboards ments that need additional training and Peoplesoft Workforce Communications
and reports, Oracle Business Intelligence development, and reduce program costs. oracle.com/applications/peoplesoft/workforce/
peoplesoft-workforce-communications.html
Applications can be deployed quickly to “PeopleSoft Workforce Communications
Oracle and mValent
enable public sector agencies to achieve has the potential to offer great value oracle.com/mvalent
rapid return on investment.” to organizations through improved
18 m ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
a t O r a c l e interview By C arolin e KvitKa
tions to master products, catalogs, bills integration element—that integration is LeArn more about
of materials, and all related information. required to load the MDM application Oracle master data management
oracle.com/master-data-management
Phil SaltonStall
Third, Oracle Site Hub enables orga- from its source systems. Data integration
Oracle data integration
nizations to master information about can also be used to feed the master data oracle.com/products/middleware/odi
sites, locations, stores, and trade areas. from the MDM application to the business
oracle magazine m ay / j u n e 2 0 0 9 19
c o m m u n i t y partner news
Ventureforth releases solution for action workflows, default data, radio Together, OrgPlus Enterprise and Oracle
DistributeD Maintenance enVironMents frequency users, labeling functions, and E-Business Suite enhance the ability to
20 M ay / j u n e 2 0 0 9 oracle.co m/oraclemagazine
b o o k BEAT
oracle magazine M ay / j u n e 2 0 0 9 21
PARTNER NEWS
Development Framework. Oracle program. The integrated solu- Oracle validates dclinK integratiOn
CipherSoft’s Exodus solution auto- tion is designed on a “pay-as-you-use” with Oracle e-business suite 12
matically converts Oracle Forms and
PL/SQL code. Automatic conversion
removes the risk of human error and
model and includes a range of licens-
ing, implementation, hosting, and IT
support along with business process
O racle Certified Advantage Partner
Data Systems International (DSI)
has achieved validated integra-
produces standardized business appli- outsourcing (BPO) services. tion for its dcLINK 5.0 automated
cations that are maintainable and cost Caliber Point’s multiprocess human data collection solution with Oracle
effective. Exodus is the only product resources solutions include workforce E-Business Suite 12 through the Oracle
on the market to be validated for administration, payroll, and recruitment PartnerNetwork Application Integration
Oracle Forms to Java and Java Platform, across multiple geographies. The scalable Architecture for Partners Initiative.
Enterprise Edition migration. and open infrastructure of Oracle HCM DSI’s dcLINK tracks inventory, assets,
applications allows customers to make and time on the shop floor, in the ware-
Partners exPand Oracle accelerate with changes to employee data in a globally house, and in the field. It supports RFID,
sOlutiOns fOr Midsize OrganizatiOns distributed environment. bar code, voice, mobile application, and
Oracle Accelerate, we’ve seen as much and support. The offering enables orga- Promero
as a 20 to 25 percent decrease in imple- nizations to respond rapidly to market www.promero.com
mentation time, which is a market differ- changes with new products and services. Unify
www.unify.com
entiator for us in these economic times.” Services under SOAsure include SOA
to enterprise resource planning (ERP) Oracle Accelerate Partner Solutions
oracle.com/solutions/mid/oracle-accelerate-partner-
caliber POint Offers Oracle-POwered integration, ERP upgrades to SOA- solutions.html
huMan resOurces sOlutiOns compliant versions, ERP extensions Zanett
O racle partner Caliber Point Business migration to SOA, process orchestration www.zanett.com
Solutions, a Hexaware Technologies spanning intra- and extra-ERP services, Caliber Point
subsidiary, is providing Oracle’s ERP instance rationalization, migra- www.caliberpoint.com
human capital management (HCM) tion to or integration with SaaS ERP, Computer Sciences Corporation
www.csc.com/soasure
applications in conjunction with its virtualization of the ERP platform, and
own human resources consulting and application management of the SOA/ Data Systems International
www.dsionline.com
services under the BPO Powered by ERP environment.
22 M ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
s p e c i a l su p pl e m e n t
Seriously Practical
User group leader wants developers to connect, teach, and learn.
ike Riley, president of the Oracle Reports, and Oracle Warehouse
Oracle Development Tools Builder,” says Riley. “We have a business
User Group (ODTUG), tells intelligence and data warehousing track
the story of his first brush that we hope to mingle with the Oracle
with a member of the organization and Hyperion and Oracle Essbase track,
how it changed the way he thought about because we can see those two communi-
his career. As a project manager and ties having a lot to offer each other. We
DBA at Hortica Insurance and Employee want people to get to know their present-
Benefits, Riley was embarking on his ers and know their peers. We want them
company’s first Oracle Designer project to network and find lifelong contacts.”
in 2000, and he brought in one of the While members network, ODTUG
world’s foremost Oracle Designer experts also looks to include developers who
to mentor his team. That expert was Kent are experts in other technologies. “Last
Graziano, then president of ODTUG—a year we rolled out the welcome mat for
group, as Graziano told Riley, of Oracle the Oracle Hyperion and Oracle Essbase
development tools users and experts who people and found they were a good fit for
help each other grow professionally. “He ODTUG,” Riley says. “Now we’re looking
Mike Riley, President, ODTUG
showed a willingness to share and teach at the BEA community.”
that I admired,” says Riley. By the end of Reports 6i to Oracle Database 11g, and Joining ODTUG has led Riley to a
the project, Riley was also a member of the community was helping with that,” richer professional life. “My ODTUG
ODTUG. “I’ve been hooked ever since.” says Riley. “Our expert members answer colleagues are my friends,” says Riley.
I met Riley in San Francisco, when questions quickly. I’ve received heartfelt “ODTUG membership has been about
he flew to Oracle headquarters from his thank-you notes for answers I’ve posted.” becoming a more well-rounded person.
home just outside of St. Louis, Missouri, To facilitate face time between mem- I’ve been asked to answer questions, to
to represent ODTUG at a broader user bers, ODTUG holds “Seriously Practical” teach, and to become a more polished
community meeting. I picked him up two-day conferences one or two times a speaker because I’m presenting in
at his hotel on what he told me was his year. The events provide detailed presen- front of hungry professionals and other
daughter Morgan’s seventh birthday. He tations and discussions on topics such as experts. I’ve built my skills and network
was missing her, and I felt like a slim PL/SQL and Oracle Application Express. through ODTUG, and it helps with
substitute, but Riley answered my ques- Riley tells of a 2007 conference that cul- everything I do back at work.”
tions with good cheer. He was, he said, minated with food, beer, and a PL/SQL Like Riley, I’m hoping to develop my
happy to tell me about the user group contest. “Nobody cared about the beer,” own contacts at Kaleidoscope this June.
that means so much to him. he says. “They wanted to win the contest.” I’ve already got my Google maps dialed
ODTUG members exchange exper- The granddaddy of ODTUG confer- in to Monterey, California. ■
tise on tools for developing applications ences is Kaleidoscope (June 21–25, 2009,
against Oracle Database, and members in Monterey, California), where more Jeff Erickson is a senior writer with Oracle Publishing.
embrace widely different toolsets. “I’m an than 800 people are expected to attend.
Oracle Forms guy, but we’ve got Groovy
and Grails experts, and Java is front and
I was glad I had my recorder running as
Riley described the event. nextsTePs
center for many people with [Oracle] “Sessions will cover a wide range of JoIN oDTUG
JDeveloper and Eclipse,” says Riley. development areas, including Oracle www.odtug.com
ODTUG holds two or three confer- Application Express; database develop- ATTeND Kaleidoscope
www.odtugkaleidoscope.com
ences a year, and for users’ day-to-day ment and tuning; architecture approaches
andrea mandel
needs, the group provides forums linked such as service-oriented architecture WATCH Up Close
Mike Riley interview
to an e-mail list of experts. “I saw where and business process management; and oracle.com/oramag/upclose
someone was trying to connect Oracle traditional tools such as Oracle Forms,
24 M ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
c o m m u n i t y PEER-TO-PEER BY Bl ai r C am p Be ll
Keeping It Real
Three Oracle technologists push their comfort zones, test reality, and take control.
Jon Emmons lot of DBAs still underestimate the peerSPECS
Company: Opitz Consulting GmbH,
What advice do you have about benefits of using PL/SQL. a provider of Oracle solutions and
getting into Web and database Which new features of Oracle Database consulting
development? Don’t be afraid are you finding most valuable? I took Job title/description: Divisional
director, leading the Opitz division
to take on a challenge that part in the Oracle Database 11g responsible for Oracle infrastructure
may be over your head or Release 1 beta program. When I first consulting
outside your skill set. As long heard about Oracle Real Application Location: Gummersbach,
Germany
as you have good support— Testing, I was impressed. In the
Oracle credentials: Oracle
examples, documentation, past, I had some really hard projects Certified Professional, with 10 years
coworkers who are willing trying to do realistic load testing. of experience using Oracle products
to help, and online forums—you’ll learn much more when Oracle Real Application Testing is
you’re pushed outside your comfort zone. a great new feature that keeps the
You’ve taken Oracle University (OU) classes in the past. What led you complexity in that kind of project to otn.oracle.com/community/
to do this? I’ve taken several OU classes related to both the a minimum, and it’s even more real- oracle_ace
database and application server istic at the same time.
technologies—but only after I’d peerSPECS
been working with the products Company: SunGard Higher
Education, a provider of solutions,
Porus Homi Havewala
for a while. The classes were strategic consulting, and technology What technology has most changed
invaluable for reinforcing what I management to colleges and your life? Oracle grid technology,
universities
had learned on my own and for including Oracle Enterprise Manager
Job title/description: Team
filling in the gaps. manager and remote DBA, 10g Grid Control and all the great
What would you like to see Oracle, managing consultants working with management packs. I really like the
higher education institutions to
as a company, do more of? I see provide technical leadership, DBA advanced capabilities of Oracle Grid
a lot of value in offering a free services, and training Control for tasks such as patching
Location: Concord, New
“light” version of software, as Hampshire
databases in an automated sched-
was done with Oracle Database Length of time using Oracle
ule, setting and scheduling Oracle
Express Edition. This lowers the products: 8 years RMAN [Oracle Recovery Manager]
barrier to entry but gives people backups on the fly, and issuing SQL
a database that can really grow scripts and OS commands against peerSPECS
with their products. any database or server. Company: S&I Systems, a
otn.oracle.com/community/ provider of enterprise infrastructure,
oracle_ace What would you like to see Oracle, business solutions, and integration
Torsten Schlautmann as a company, do more of? Oracle services
How did you get started in IT? I got a CPC 464 [a popular personal has demonstrated technical and Job title/description: Principal
consultant, presales/consulting,
computer produced in Europe in the 1980s] as a present for my thought leadership since its incep- interacting closely with Oracle and
15th birthday. After using it just for gaming for a while, I got tion in 1977. The most recent the Oracle community through
seminars, events, and blogs
bored and started to write my own applications in Assembler. example of innovative technology
Location: Singapore City,
My first “big” application was a is the announcement that we can Singapore
program to capture the contents of use Oracle Grid Control to back Oracle credentials: Oracle
Certified Master (Oracle Designer,
discs with a GUI. up our databases directly to the Oracle Developer) and Oracle
Now that you’re a pro, what’s your Amazon Elastic Compute Cloud. Certified Technician (Oracle
Database 10g), with 14 years of
favorite tool or technique on the job? My request would just be to keep experience using Oracle products
Even though I’m now much more up this leadership.
of a DBA and an architect, I still What green practices do you use
love to write code using PL/SQL. in your DBA work? I don’t print
I’ve never learned such a powerful anything—I keep everything as otn.oracle.com/community/
oracle_ace
programming language so easily. A electronic copies. ■
oracle magazine m aY / j u n e 2 0 0 9 25
UNITED D
Bring together the languages and
with Oracle development solutions
26 M AY / J U N E 2 0 0 9 ORACLE.COM/ORACLEMAGAZINE
D DEVELOPMENT
ages and technologies your applications demand
solutions.
ORACLE MAGAZINE M AY / J U N E 2 0 0 9 27
internal infrastructure issues. “A big chunk of our environment is devoted to services that
“Oracle WebLogic Server is a robust application server are used across applications throughout the company,” says
that helps us build on a core application that we know works Athreya. “SOA and Oracle WebLogic save us the effort of
28 m ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
“SOA and Oracle WebLogic save us the Clouds in the Development Forecast
effort of having to reinvent and rebuild a For companies that have big storage or development needs
piece of functionality, so it can be reused and want to access a larger network without having to main-
across multiple projects.” tain one, working in the cloud can provide a lot of advan-
tages: it’s fast, it’s easy, and it’s cost-effective.
—Prahlad Athreya, Principal Architect, Avis Budget Group “We’re seeing a move to reduce the time, complexity, and
cost of gaining access to computing resources and solutions,
and that’s exactly what cloud computing does,” says Mike
having to reinvent and rebuild a piece of functionality, so it Hichwa, vice president of software development, database
can be reused across multiple projects.” group, at Oracle. For example, while Oracle Application
Express or Oracle Database can be run locally for depart-
Securing the Vote mental solutions, they can also be run in the data center, or
Although businesses must be able to develop applications that even in the cloud.
can help them run more efficiently, it’s perhaps even more “You can get an Oracle database on Amazon’s [Elastic
important for democratic governments to have applications Compute] Cloud and use Oracle Application Express and
that can ensure fair and impartial elections. That’s why Ohio’s start building your Oracle-based application with no local
secretary of state turned to Oracle and Oracle Application hardware,” says Hichwa. “So you can sign up, get on the
Express—a no-cost feature of Oracle Database that enables internet, and in minutes—literally—you can procure an Oracle
organizations to rapidly develop browser-based database appli- database in the Amazon cloud and start using it. I came
cations—as the foundation for a brand-new election reporting across one blog that showed a customer who bought an
and monitoring solution. Oracle database in Amazon’s cloud, used it for eight hours,
The Ohio secretary of state is responsible for managing data then stopped, and paid less than $5. I don’t know too many
for corporation filings, Uniform Commercial Code filings, and other providers who can give you that type of service.” (See
monitoring and tracking of statewide campaign finance activi- Next Steps for information about using Oracle products on
ties, as well as the state’s election environment. It’s an indepen- the Amazon Elastic Compute Cloud.)
dent office that’s elected by the people of Ohio. But what if you’re not ready to develop your own database
When the current secretary of state, Jennifer Brunner, came application in the cloud? What’s a good way to get started
into office in January 2007, one of her primary goals was to in cloud-based application development? New concepts like
clean up the elections environment. There had been accusa- cloud computing can be hard to understand at first, but some-
tions of bias in the 2000 and 2004 elections, and she wanted times there are easy ways to wrap your head around them.
to ensure that Ohio’s elections were free, fair, open, and avail- “Starting to develop cloud-based applications can actually
able to everyone. be a very easy experience,” says Christian Schalk, a devel-
An important step was rewriting the election night report- oper advocate at Google. “You can often start by dropping a
ing system, along with the applications that maintain and little bit of JavaScript into your page and instantly turn your
report on elections across the state. Because the secretary of app into a cloud-based app that ties into a larger server-
state’s office was already primarily an Oracle shop running based cloud architecture.”
Oracle Database with Oracle Real Application Clusters (Oracle Schalk recommends that developers start by getting a feel
RAC), its technology team decided to take advantage of Oracle for the different cloud-based technologies that are available.
Application Express and use it as the basis for Ohio’s new elec- Among other things, developers can learn how easy it is to
tion reporting operations. (The secretary of state’s office desig- integrate an online map into an existing application.
nated civil service employees as the primary project managers “Using the Google Maps API is a nice example of how easy
for the new Oracle Application Express system and contracted it can be to create an application that ties into the cloud,” says
with an independent and unbiased consultancy, the James Schalk. “Just getting Google Maps to appear in an application
Group, for technical staff augmentation.) is a good use of cloud computing, and it’s incredibly easy.”
The secretary of state’s office used Oracle Application Once you’re familiar with the options, it’s possible to start
Express to develop three applications for election night report- building up and integrating with many online cloud services
ing, including a county submission utility and an elections and APIs.
administration package. All of these applications were inte- “If you’re coming from a traditional enterprise or server-side
grated into an Oracle Application Express environment and development environment, where you’re working on fairly
stress tested. Election systems aren’t used on a daily basis, complex technologies, you may be surprised to find that us-
but when they are used, they must be able to support the ing some of these mashable cloud-based technologies can
required workloads. be pretty easy,” says Schalk. “It’s also a lot of fun!”
“We went through a series of dry runs and stress testing
oracle magazine m ay / j u n e 2 0 0 9 29
to ensure that the Oracle and network of 21 advice
Application Express environ- centers across the U.K. About
ment could handle the load 300,000 unique visitors go
that we anticipated on election to its consumer Web site each
night,” says Robert Mangan, month for resources such as
chief information officer, Ohio energy-saving recommenda-
secretary of state’s office. “We tion applications.
stressed the bandwidth at A long-time Oracle customer,
275MB all the way up to 500MB the Energy Saving Trust had
and couldn’t bring the Oracle previously used a combination
Application Express site down of application development
or degrade the performance to tools and technologies, along
an unacceptable level. It worked with an Oracle database, to
really well for us.” create custom applications for
As a result, the new Oracle many of its business processes.
Application Express–based elec- That strategy has changed.
tions reporting applications “We’re trying to leverage off-
were rolled out in late 2007 the-shelf applications whenever
for a special election and for possible,” says Adam Spindler,
the 2008 primary and general The Ohio secretary of state’s office uses Oracle Application Express for its
IT manager at the Energy
elections. The county submis- new election reporting operations. “If there’s a wall with the tool, we haven’t Saving Trust. “As a result, our
sion module provided a secure hit it yet,” says Robert Mangan, CIO, Ohio secretary of state’s office. application development efforts
sockets connection that allowed are focused more on integra-
the county boards of elections access to the Ohio secretary of tion and being able to extend applications rather than writing
state’s Web site and gave them the ability to submit reports them from scratch.”
and results throughout the night of an election. The results In November 2008, the organization completed a major
were automatically pushed to the databases and the backup upgrade of its Web site, leveraging eZ Publish, an open source
sites by way of Oracle Streams. content management system that uses the Energy Saving
“Our biggest concern was whether Oracle Application Trust’s existing Oracle Database infrastructure. eZ Publish is
Express could take massive hits and massive usage over the written in PHP and has a PHP-extension-based architecture, so
Web, and that ended up not being an issue for it at all,”
Mangan says. During the 2008 general elections, the Web-
based application received close to 49 million hits in a six- snapshots
hour period on election night.
“It performed well. We met all of Secretary Brunner’s goals Avis Budget Group
www.avisbudgetgroup.com
for the election night operations,” says Mangan. “We’ve got Location: Parsippany, New Jersey
a great election monitoring tool now, and we’re planning on Employees: 30,000
expanding it over time and adding additional features.” Oracle products: Oracle WebLogic Server
The Ohio secretary of state’s office is now pushing Oracle
Application Express into initiatives for campaign finance and Office of the Ohio Secretary of State
voter registration. “If there’s a wall with the tool, we haven’t hit www.sos.state.oh.us
Location: Columbus, Ohio
it yet,” says Mangan.
Employees: 188
Oracle products: Oracle Database 10g, Oracle Real Application Clusters, Oracle
Leveraging infrastructure for robust appLications Application Express, Oracle Forms, Oracle Reports, Oracle Spatial, Oracle Streams,
Oracle Database delivers a database platform for building scal- Oracle JDeveloper, Oracle Application Server
able and reliable applications across multiple development
technologies, including PHP and Java. Open standards and Energy Saving Trust
www.energysavingtrust.org.uk
interoperability, which save time, money, and upkeep, are
Location: London, England
important for most companies. For one organization in the Employees: 247
U.K., open standards help save energy as well. Oracle products: Oracle Database 10g, Oracle Real Application Clusters,
Rick Zaidan
The Energy Saving Trust promotes the efficient use of Oracle Application Server
energy and a more low-carbon lifestyle through its Web site
30 m ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
“Oracle Database is just
the best on the market.
Using Oracle Database in
a cluster makes our life
so simple.”
—Adam Spindler, IT Manager,
Energy Saving Trust
nextSTEPS
by incorporating a Google Maps extension, which was built
using the Google Maps API, Ajax, PHP 5, and the Yahoo! User
Interface framework. The Google Maps extension allows users
READ about Oracle development tools
to find gas/refueling stations close to a specified location. oracle.com/tools
Spindler still sees the need for application development
LEARN about Oracle Application Express
skills—especially PL/SQL—and the Energy Saving Trust’s otn.oracle.com/products/database/application_express
application development team includes both Java and PL/SQL DOWNLOAD Oracle WebLogic Server
developers for creating custom applications or extensions. otn.oracle.com/software/products/ias/htdocs/wls_main.html
“PL/SQL is the perfect tool for doing data manipulation in VISIT
the database,” says Spindler. “We like Java, but when it comes the PHP Developer Center
otn.oracle.com/tech/php
to moving and crunching large amounts of data, like our
80 million rows, we love PL/SQL. PL/SQL does everything the Oracle Cloud Computing Center
otn.oracle.com/tech/cloud
we need.”
John Blythe
oracle magazine m ay / j u n e 2 0 0 9 31
By dav i d Bau m
TEST
FOR SUCCESS
Prevent errors, reduce downtime, and save
money with Oracle Application Testing Suite.
32 m ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
solutions that prevent costly application perfor- question: how can we become more efficient in
mance problems, avoid unplanned outages of the QA department while driving our testing pro-
business-critical applications, and automate the cesses forward?
manual steps involved in application testing. To better serve its customers and keep the
These QA goals were key for Meridian LMS performing optimally, Downs and his team
Knowledge Solutions, which wanted to establish follow proven methods for control processes,
processes that would make its entire application testing, documentation, and review procedures,
testing lifecycle more efficient. The company, a as well as creating templates and guidelines
subsidiary of Visionary Integration Professionals, for QA deliverables. Oracle Test Manager for
provides learning management system (LMS) and Web Applications, one component of Oracle
learning content management system software. Application Testing Suite, helps them bring all
Meridian serves 4.5 million users at more than these pieces together while enabling collaborative
200 public and private sector employers. For communication through a common portal.
this educational software company, testing isn’t The biggest advantage of the Oracle software,
something that their end users do after they’ve according to Downs, is its simplicity: all funda-
mastered the material. Testing starts at home. mental areas of the software lifecycle are avail-
“We didn’t want to simply develop our testing able in a simple and intuitive interface.
processes around an application,” says James “Oracle offers three important testing modules
Downs, product QA manager at Meridian. “We integrated into one interface,” says Downs. (For
wanted to define processes that would make us a description of the testing modules, see the
more efficient so we could better manage our sidebar, “Oracle Application Testing Suite:
application testing lifecycle from beginning to end.” Putting It All Together,” page 34.) “Requirements,
As part of defining their processes—as well as test management, and defect tracking are all
managing application testing lifecycles—QA pro- bundled together, which is fantastic for traceabil-
fessionals at Meridian asked themselves a simple ity purposes. When you’re trying to itemize
I-Hua CHen
oracle magazine m ay / j u n e 2 0 0 9 33
things, it is easier to have them all “We focus on making sound
in one place.” decisions for all areas that we
One of the most time- want to fix, from requirements
consuming QA tasks for Meridian management to development
involves creating traceability to QA to the change process,”
between requirements, tests, and explains Downs. “It’
s all about
defects. “By allowing users to asso- repeatability. You want to devise
ciate requirements to tests, tests to procedures that are cyclical, con-
issues, and issues to requirements, sistent, and predictable.”
Oracle Test Manager for Web
Applications provides traceability No LaughiNg Matter
and mapping that aids in our CCB Consistent and predictable applica-
[change control board] process, tion performance under extreme
issue resolution, and testing prepa- conditions is paramount for Comic
ration and execution,” Downs Relief, a U.K.-based charity whose
says. That functionality has big
“Oracle’s traceability capabilities vision is “a just world free from
payoffs for Meridian. alone save our team days, if not poverty” and whose mission
“Oracle’s traceability capabili- weeks, on every release.” is “positive change through
ties alone save our team days, if the power of entertainment.”
not weeks, on every release,” says —James Downs, Product QA Manager, Established in 1985 by comedians
Downs. “These capabilities sys- Meridian Knowledge Systems with a passion for helping others,
tematically cover our functionality each year Comic Relief runs a
and prevent a lot of upkeep and overhead.” major fundraising campaign—either Red Nose Day or Sport
Meridian’s application testing procedures are built both for Relief, which are held in alternate years.
today’s requirements and with an eye to the future. During these campaigns, Web site performance is critical.
34 m ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
Comic Relief uses Oracle Load Testing for Web Applications,
one of the three primary Oracle Application Testing Suite
modules, to define and manage a comprehensive testing
process that includes validating the functionality of its Web
applications and ensuring that those applications can
perform well even when the organization experiences huge
spikes in traffic.
Comic Relief’s Web application testing processes ensure
that people visiting the organization’s fundraising sites can get
information and make donations quickly. “Oracle Load Testing
for Web Applications includes infrastructure performance
monitors that record metrics on Web servers, application
servers, databases, and other infrastructure components,” says
Charlotte Melén, Web technology manager at Comic Relief.
“That’s been really useful.”
Comic Relief’s test campaigns follow a set process that
begins with performance testing and tuning and then moves
on to load and stress testing. Oracle Application Testing Suite
helps the QA team define and manage these testing processes,
validate application functionality, and ensure that Comic
Relief’s Web properties perform under the anticipated demand.
Comic Relief’s testing procedures include simulating 30,000
simultaneous users and measuring the effect of the load on
application performance.
During extensive load testing leading up to Red Nose Day
2007, Oracle Load Testing for Web Applications was instru-
mental in ensuring that the online donation application would
be able to handle traffic processed by 9,800 call center agents. Comic Relief requires dependable Web site performance. “Oracle Load Testing for
“Thanks to our systematic testing efforts, we were confident Web Applications includes infrastructure performance monitors that record metrics
on infrastructure components,” says Charlotte Melén, Web technology manager.
that our infrastructure would be able to handle the tremendous
demands it would experience during the event,” Melén says.
The site performed as testing thoroughly is the key to application success. “I would
planned. Comic Relief pro- advise anyone putting in place a business-critical Web applica-
snap shots cessed more than 450,000 tion to test thoroughly,” she says. “It’s a key quality assurance
transactions during a seven- measure to show whether or not an application will perform
Meridian Knowledge Solutions hour period. During peak under traffic. We certainly could not run our campaigns
(a subsidiary of Visionary Integration
Professionals) loads, the site processed an without such rigorous testing.”
www.meridianksi.com average of 54 transactions James Downs from Meridian Knowledge Solutions
Location: Chantilly, Virginia per second. Comic Relief acknowledges the importance of application testing and the
Industry: Software and services is planning for three times value of the Oracle testing tools to his team: “Oracle has pro-
Revenue: US$13 million that amount of traffic for vided a relatively low-cost solution that supports almost all
Employees: 80 the 2009 Red Nose Day aspects of our product development lifecycle.” ■
Oracle products: Oracle Application
campaign. “We’ll be testing
Testing Suite, Oracle Database
for peaks of 150 transac- David Baum (david@dbaumcomm.com) is a freelance business writer based in
Comic Relief tions per second to ensure Santa Barbara, California.
www.comicrelief.com we can handle an expected
Location: London, England 750,000 transactions in
Industry: Charity
Revenue: US$136 million
Employees: 120
six hours,” Melén says.
“This will allow us to walk
nextSTEPS
into Red Nose Day 2009 READ about ensuring Web service quality with
Oracle products: Oracle Load Testing Oracle Application Testing Suite
for Web Applications, Oracle Database, with confidence that the oracle.com/enterprise_manager/docs/ensuring-web-service-quality-whitepaper.pdf
Oracle Application Server, Oracle Data Web site will perform
DOWNLOAD Oracle Application Testing Suite
john blythe
oracle magazine m ay / j u n e 2 0 0 9 35
I-Hua CHen
36 m ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
By a lan jo ch
oracle magazine m ay / j u n e 2 0 0 9 37
Multiple CoMbinations
Organizations such as Volume and Olam use Oracle Database
pendent research firm.
“They may already be
snap shots
11g and other Oracle products as a foundation for enterprise- an Oracle customer with Volume Group
class IT reliability, scalability, and security. At the same time, IT a database administra- www.volume.co.uk
staffs, particularly those in small and midsize companies, con- tion staff that’s expert Location: Berkshire, England
Industry: Marketing communications
tinue to benefit from their expertise with the Windows operat- in Oracle technol-
Revenue: US$8.4 million
ing system and Microsoft’s .NET development environment. ogy, and the company Employees: 83
Oracle/Microsoft users often fall into two main groups, says is simply extending Oracle products: Oracle Database,
Carl Olofson, research vice president for information manage- the environment to Oracle Developer Tools for Visual Studio
ment and data integration software research at IDC, an inde- get certain advan-
tages from Microsoft Olam International
Windows Server,” he www.olamonline.com
Location: Singapore
extending a developing Hand says. “A second group
Industry: Supply chain management
has determined that Revenue: SG$8.1 billion
Oracle Developer Tools for Visual Studio, Oracle Data Provider for Oracle Database is the Employees: 100
.NET (ODP.NET), and Oracle Database 11g extend many capabilities right RDBMS for their Oracle products: Oracle Database,
to organizations that integrate Oracle and Microsoft technologies. Windows-based applica- Oracle Application Server, Oracle Forms,
These important tools and features include tions and development Oracle Developer Suite, Oracle JDeveloper,
Oracle Financials
activities, and finds that
ORacLE DEVELOpER TOOLs fOR VIsuaL sTuDIO
Oracle works well in
Oracle Developer Tools for Visual Studio integrates tightly with
combination with Microsoft technologies.”
Microsoft Visual Studio to make it easy for .NET developers to
perform database tasks, generate SQL scripts automatically and
solid perforManCe
check them into source control, support Oracle user-defined types,
In addition to its more traditional marketing communica-
generate code automatically for Microsoft Office projects, and more.
tions business, Volume creates learning management systems
ORacLE pROVIDERs fOR asp.NET that support its international clients’ technical sales and call
Oracle Providers for ASP.NET, included with Oracle Developer Tools center agents. It sought a competitive edge for these applica-
for Visual Studio, enables Oracle Web application developers to tions, but at the same time, it wasn’t ready to ditch its .NET
take advantage of Microsoft Visual Studio Web controls for login applications or ignore its IT staff’s expertise in the develop-
authentication, site map, session state, and more to generate Web ment environment.
applications without writing code and store the Web site state in “We’re at a critical time in our evolution as a relatively
Oracle Database. small and independent company,” Volume’s Sykes says.
“We’re now competing against the large global advertising
ODp.NET suppORT fOR cachING
networks, and technology has become the driver to differen-
ODP.NET provides unique .NET caching features that improve data-
tiate Volume in the marketplace.” But as Volume grew, it “hit
base performance. The Oracle client result cache improves query
a performance ceiling” with Microsoft SQL Server, according
performance by enabling client-side caching of SQL query result
to Sykes. “We needed something like Oracle Database 11g to
sets in memory, and it automatically keeps client data consistent
give us that performance hike, improve security, and expand
with the database. Oracle statement caching speeds statement
scalability,” he says. That’s the reason that Volume recently
execution for frequently executed PL/SQL and SQL statements.
migrated to Oracle Database 11g.
ODp.NET suppORT fOR cLusTERING “The time frame our technology team gave me for migrat-
ODP.NET load balancing intelligently dispenses connections to the ing from SQL Server to Oracle Database 11g was quite long,
least-loaded database service, service member, or node in a data- because their perception was that it would be a lengthy and
base cluster, ensuring a well-balanced cluster. If a database service painful process,” Sykes says. But that wasn’t the case.
fails, ODP.NET ensures new connection requests are serviced by an “We factored in time for some potential disruption, but
existing service in Oracle Real Application Clusters or an existing the migration hasn’t affected the delivery of our applications
database in an Oracle Data Guard setup. at all,” he says. “In some cases, the move actually sped up
the implementation of some applications.”
ORacLE DaTabasE 11g suppORT fOR acTIVE DIREcTORy
In real-world terms, the added database power enables
Oracle Database 11g supports native integration with Microsoft
Volume to pitch larger, more lucrative projects. “Two years
Windows Active Directory, so Oracle database and configuration
ago, the average revenues from our applications ranged
tools can use a Windows user’s logins to connect directly into
between £50,000 and £100,000. Now, they’re averag-
Windows security management system.
ing between £250,000 and £500,000. We couldn’t do that
38 m ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
without Oracle,” Sykes says. Tools for Visual Studio] to be
The opportunity to very important,” says IDC’s
move to a more power- Olofson. “They’re critical
ful database and stay with to the adoption of Oracle
a familiar operating system technology in the Microsoft
platform proved attractive environment because .NET is
to Olam as well. The com- where Windows developers
pany chose to upgrade its do their work. These tools
older Oracle databases to mean developers don’t have
Oracle Database 11g despite to make a paradigm shift to
the potential of Microsoft move from, say, SQL Server
SQL Server. to Oracle.”
“Oracle provides much
better scalability, performance, a Competitive edge
and availability capabilities Volume’s Sykes sees that
than Microsoft SQL Server, “We hit a performance ceiling with Oracle and Microsoft together
so it doesn’t make sense to offer high-performing and
switch to some other technol-
Microsoft SQL Server. We needed . . . flexible solutions at economi-
ogy when you’re already using Oracle Database 11g to give us that cal prices. Initially, he says,
a top-of-the-line database,” performance hike [and] improve security.” his staff was skeptical that
Olam’s Manikandan says. Oracle technology would be
Olam considered Microsoft —Chris Sykes, CEO, Volume Group affordable for a company of
SQL Server less flexible Volume’s size.
because it runs only on the Microsoft platform, a fact that “There is a perception that Oracle is big and expensive and
would impede Olam’s switch to Linux or UNIX if it were to has no place in a small enterprise,” he recalls. “But we actually
consider an operating system change sometime in the future. found the opposite: Oracle was accessible, and it
Upcoming decisions about applications also influenced was affordable.”
Olam’s database decision. “We’re looking at some very top- Oracle technology also offers Volume an intangible benefit
of-the-line risk-management solutions that are very resource that helps it differentiate itself against tough global competi-
intensive,” Manikandan says. “They only run on high-end tors. “Clients like the fact that enterprise-level capabilities
databases like Oracle.” can be delivered by an agency like ours,” he says. “That gives
us a massive amount of credibility.” ■
Rapid development
In addition to performance advantages, Oracle Database on Alan Joch (ajoch@worldpath.net) is a technology writer based in New England who
Windows can be good news for a programming staff, thanks specializes in enterprise, Web, and high-performance-computing applications.
to the close integration between Oracle Database 11g and
Microsoft’s Visual Studio development platform. Developers
who use the .NET Framework can access Oracle Database nextSTEPS
11g via Oracle Data Provider for .NET (ODP.NET) and Oracle READ about
Developer Tools for Visual Studio. Oracle Database 11g
“ODP.NET and Oracle Developer Tools for Visual Studio oracle.com/database
allow .NET developers to use existing .NET applications Oracle Database 11g on Windows
otn.oracle.com/tech/windows/wp/Oracle_Database_11g_on_Windows_
and program against Oracle databases without any learn- Dev_Deploy_TWP.pdf
ing curve,” says Santanu Datta, senior director of Windows
new Oracle Database 11g features in Oracle Developer Tools
development at Oracle. “This eases Oracle/Microsoft technol- for Visual Studio
ogy integrations and speeds migrations from SQL Server to otn.oracle.com/tech/dotnet/pdf/ODT11_whatsnew.pdf
Oracle databases.” VISIT
Oracle Developer Tools for Visual Studio natively sup- the Windows Server System Center
otn.oracle.com/tech/windows
ports Microsoft Visual Studio 2008 and 2005 versions and
includes program design tools, automatic .NET code genera- the .NET Developer Center
otn.oracle.com/tech/dotnet
tion, source control integration, and an integrated PL/SQL
John Blythe
Oracle magazine m ay / j u n e 2 0 0 9 39
racle Pre
O
ss
15years
M
c G r a w - Hil
Celebrating 15 Years as Your
l
Destination for oracle expertise
Written by leading Oracle professionals, Oracle Press books offer the most definitive,
complete, and up-to-date coverage of Oracle products and technologies available.
For 15 years, oracle press has been the premier source for oracle information.
oracle magazine M ay / j u n e 2 0 0 9 41
frameworks
the oracle.jbo.server package, and then augment the default functionality of your figuring the Model project to depend on
click OK. Finally, uncheck the Generate application modules. the FwkExtensions project. This enables
Default Constructor check box and Next, expand the Resources folder in the components in the Model project to
click OK to create the skeleton frame- the FwkExtensions project and double- reference classes that the FwkExtensions
work extension class. Your framework click the ApplicationModuleCode project contains. Double-click the Model
extensions project now has an extension .txt file, which contains the lines of project in the Application Navigator, and
class for entity objects, view objects, and custom code to add. In the editor, when the Project Properties dialog box
application modules. Although these select all the lines in this file (Ctrl-A) appears, select the Dependencies section
aren’t the only framework classes you and copy them to the clipboard with on the left. Click the pencil icon above
can override, they are the three most Ctrl-C. Click the tab containing the the Dependent Projects and Archives
common, and the steps for extending and CustomApplicationModuleImpl list to edit its contents. When the Edit
using the other base classes are the same. source file to activate it in the editor, place Dependencies dialog box appears, expand
the cursor at the end of the super the FwkExtensions.jpr node in the
Enabling OptiOnal SQl tracing .prepareSession(); line (after the semi- Projects list and check the check box
The first simple framework extension colon), and press Enter to open a blank next to the Build Output node. This indi-
you create will add a feature to applica- line below it. Paste the contents of the cates that the FwkExtensions project’s
tion module components that will enable clipboard into the source file, by pressing compiled classes should be added to the
Oracle Database SQL tracing if a par- Ctrl-V. A few wavy underlines will appear, Model project’s dependencies. Click OK
ticular Java system property is set in the indicating that import statements are to return to the Project Properties dialog
runtime environment. This will simplify missing. To include the required imports, box. While you’re here, because the
the process of identifying SQL statements place your cursor over the first underlined framework extension class’s functionality
your application executes that might be exception name, SQLStmtException, and depends on the presence of a Java system
slow, requiring an additional index or a note that a tooltip displays “Import oracle property named sqltrace, add a Java
change to the WHERE clause to improve .jbo.SQLStmtException (Alt-Enter).” Press command-line option to set the value of
performance. You’ll accomplish this by the Alt-Enter key combination to auto- this property accordingly. Select the Run/
overriding the prepareSession() method matically include the necessary import Debug/Profile section at the left, ensure
of the application module to add custom statement. Then repeat these steps by that the Default run configuration is
code that will run when the application placing your cursor over the next wavy- selected in the list on the right, and then
module is first used in a user session. underlined exception name, SQLException, click Edit. On the Launch Settings panel
To begin, ensure that the tab contain- and use Alt-Enter to include the import of the Edit Run Configuration dialog box
ing the CustomApplicationModuleImpl for that exception as well. that appears, find the Java Options field
source code file is active by clicking Having taken care of the missing and type -Dsqltrace=true. (The format is
your cursor somewhere in the code import warnings, study the lines of code a hyphen followed immediately by an
editor. Note that, in addition to the for a moment. They say that if the Java uppercase D [it’s case-sensitive!] immedi-
main Oracle JDeveloper IDE toolbar, system property named sqltrace is set to ately followed by the param=value for the
the code editor has its own toolbar of the value true then execute ALTER SESSION system parameter you want to set.) Click
useful options for working with source SET SQL_TRACE TRUE on (the connection OK to continue and OK again to dismiss
code. Pass the cursor over the toolbar associated with) the current transaction. the Project Properties dialog box.
buttons, reading the tooltips that appear, The try/catch block handles the exception With this project dependency regis-
until you find the Override Methods (SQLStmtException) that might occur if tered, configure the HRModule com-
button, and then click it. When the the current user has not been granted the ponent to use the framework extension
Override Methods dialog box appears, ALTER SESSION privilege, and it prints class. In the Application Navigator,
note that the Methods list shows you out a helpful message letting developers in the Model folder, under oramag
all the methods you can override. Begin know to ask their DBA for the privilege. .model, double-click HRModule to
typing the initial letters of the method open its editor. Select the Java page of
named prepareSession until it scrolls putting a FramEwOrk ExtEnSiOn the editor, and click the pencil icon to
into view, click the check box next to claSS tO wOrk the right of the Java Classes heading
the prepareSession(Session) method, and For a framework extension class to be to edit the Java Classes settings. When
then click OK to override this method. used at runtime, you need to reference it the Select Java Options dialog box
Note that Oracle JDeveloper includes the as the base class of the component that appears, click the Classes Extend
appropriate method signature along with should make use of it. So, next you’ll button to see the current settings for
the call to super.prepareSession(), which configure the HRModule application the classes this component extends.
invokes the built-in functionality inher- module in the Model project to use the When the Override Base Classes dialog
ited from the superclass. You can add CustomApplicationModuleImpl exten- box appears, click the Browse button
custom code before or after this line to sion class you just created. Start by con- next to the Object field to pick the new
42 m ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
base class for this application module.
In the Find Superclass dialog box, click
in the Match Class field and begin
typing the first letters of the class name
CustomApplicationModuleImpl. After the
first few letters, your extension class will
appear in the list, so select it and then
click OK to use this base class, as shown
in Figure 1. Click OK to dismiss the
Override Base Classes dialog box and
then OK again to dismiss the Select Java
Options dialog box.
At this point, right-click HRModule
in the Application Navigator and choose
Run to test it. After clicking Connect Figure 1: Configuring a component to use a custom framework extension as a base class
oracle magazine m ay / j u n e 2 0 0 9 43
frameworks
current user’s locale. Double-click in ADF framework extensions across mul- DowNLoaD
the Property value cell in the new tiple applications. For more information oracle JDeveloper 11g
otn.oracle.com/software/products/jdev
row of the custom property table that on how to package your extensions as
the starter workspace for this column
appears. Change the value of this cell a reusable library and how your team otn.oracle.com/oramag/oracle/09-may/o39frame.zip
to be SequenceName. Double-click the can configure Oracle JDeveloper to
44 m ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
d e v e l o p e r ODP.NET By m ar k W illi am s
oracle magazine m ay / j u n e 2 0 0 9 45
ODP.NET
database transactions (in fact, it is the The sample application also uses a actions becomes visible to other data-
example used in this column’s sample new database table. To create this table, base sessions.
application) is the transfer of funds you can use your favorite tool, such as Even though this is a simple applica-
from one bank account to another. Oracle Developer Tools for Visual Studio tion, you can also use it to further exper-
This bank transfer transaction naturally .NET, Oracle SQL Developer, SQL*Plus, iment with the ODP.NET transactions.
involves two steps: or another tool. Here is the SQL I used Here are a few suggested experiments:
1. Decrement the source account by the to create the table: ■ Alter the code so that the initial values
tions are used in this case, however, Next I added two rows of data to the stopping the debugger during the
and there is a failure after the first step table, using SQL*Plus, as follows: explicit transaction (the funds trans-
(which is implicitly committed) but fer). To do this, select Debug -> Stop
before the second step, the data may insert into MayJun2009 Debugging from the main menu.
become logically inconsistent. That is, values (1, 1000); ■ Change the transfer transaction code
money “has gone missing” because the to use implicit transactions, and then
balance in the first account has been insert into MayJun2009 simulate an application failure by stop-
decremented (and committed) but the values (2, 1000); ping the debugger after the first balance
balance in the second account has not transfer command execution. ■
yet been incremented. commit;
Determining when to use each trans- Mark Williams (mawilliams@cheshamdbs
action type is a straightforward process. To create the sample application, .com) is an Oracle ACE director, an Oracle Certified
Use the explicit transaction if either of create a new .NET console applica- Professional DBA, the author of Pro .NET Oracle
the following is true: tion, add a reference to the ODP.NET Programming (Apress, 2004), and a contributor to
■ The transaction consists of multiple assembly on your system, and replace the Oracle Data Provider for .NET forum on Oracle
steps. the generated code with the code from Technology Network.
■ You want to explicitly control the the Program.cs file in the download at
commit or the rollback. otn.oracle.com/oramag/oracle/09-may/
Use the implicit transaction if both of
the following are true:
o39odpnet.zip.
The sample application performs the nextSTEPS
■ The transaction consists of a single following basic steps: READ more ODP.NET
step. 1. Updates the balance for Account ID 1, otn.oracle.com/oramag/oracle/odpnet
■ You are willing to accept the automatic using an implicit transaction LEARN more about
commit or rollback. 2. Transfers funds from Account ID 1 ODP.NET
Oracle Data Provider for .NET Developer’s Guide
into Account ID 2, using an explicit download.oracle.com/docs/cd/B28359_01/win.111/
The Sample applicaTion transaction, by first decrementing b28375/toc.htm
This column’s sample application is Account ID 1 and then incrementing Oracle Database 2 Day + .NET Developer’s Guide
download.oracle.com/docs/cd/B28359_01/
a very simple implementation of the Account ID 2 (both steps are required appdev.111/b28844/toc.htm
classic transaction example: transfer- for the transaction) Oracle Database Net Services Administrator’s Guide
download.oracle.com/docs/cd/B28359_01/
ring funds from one account into 3. Resets the starting balance of both network.111/b28316/toc.htm
another. The comments in the code accounts, using an implicit transaction
transactions
indicate where an implicit transaction is (which allows the sample to be easily Oracle Database Concepts
employed and where an explicit transac- re-executed) download.oracle.com/docs/cd/B28359_01/server.111/
b28318/transact.htm#i6564
tion is employed. Now execute the sample applica-
EXPLORE
The sample application connects with tion in Visual Studio. To see the dif-
the .NET Developer Center
the HR sample user that ships as part ference between implicit and explicit otn.oracle.com/tech/dotnet
of Oracle Database. Of course, you can transactions, step through the code in DOWNLOAD
choose to connect the sample applica- debug mode. I also recommend that Oracle Data Access Components
tion to any database user in your envi- you use your favorite tool to query the otn.oracle.com/software/tech/windows/odpnet
ronment. If you do connect to a different MayJun2009 sample database table the sample code for this column
otn.oracle.com/oramag/oracle/09-may/
user, adjust the sample application code during the various steps to clearly see o39odpnet.zip
to connect to that user. when the data resulting from the trans-
46 M ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
d e v e l o p e r PL/SQL PracticeS By steven feu erstein
oracle magazine m ay / j u n e 2 0 0 9 47
pl/sql practices
Note that I have put the open and Listing 3 shows the implementation of the name of the value (“Maximum salary”)
close parentheses “()” after the call to the the number_value function only, because twice. See Listing 5 for a better solution.
function. This is optional, but it is a way that is what I’ve used in this column. Another way to use the magic values
to self-document that you are calling a With the get_magic_values package defined in a table is to generate a
function and not referencing a variable defined and the data inserted, I can package of constants or functions from
or a constant. rewrite my IF statement that references the rows of the table. The magic_values
Store and manage the magic value in a maximum salary, as shown in Listing 4. .sql script, available with the download
database table. Suppose you have many Now, unfortunately, I have hard-coded for this column, at otn.oracle.com/
magic values in your application and are
concerned about making sure that they codelistiNG 2: get_magic_values package specification
are handled consistently without any PACKAGE get_magic_values
hard-coding. You might consider creat- IS
ing a database table to store and manage FUNCTION varchar2_value (NAME_IN IN magic_values.name%TYPE)
RETURN varchar2
all these magic values. Listing 1 shows $IF dbms_db_version.ver_le_10_2
an example of such a table, named $THEN
magic_values. /* No result cache available prior to Oracle Database 11g */
$ELSE
In the magic_values table, the name RESULT_CACHE
column is for the name of the magic $END
value, such as “Maximum salary allowed ;
48 M ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
oramag/oracle/09-may/o39plsql.zip, tion. That’s where those other columns of , hide_values_in_body_in => FALSE
offers such a generator, the gen_magic_ the magic_values table come into play. , dir_in => NULL
values_package procedure. Suppose I now populate the magic_ , ext_in => NULL
To generate such a package, this values table, providing values for all );
procedure needs to know the valid columns as shown in Listing 6. END;
PL/SQL identifier for this magic value, the I then call the generator procedure:
datatype of the magic value, and (when and my screen (through server output)
relying on functions to retrieve the value) BEGIN displays the package specification:
an unconstrained version of that datatype gen_magic_values_package (
to serve as the return type of the func- pkg_name_in => ‘GET_MAGIC_VALUES’ CREATE OR REPLACE PACKAGE
get_magic_values
codeLISTING 4: IF statement with two references to “Maximum salary” IS
IF l_new_salary > get_magic_values.number_value (‘Maximum salary’) /*
THEN You cannot earn more than this
RAISE_APPLICATION_ERROR (-20001,
‘Maximum salary of ‘ || get_magic_values.number_value (‘Maximum salary’) || ‘ exceeded!’); in a single year.
END IF; */
maximum_salary NUMBER
codeLISTING 5: Improved IF statement DEFAULT 1000000;
/*
DECLARE
c_max_salary CONSTANT NUMBER
The application will not work
:= get_magic_values.number_value (‘Maximum salary’) ; with dates before this.
l_new_salary NUMBER := get_the_salary (); */
BEGIN
IF l_new_salary > c_max_salary
minimum_date DATE
THEN DEFAULT ADD_MONTHS (SYSDATE, -60);
RAISE_APPLICATION_ERROR (-20001
, ‘Maximum salary of ‘ || c_max_salary || ‘ exceeded!’);
END IF;
open_status VARCHAR2 (4)
END; DEFAULT ‘OPEN’;
END get_magic_values;
codeLISTING 6: Populating the magic_values table
The online version of this column, at
BEGIN
INSERT INTO magic_values otn.oracle.com/oramag/oracle/09-may/
VALUES ( o39plsql.html, compares the benefits of
‘Maximum salary’ the different ways to avoid hard-coding
, ‘You cannot earn more than this in a single year.’
, ‘1000000’ literal magic values. ■
, ‘maximum_salary’
, ‘NUMBER’ Steven Feuerstein (steven.feuerstein@quest.com) is
, NULL
); Quest Software’s PL/SQL evangelist. He has published
10 books on Oracle’s programming language, including
INSERT INTO magic_values Oracle PL/SQL Programming and Oracle PL/SQL Best
VALUES (
‘Earliest supported date’ Practices (O’Reilly Media). Feuerstein’s self-appointed
, ‘The application will not work with dates before this.’ mission in life these days is to improve the quality and
, ‘ADD_MONTHS (SYSDATE, -60)’ quantity of PL/SQL code testing.
, ‘minimum_date’
, ‘DATE’
nextSTEPS
, NULL
);
COMMIT; magic_values.sql
END; otn.oracle.com/oramag/oracle/09-may/o39plsql.zip
oracle magazine m ay / j u n e 2 0 0 9 49
Ease into XBRL
compliance with
the complete set of
tools from Altova®
Converting Forms
Modernize Oracle Forms applications with Oracle Application Express.
racle Forms has been around and various item types, but it does not Converting Oracle Forms Source to XML
since before the days of client/ convert business logic stored in Oracle Although the XML file equivalents for
server computing, and numer- Forms triggers, program units, or librar- each of the Oracle Forms source files are
ous Oracle Forms applications ies. After you generate the initial design, already included in the download for
have been faithfully meeting business you can take full advantage of the rapid this column, you should know how to
requirements for many years. application development capabilities in perform this conversion on your own.
Converting Oracle Forms applica- Oracle Application Express to enhance The Oracle Forms-to-XML conversion
tions to use another development tool the generated pages. Figure 1 describes tool, Forms2XML, produces an XML
is a labor-intensive, time-consuming the process flow of an application file that has the same base name as
process, and recent rumors that Oracle migration from Oracle Forms to Oracle the Oracle Forms file but with an .xml
will soon drop support for Oracle Application Express. extension. For example, stndrd20
Forms are unfounded. With these things For this column, we will convert .olb becomes stndrd20_olb.xml. The
in mind, why would anyone want to some components from the Oracle Forms command has the following syntax:
convert their Oracle Forms applications Summit sample application. In particular,
to use another development tool? we are going to use the customers.fmb, frmf2xml [options] file1 [file2...]
Typically, Oracle Forms moderniza- customers.mmb, orders.fmb, stndrd20 java oracle.forms.util.xmltools.Forms2XML
tion projects convert legacy applications .olb, and wizard.pld files. The modified [options] file1 [file2...]
to use the latest Oracle Database version script files to create the required tables,
and enable developers to satisfy user together with the XML file conversions Note that you can generate your own
demands for greater user interactivity for each of the source files, are available XML files for the sample application
and Web 2.0 capabilities. A moderniza- at otn.oracle.com/oramag/oracle/09- by using Forms2XML and the Oracle
tion option for Oracle Forms applica- may/o39browser.zip. The steps in this Forms files in the complete Summit
tions that will deliver on both of these column assume that you have an Oracle application download at otn.oracle.com/
objectives is Oracle Application Express. Application Express 3.2 workspace products/forms/files/summit10gr2.zip.
Oracle Application Express renders defined and have downloaded and (Forms2XML was first introduced in
applications using HTML, and it has extracted the o39browser.zip file. Oracle9i Internet Developer Suite.)
built-in Web 2.0 functionality such as
interactive reports, Flash charts, and
the ability to extend user interactivity
by use of JavaScript and Asynchronous Forms Module
XML File Upload
FMB File
JavaScript and XML (Ajax). In addition,
the rapid application development envi- Object Library Forms2XML
Oracle Forms
ms and Oracle
OLB File Conversion
ronment offered by Oracle Application Tool
Reports Metadata Analysis
Application Customization
Understanding the Conversion Process
The capabilities for converting from
Oracle Forms to Oracle Application Reports Builder
Report
XML File File Conversion
Express in Oracle Application Express Utility
3.2 generate an initial application design Oracle Reports
Oracle Application Express
that you then enhance and expand to Forms Converter
fully replicate the original application.
The conversion maps blocks to pages Figure 1: From Oracle Forms to Oracle Application Express
oracle magazine M ay / J u n e 2 0 0 9 51
Creating the Conversion ProjeCt home page, click Application Migrations 1. From the Project: Summit page
For an Oracle Application Express (on the right within Migrations). (Home -> Application Migrations ->
project to load Oracle Forms files, it 2. Click Create Project. Project: Summit), under File Name,
must be associated with the schema 3. Enter Summit for Project Name, click click orders_fmb.xml to go to the
where the underlying tables are defined. Browse, select the customers_fmb.xml Forms Objects page.
The following steps use files contained in file, click Open, and click Next. 2. Click the Blocks link, and under
the sample application download for this 4. Click Upload Another File, click Name, click S_ORD to go to the Block
column and describe how to create the Browse, select the orders_fmb.xml file, Details page.
Summit sample application tables: click Open, and click Upload. 3. Within the Application Express Page
1. From the Oracle Application Express 5. Click Upload Another File, select Query box, select Custom Query from
home page, select SQL Workshop -> PL/SQL Library (.PLD) from the File the Use Query list.
SQL Scripts -> Upload. Type list, click Browse, select the wizard 4. Click the copy icon under Enhanced
2. Click Browse, select the Summit_ .pld file, click Open, and click Upload. Query.
DDL.sql file, click Open, and click 6. Click Upload Another File, select 5. Modify the SQL in the Custom Query
Upload. Forms Menu (_mmb.XML) from the text box as required. Note that for this
3. From the SQL Scripts page, click File Type list, click Browse, select the exercise, no modifications are needed.
Upload, click Browse, select the customers_mmb.XML file, click Open, 6. Click Apply Changes at the top of
Summit_Data.sql file, click Open, and and click Upload. the page.
click Upload. 7. Click Upload Another File, select The following steps show how to
4. Click the Summit_DDL.sql file; Object Library (_olb.XML) from the select or deselect blocks and items to be
click Run; and then from the Run Script File Type list, click Browse, select the included in the generated application
page, click Run again. stndrd20_olb.XML file, click Open, and how to change titles and labels:
5. From the Manage Script Results page, and click Upload. 1. From the Project: Summit page,
click Go until Status shows Complete. 8. Click Finish. under Blocks, click 4 (to go to the
6. Click the View Results icon. Note Figure 2 shows the newly created blocks defined on the Orders Form).
that the value for Statements Processed Oracle Forms conversion project. 2. Under Include, uncheck the
and Successful should be 58. S_ITEM block.
7. Click the SQL Scripts locator link. reviewing and analyzing your ProjeCt 3. Change the name of the S_ORD
8. Click the Summit_Data.sql file, and Once you have created your migration block to Orders and the S_INVENTORY
click Run; then from the Run Script project, you can review the components block to Inventories.
page, click Run again. and determine which user interface com- 4. Click Apply Changes.
9. From the Manage Script Results page, ponents to generate. The project enables 5. Under Item Count, click 9 (to go
click Go until Status shows Complete. you to quickly drill down into any of to the items defined on the Orders
10. Click the Show Results icon. Note the Oracle Forms components, includ- [S_Ord] block).
that the value for Statements Processed ing blocks, items, triggers, lists of values 6. Change Item Prompt for Customer
and Successful should be 1173. (LOVs), and program units. Id to Customer and Item Prompt for
With the database tables created, use A block query is based on analysis of Sales Rep Id to Sales Representative.
the XML files generated by Forms2XML the corresponding SQL and postquery 7. Click Apply Changes.
(and included with the sample applica- triggers from the form’s block. The follow- To facilitate project management of
tion) and the following steps to create the ing steps show how to modify an Oracle the application conversion, each compo-
conversion project: Application Express query that will be nent can be annotated with the following
1. From the Oracle Application Express generated from an Oracle Forms block: types of information:
52 M ay / J u n e 2 0 0 9 oracle.com/oraclemagazine
3. At this point, you can modify user
interface details (by clicking Page name)
as well as remove unwanted pages or add
more pages. For this exercise, no modifi-
cations are needed, so click next.
4. Select the desired theme, Theme 20;
click next; and click Create.
5. Click Run Application.
Once you have generated your Oracle
Application Express application, you will
need to perform postgeneration modifica-
tions to incorporate business logic, using
validations, processes, and computations.
Review of and enhancements to the gen-
erated user interface may also be required
to further improve usability. Figure 3
shows the Summit application Orders
detail page after postgeneration cleanup.
conclusion
Oracle Forms conversion in Oracle
Application Express is not designed to
fully replicate an Oracle Forms appli-
cation. The conversion process does,
Figure 3: Orders detail page after postgeneration cleanup
however, offer significant benefit by
generating user interface components
■ Applicability 5. Update annotations as required. and providing project management
■ Priority For example, for notes add, tracking capabilities.
■ Completion This functionality will need to be The effort and resources required for
■ Assignments implemented postgeneration as a each Oracle Forms conversion project are
■ Notes validation, and for Tags add Validation. largely dependent on the size, complex-
■ Tags 6. Click Apply Changes. ity, and business logic implementation
Applicability is used to indicate within the Oracle Forms application. I
whether a particular component needs to GeneratinG your application strongly recommend that you undertake
be analyzed and reimplemented after the Once your project review and analysis a prototype or a proof of concept to
converted application is generated. For are complete, you can generate your properly plan each Oracle Forms conver-
example, most Oracle Forms key triggers Oracle Application Express application. sion project before you begin. ■
such as Key-Clrblk and Key-Commit are During application generation, forms are
not applicable in an Oracle Application converted to one or more pages, depend- David Peake (david.peake@oracle.com) is a principal
Express application, because such func- ing on the number of blocks included. product manager in Oracle’s Server Technologies
tionality is generated by default. The type of application pages generated division. He has been with Oracle since 1993.
The following steps show how to is determined by the presence of relation-
annotate a trigger:
1. From the Project: Summit page,
ships between the blocks, the number of
records displayed, and whether INSERT nextSTEPS
under Triggers, click 45 (to go to the or UPDATE are allowed. The following READ more Browser-Based
triggers defined on the Orders Form). types of pages can be generated for a otn.oracle.com/oramag/oracle/browser
2. Click the Trigger Level column block: a report, a report and a form, or a LEARN more about Oracle Application
heading, and select Item, which will master/detail page. Express
apex.oracle.com
create a filter showing only the item- The following steps describe how to
DOWNLOAD
level triggers. generate the Oracle Application Express
Oracle Application Express
3. Click the Applicable column heading, Summit application: otn.oracle.com/products/database/application_
and select Yes, which will create a filter 1. From the Project: Summit page, click express/download.html
showing only applicable triggers. Create Application. the sample application for this column
otn.oracle.com/oramag/oracle/09-may/
4. Click the edit icon for the When- 2. Leave Summit as the name for the o39browser.zip
RAdIo-ChAnged trigger. application, and click next.
oracle magazine M ay / J u n e 2 0 0 9 53
Discover theNew
OracleWhitePapers.com
Copyright © 2008, Oracle Corporation and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
d e v e l o p e r security BY R aj MattaMal
cating users, it is sometimes with Microsoft Active Directory for user- upon successful credential verification
necessary to write custom authentica- name and password management, but ■ A means of redirecting users without
tion schemes to meet specific require- any technique for verifying user identity valid sessions to the login application
ments. Such was the case for one client can be used with this method, as long as ■ A way to check for the suite cookie
oracle magazine M aY / j u n e 2 0 0 9 55
security
page, for Create Scheme, select From Setting the authentication function. One of Express can run custom authentication
scratch and click Next. the entry points for integrating custom function code to validate a username/
4. For Name, enter Suite Login code into an Oracle Application Express password combination.
Authentication Scheme, and click the authentication scheme is the authen- Listing 1 contains the code from the
Create Scheme button. tication function. Oracle Application ns_auth_util.sql file you uploaded earlier;
that code includes the ns_auth_util
package and CHECK_CREDENTIALS—a
codeListiNG 1: NS_AUTH_UTIL package for suite login authentication
custom authentication function. To
CREATE OR REPLACE PACKAGE ns_auth_util plug the CHECK_CREDENTIALS
AS
function call into the suite login
procedure set_sso_cookie; authentication scheme, add it as the
authentication function.
function check_credentials (
-- 1. On the Authentication Schemes
-- credentials verification function for demonstration purposes only. page (Home -> Application Builder
-- checks emp for valid username/pw combo; sets suite cookie -> Application number -> Shared
--
p_username in varchar2, Components -> Authentication
p_password in varchar2) Schemes), click Suite Login
return boolean ; Authentication Scheme.
END ns_auth_util; 2. On the Edit Authentication Scheme
/ page, for Authentication Function
(under Login Processing), enter
create or replace PACKAGE BODY ns_auth_util
AS
return_ns_auth_util.check_credentials;
g_cookie_expires date := sysdate + 1;
56 M ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
Authentication Scheme, and click the 3. Click Apply Changes the user’s browser to a specified location
Create Scheme button. To add the LOGIN_PAGE proce- Every application in the suite must
Setting up LOGIN_PAGE to handle unauthen- dure call to all auxiliary authentication perform the suite and session cookie
ticated users. This Oracle Application schemes, repeat the preceding steps for checks with each page view, so include
Express custom authentication frame- each of those schemes. the call to the SENTRY function for the
work checks for a valid suite cookie Using a page sentry function to validate page sentry function of the suite login
whenever users navigate to any appli- the session. The other function criti- authentication scheme and all auxiliary
cation within the suite. Requests from cal to custom authentication schemes authentication schemes.
users without a cookie are considered is the confirmation of a valid session To add this SENTRY function call to
unauthenticated. In this example, both with each requested page view. In the suite login authentication scheme
the suite login authentication scheme Oracle Application Express, the page 1. On the Authentication Schemes
and the auxiliary authentication scheme sentry function performs this duty. At a page (Home -> Application Builder
integrate a custom procedure, LOGIN_ minimum, the custom page sentry func- -> Application number -> Shared
PAGE, to properly handle unauthenti- tion for this implementation’s authen- Components -> Authentication
cated users: tication schemes must perform the Schemes), click Suite Login
following tasks in the order specified: Authentication Scheme
create or replace PROCEDURE login_page 1. Confirm that the current user’s Web 2. On the Edit Authentication Scheme
as browser has a valid suite cookie. page, for Page Sentry Function (under
begin 2. Confirm that the current user’s Web Page Session Management), enter
owa_util.redirect_url (ns_auth_aux browser has a valid Oracle Application
.g_logout_url); Express session cookie for the currently return_ns_auth_aux.sentry;
end; requested application.
3. Confirm that the username from 3. Click Apply Changes
This procedure uses the owa_util the suite cookie matches the Oracle To add the SENTRY function call to
.redirect_url API to send users to the Application Express session cookie. all auxiliary authentication schemes,
login page of the login application. This 4. Instantiate a new Oracle Application repeat the preceding steps for each of
is done rather than hard-coding the Express session or rejoin the existing those schemes.
available Session Not Valid URL attri- session if the previous three conditions With the SENTRY function added to
bute, to allow for easier maintenance. are met. all of the suite’s authentication schemes,
Because the procedure is called via a The ns_auth_aux.sql script, included any application in the same domain as
URL, the mod_plsql DAD user needs to with the download for this article, con- the suite cookie will respect the single-
be granted access to it: tains the code for the page sentry function sign-on functionality.
(SENTRY). The page sentry function uses
grant execute on login_page to several of the Oracle Application Express Single-Sign-off implementation
apex_public_user; authentication APIs from the APEX_ Signing users off from applications in
CUSTOM_AUTH package that facilitate the suite is somewhat more challenging
The call to the LOGIN_PAGE pro- working with sessions, specifically than signing on, because it is not simply
cedure is specified in the suite login ■ IS_SESSION_VALID, which a matter of expiring the suite cookie set
authentication scheme as well as in all checks to see that the invoking Oracle during authentication. For a proper sign-
auxiliary authentication schemes in the Application Express application has a off, the session information for each appli-
form of a relative URL. valid session cation in the suite must also be expired.
To add this LOGIN_PAGE proce- ■ GET_USERNAME, which retrieves Three additional constructs—a table,
dure call to the suite login authentica- the username associated with the a logout procedure, and a branching
tion scheme session if the Oracle Application logout page—work together to provide
1. On the Authentication Schemes Express session is valid this single-sign-off mechanism.
page (Home -> Application Builder ■ GET_SESSION_ID_FROM_COOKIE, Table of suite applications for logout. With
-> Application number -> Shared which retrieves the Oracle Application authenticated applications potentially
Components -> Authentication Express session ID from the Oracle being distributed across multiple data-
Schemes), click Suite Login Application Express session cookie stored base instances, the implementation must
Authentication Scheme by the user’s Web browser, if available be able to visit each application in the
2. On the Edit Authentication Scheme ■ DEFINE_USER_SESSION, which suite to ensure deauthentication before
page, for Session Not Valid URL instantiates a new Oracle Application returning users to the login page. A
(under Page Session Management), enter Express application session table, NS_SUITE_APPS, contains the
■ LOGOUT, which expires the Oracle necessary information about every appli-
#OWNER#.login_page?p_app_id=&APP_ID. Application Express session and redirects cation in the suite.
oracle magazine m ay / j u n e 2 0 0 9 57
security
The NS_SUITE_APPS table is stored with the application to implement logout from all suite
in the schema of the login application, ■ HOST_PORT, the host and port of applications and how to configure the
but it must be accessible to the schemas the Web server providing access to the logout page.
of every application. For any schemas application
on the same instance as the login appli- ■ INSTANCE, the logical name of the ConClusion
cation, grant the schema access to the application’s database instance When my team implemented this
table. For any schemas on the other ■ APP_ALIAS, the alias of the applica- authentication mechanism at the client
instances, set up a database link and a tion as defined on the application-level site, the rollout was a success. Being a
synonym, NS_SUITE_APPS. attributes page large government contractor, the client
Listing 2 contains the data definition Unique constraints defined on the put the solution through a rather rigor-
language for the NS_SUITE_APPS table. APP_ALIAS and APP_ID columns sim- ous security review, which it passed
The following columns from that table are plify the flow of the example code, but without issue. A major contributing
used by the single-sign-out procedure: if you remove these constraints, be sure factor to that success was the leveraging
■ APP_ID, the identification number of to modify the main cursor of the logout of the existing authentication infrastruc-
the application from which the user is to procedure accordingly. ture that Oracle Application Express
be deauthenticated The online version of this article, provides developers. Because our imple-
■ LOGOUT_PAGE_ID, the page at otn.oracle.com/oramag/oracle/09- mentation augmented the authentica-
number of the logout page associated may/o39security.html, describes how tion functionality already performed by
Oracle Application Express, the security
review was brief as well.
codeListiNG 2: Creating the NS_SUITE_APPS table
Finally, it is important to reiterate
drop table ns_suite_apps;
that you should almost always try to
CREATE TABLE “NS_SUITE_APPS” take this approach when adding custom
(“ID” NUMBER, code to any Oracle Application Express
“APP_ALIAS” VARCHAR2(30),
application: leverage existing infra-
“APP_ID” NUMBER,
“LOGOUT_PAGE_ID” NUMBER, structure whenever possible, and add
“HOST_PORT” VARCHAR2(250), customizations as necessary. As dem-
“INSTANCE” VARCHAR2(30),
onstrated by this article, following this
“STATUS” VARCHAR2(30),
“HOME_PAGE” VARCHAR2(300), approach makes even more-advanced
CONSTRAINT “NS_SUITE_APPS_PK” PRIMARY KEY (“ID”) ENABLE, tasks, such as developing custom
CONSTRAINT “NS_SUITE_APPS_ALIAS_UNK_CON” UNIQUE (“APP_ALIAS”) ENABLE,
authentication mechanisms, straightfor-
CONSTRAINT “NS_SUITE_APPS_APPID_UNK_CON” UNIQUE (“APP_ID”) ENABLE
) ward and manageable. ■
/
Raj Mattamal (rmattamal@nianticsystems.com) is a
drop sequence NS_SUITE_APPS_SEQ;
copresident at Niantic Systems, LLC, a New Jersey–
create sequence NS_SUITE_APPS_SEQ start with 1; based consultancy specializing in Oracle Application
Express solutions and training.
CREATE OR REPLACE TRIGGER “bi_NS_SUITE_APPS”
before insert on “NS_SUITE_APPS”
for each row
begin
if :new.”ID” is null then
select “NS_SUITE_APPS_SEQ”.nextval into :new.”ID” from dual;
end if;
nextstePs
end; reAD online-only article content
/ otn.oracle.com/oramag/oracle/09-may/
ALTER TRIGGER “bi_NS_SUITE_APPS” ENABLE o39security.html
/
LeArN more about Oracle
-- example inserts into the ns_suite_apps table
Application express
otn.oracle.com/apex
Insert into NS_SUITE_APPS
Oracle Application Express Application
(ID, APP_ALIAS, APP_ID, LOGOUT_PAGE_ID, HOST_PORT, INSTANCE, STATUS, HOME_PAGE)
Builder User’s Guide
values download.oracle.com/docs/cd/e14373_01/appdev.32/
(1, ’TASKS’, 108,102, ’www.nianticsystems.com’, ’ODBLAP1’, ’ACTIVE’, ’1’); e11838/sec.htm#BgBgggDe
Oracle Application Express API Reference
Insert into NS_SUITE_APPS download.oracle.com/docs/cd/e14373_01/apirefs.32/
(ID, APP_ALIAS, APP_ID, LOGOUT_PAGE_ID, HOST_PORT, INSTANCE, STATUS, HOME_PAGE) e13369/toc.htm
values
(2, ’HARDWARE’, 114,102, ’www.nianticsystems_remote.com’, ’ODBLAP4’, ’ACTIVE’, ’1’); DOWNLOAD sample code for this article
otn.oracle.com/oramag/oracle/09-may/
o39security.zip
commit;
58 M ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
t e c h n o l o g y inside ocp By sush m a jaga nnath
oracle magazine m ay / j u n e 2 0 0 9 59
INSIDE OCP
INSIDE OCP
NATIVE } specifies the compilation mode CODE_TYPE parameter has no effect Automatic subprogram inlining replaces
for the PL/SQL library units. on the PL/SQL library units that have a subprogram call with a copy of the
■ PLSQL_OPTIMIZE_LEVEL = { 0 | 1 | already been compiled. called subprogram to improve program
2 | 3} specifies the optimization level D. All subsequent automatic recom- performance. PL/SQL native compilation
to be used for compiling the PL/SQL pilations of PL/SQL library units use improves the performance of PL/SQL
library units. native compilation. statements because the native code does
You can enable PL/SQL native compi- The correct answers are A, C, not have to be interpreted at runtime
lation by using the following statement: and D. Setting the value of PLSQL_ and therefore runs faster. ■
OPTIMIZE_LEVEL to 3 directs the
ALTER SYSTEM SET PL/SQL compiler to automatically Sushma Jagannath (ocpexam_ww@oracle.com) is
PLSQL_CODE_TYPE = NATIVE; inline subprograms. Changing the value a certification exam development manager at Oracle.
of PLSQL_CODE_TYPE to NATIVE will She has been with the company since 2000.
You changed the values of the following not change the PL/SQL code that has
nextSTEPS
parameters for a session: already been compiled, but subsequent
recompilations of PL/SQL code will use
PLSQL_OPTIMIZE_LEVEL = 3 the native compilation method. Answer
LEARN more about the Oracle
PLSQL_CODE_TYPE = NATIVE B is incorrect because anonymous
Certification Program
PL/SQL blocks cannot be compiled into oracle.com/education/certification
Which statements are true? native code. EXPLORE the certification forum
A. The compiler automatically inlines forums.oracle.com/forums/forum.jspa?forumID=459
anonymous PL/SQL blocks, are com- PL/SQL enhancements introduced in READ more about PL/SQL
Oracle Database PL/SQL Language Reference
piled into machine code. Oracle Database 11g that improve the otn.oracle.com/documentation
C. Changing the value of the PLSQL_ performance of PL/SQL applications:
UMassAmherst
RE-ENGINEER YOURSELF... ISENBER
ISENBERG
SCHOOL OF MANAGEMENT
BusinessWeek ranks
Gain a Competitive Advantage • Complete your entire degree online -
the UMass Amherst no on-campus visits required
Part-Time MBA Program Generate Renewed Success
5
• 37 credit, part-time program
# Revitalize Your Career
• Courses taught by graduate faculty
Gain Credibility
• Accredited by AACSB
NorTheAsT The UMass Amherst Part-Time
MBA Program gives you the • 47% of students are employed by
29
Fortune 100 companies
# business tools to succeed in today’s
competitive marketplace. • Tuition discount for OAUG members
isenberg.umass.edu/mba/oaug • TAKE 2 COURSES BEFORE APPLYING
NATioN
60 M AY / J U N E 2 0 0 9 ORACLE.COM/ORACLEMAGAZINE
t e c h n o l o g y ask tom BY tom kYte
oracle magazine m aY / j u n e 2 0 0 9 61
ask tom
Now in Listing 2, we query this we could do? Yes—all we’d need is to many people, because they falsely
view (V) and use OBJECT_TYPE in the add at least one attribute that is known believe that “IS NULL” predicates cannot
WHERE clause to see how the optimizer to be not null to the index. Then the use an index. I believe that this myth
can optimize a table away. index could sometimes be used in has arisen because people think nulls
At first the execution plan in Listing place of the table for a full scan, and are not indexed. The fact is that nulls
2 looks as if it did not get rid of an it could be used to answer predicates are indexed many times; just entire null
access to table T2, which it could have, of the form “WHERE OBJECT_TYPE index keys are not. So, if at least one
because T2 is known to contain only IS NULL.” That last bit might surprise attribute of the index is not null, every
SYNONYMs and PROCEDUREs but not
TABLEs. But on closer inspection, we codeLIstING 3: One way to count rows
see a filter step at step 4, and the filter is SQL> set autotrace traceonly explain
SQL> select count(*) from t;
NULL IS NOT NULL
Execution Plan
————————————————————————————————————————
That is interesting. We never wrote Plan hash value: 2966233522
that, but the optimizer added it for us.
————————————————————————————————————————
Because NULL IS NOT NULL is FALSE, | Id | Operation | Name | Rows | Cost (%CPU)| Time |
that tree of the execution plan will never ————————————————————————————————————————
| 0 | SELECT STATEMENT | | 1 | 283 (1)| 00:00:04 |
take place. (You can verify that by using
| 1 | SORT AGGREGATE | | 1| | |
TKPROF if you like. No I/O will be per- | 2 | TABLE ACCESS FULL| T | 68437 | 283 (1)| 00:00:04 |
formed against table T2). ————————————————————————————————————————
As a second example, we’ll take a
look at NOT NULL constraints and see
codeLIstING 4: A better way to count rows
why they are extremely important—in
SQL> alter table t modify object_type NOT NULL;
particular when it comes to INDEX uti-
Table altered.
lization. We’ll create a table and index a
nullable column: SQL> set autotrace traceonly explain
SQL> select count(*) from t;
62 M ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
row will, in fact, appear in the index. codeLISTING 6: Plan using an index when the index has a non-null attribute
Consider the plan in Listing 5.
SQL> select * from t where object_type is null;
That shows that if OBJECT_TYPE is
nullable, the optimizer will not (in fact, Execution Plan
—————————————————————————————
cannot) use the index to satisfy “OBJECT_
Plan hash value: 470836197
TYPE IS NULL.” If we add an attribute
to the index that is not null, the plan ————————————————————————————————————————————————————
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
will change, however. Here I’ll add the
————————————————————————————————————————————————————
constant zero to the index. (Any not null | 0 | SELECT STATEMENT | | 1 | 101 | 1 (0)| 00:00:01 |
column will do, and in this case, I just | 1 | TABLE ACCESS BY INDEX ROWID | T | 1 | 101 | 1 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | T_IDX | 1| | 1 (0)| 00:00:01 |
need something not null, and zero is very
————————————————————————————————————————————————————
small and known to be not null.)
Predicate Information (identified by operation id):
—————————————————————————————
SQL> drop index t_idx;
2 - access(“OBJECT_TYPE” IS NULL)
Index dropped.
SQL> create index t_idx codeLISTING 7: Creating “big” EMP and DEPT tables and EMP_DEPT view
on t (object_type, 0); SQL> create table emp
Index created. 2 as
3 select *
4 from scott.emp;
Now, Listing 6 shows that the plan Table created.
can and will tend to use the index.
SQL> create table dept
2 as
Constraints, Primary Keys, and 3 select *
Foreign Keys 4 from scott.dept;
Now let’s take a look at primary and Table created.
foreign keys and how they might affect SQL> create or replace view emp_dept
the optimizer. In the following example, 2 as
we use a copy of the SCOTT.EMP and 3 select emp.ename, dept.dname
4 from emp, dept
SCOTT.DEPT tables—we pretend they 5 where emp.deptno = dept.deptno;
are large, using DBMS_STATS.SET_ View created.
TABLE_STATS to make the optimizer
SQL> begin
believe they are “big”—and we create the 2 dbms_stats.set_table_stats
EMP_DEPT view, as shown in Listing 7. 3 ( user, ‘EMP’, numrows=>1000000, numblks=>100000 );
Let’s also suppose that the EMP_DEPT 4 dbms_stats.set_table_stats
5 ( user, ‘DEPT’, numrows=>100000, numblks=>10000 );
view is used to query the EMP table, the 6 end;
DEPT table, and the result of joining 7 /
EMP to DEPT. When the view is used to PL/SQL procedure successfully completed.
retrieve data from just the EMP table, we
observe that the database accesses both
codeLISTING 8: Query on EMP_DEPT view accessing both EMP and DEPT
the EMP and DEPT tables in the execu-
tion plan, as shown in Listing 8. SQL> select ename from emp_dept;
oracle magazine m ay / j u n e 2 0 0 9 63
ask tom
key constraint on DEPT. If we tell Oracle —we’ll see a query plan like the one the view. This style of optimization,
Database about these facts— in Listing 9. unnecessary table elimination, will have
See how the optimizer has removed a very positive effect on response time,
SQL> alter table dept add constraint the DEPT table from consideration, the especially when you’re using “generic
dept_pk primary key(deptno); HASH JOIN is gone, and a predicate has views” that join many tables together.
Table altered. been added: DEPTNO IS NOT NULL. When end users query these generic
The optimizer has recognized that, with views and do not need information
SQL> alter table emp add constraint the foreign key and the primary key in from all of the joined tables, the opti-
emp_fk_dept foreign key(deptno) place, the SELECT ENAME FROM EMP mizer will sometimes be able to elimi-
2 references dept(deptno); WHERE DEPTNO IS NOT NULL query nate the unnecessary joined tables—on
Table altered. is equivalent to the query contained in a case-by-case basis.
As a side note, this example also
codeLIstING 9: Query on EMP_DEPT view, with DEPT access removed demonstrates why SELECT * queries
should not be used in real life. If your
SQL> select ename from emp_dept;
queries are all in the form “SELECT *
Execution Plan FROM . . .”, you won’t benefit from this
—————————————————————————————— sort of optimization, and the optimizer
Plan hash value: 3956160932
will always have to access the DEPT
————————————————————————————————————————————— table, because it appears that you want
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | data from it. Always reference only the
—————————————————————————————————————————————
| 0 | SELECT STATEMENT | | 50000 | 976K| 27152 (1)| 00:05:26 |
columns you need in your queries.
|* 1 | TABLE ACCESS FULL| EMP | 50000 | 976K| 27152 (1)| 00:05:26 |
————————————————————————————————————————————— Constraints and Materialized Views
Predicate Information (identified by operation id):
Another example of this query rewrite
—————————————————————————————— magic involves primary key constraints,
1 - filter(“EMP”.”DEPTNO” IS NOT NULL) foreign key constraints, not-null con-
straints, and materialized views. I
codeLIstING 10: Materialized view joining EMP and DEPT and computing count often refer to materialized views as the
SQL> create materialized view mv enable query rewrite “indexes of your data warehouse.” The
2 as goal, in general, of a materialized view
3 select dept.deptno, dept.dname, count (*) from emp, dept is to “preanswer” complex or long-
4 where emp.deptno = dept.deptno
5 group by dept.deptno, dept.dname;
running queries against detail tables, to
Materialized view created. save these answers in a persistent table,
and to later return these saved answers
SQL> begin
2 dbms_stats.set_table_stats
transparently when end users run ad hoc
3 ( user, ‘MV’, numrows=>100000, numblks=>10000 ); queries against the detail tables. Much
4 end; as an index is used in a transactional
PL/SQL procedure successfully completed.
system to speed up queries, materialized
views are used to speed up queries in
codeLIstING 11: One query using the materialized view data warehouse/reporting systems.
SQL> select dept.dname, count (*) from emp, dept Using the EMP and DEPT tables once
2 where emp.deptno = dept.deptno and dept.dname = ‘SALES’ again from the above example, we’ll
3 group by dept.dname;
remove the constraints:
Execution Plan
—————————————————————————————— SQL> alter table emp drop constraint
Plan hash value: 1703036361
emp_fk_dept;
————————————————————————————————————————————————————— Table altered.
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
—————————————————————————————————————————————————————
| 0 | SELECT STATEMENT | | 1000 | 22000 | 2716 (1)| 00:00:33 | SQL> alter table dept drop constraint
| 1 | SORT GROUP BY NOSORT | | 1000 | 22000 | 2716 (1)| 00:00:33 | dept_pk;
|* 2 | MAT_VIEW REWRITE ACCESS FULL| MV | 1000 | 22000 | 2716 (1)| 00:00:33 | Table altered.
—————————————————————————————————————————————————————
Predicate Information (identified by operation id): So, we have just the EMP and DEPT
—————————————————————————————— tables now, and the optimizer believes
2 - filter(“MV”.”DNAME”=’SALES’)
they are large (based on our telling
64 M ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
it that by using DBMS_STATS). We’ll that and used this view to quickly instead of counting individual employee
create a materialized view that joins answer the query. records in EMP, the query could have
EMP and DEPT together and computes However, if we ask a slightly different summed up the DEPTNO-based count
the count of employees by department, question, as shown in Listing 12, we’ll in the materialized view—in much less
as shown in Listing 10. see that the optimizer does not rewrite time. We know that this could have
Now, if we issue a query of the form the query to use the materialized view. been done because we know that
in Listing 11, we can see that the opti- As you see, the optimizer chooses ■ DEPTNO in DEPT is a primary key
mizer avoids the detail tables altogether to do a full table scan of the EMP table, ■ DEPTNO in EMP is a foreign key
and accesses the materialized view. count the rows, and return the results. ■ DEPTNO in EMP is a NOT NULL
Rather than joining EMP to DEPT for Now, you know and I know that it could column
the SALES department and then count- have chosen a full scan of the much We know that, but the database does
ing the rows, the optimizer recognized smaller materialized view and summed not. If we tell the database that—
that the materialized view already did up the precomputed count. That is,
SQL> alter table dept add constraint
codeLISTING 12: One query not using the materialized view dept_pk primary key(deptno);
Table altered.
SQL> select count(*) from emp;
PLAN_TABLE_OUTPUT
——————————————————————— SQL> alter table emp modify deptno
SQL_ID g59vz2u4cu404, child number 1 NOT NULL;
———————————————————————
Table altered.
select count(*) from emp
Plan hash value: 2083865914 —then the next time we ask that same
question, we’ll see that the optimizer
————————————————————————————————————————
| Id | Operation | Name | Rows | Cost (%CPU)| Time | rewrote the query to access the smaller
———————————————————————————————————————— materialized view (instead of the large
| 0 | SELECT STATEMENT | | | 27142 (100)| |
EMP table), as shown in Listing 13. ■
| 1 | SORT AGGREGATE | | 1 | | |
| 2 | TABLE ACCESS FULL| EMP | 1000K| 27142 (1)| 00:05:26 |
———————————————————————————————————————— Tom Kyte is a database evangelist in Oracle’s Server
14 rows selected.
Technologies division and has worked for Oracle since
1993. He is the author of Expert Oracle Database
codeLISTING 13: Postconstraints, query now using materialized view Architecture: 9i and 10g Programming Techniques and
SQL> select count(*) from emp; Solutions (Apress, 2005) and Effective Oracle by Design
(Oracle Press, 2003), among others.
COUNT(*)
——————
nextSTEPS
14
oracle magazine m ay / j u n e 2 0 0 9 65
c o m m e n t IN THE FIELD By Ia n a Br am son
Mixing It Up
There’s never been a better time to get involved through networking.
s the world changes, the way meetings on Skype, and other online to create an environment where a more
people interact with each other communications technologies, IOUG professional community, focusing on
evolves. How do you define can build a network that blends the business connections, can thrive with
your professional network? face-to-face Oracle technology commu- the addition of an IOUG group relation-
Do you include friends, acquaintances, nity with the virtual community. In the ship. Finally, we look forward to seeing
Facebook friends, LinkedIn connections, old days (less than 10 years ago), IOUG how the Twitter Oracle community
Oracle Mix people, or even the buddies offered only an in-person conference. comes together.
on your hockey team? Today, more than Now, there are Webinars, blogs, listservs, All these methods work. If everyone
ever, our network is far-reaching: we online chats, and teleconferences that takes part, our community will network,
know people around the globe, people bring IOUG members together. grow, and thrive all year long. In chal-
with shared experiences, and people A recent customer satisfaction survey, lenging economic times, it is more
who have unique and useful knowledge. run by IOUG and Oracle, showed that important than ever to have a robust
Despite the ease of communicat- customers who were part of the user network. It’s time to get involved. ■
ing with newer technologies, retaining community—specifically IOUG—are
some of the time-honored networking more-satisfied customers. That’s because Ian Abramson (ian_abramson@ioug.org) is president
methods is still important. Peer-to-peer this community is involved. of IOUG and an Oracle data warehousing expert
networking, for example, continues to with more than 20 years of experience. Based in
be invaluable for discussing challenges stay involved Toronto, Canada, he is the director of the Enterprise
and learning new solutions. To help us all stay more involved all Data Group for Thoughtcorp, a technology consulting
Independent Oracle Users Group year long, IOUG has established groups company. Ian has written numerous books on both
(IOUG) leaders and members believe on popular social networking sites that Oracle and data warehousing and is a frequent
that face-to-face communication is a we invite everyone to join. These sites presenter at Oracle and industry conferences and
leading benefit of joining the user group. include Oracle Mix, Facebook, LinkedIn, seminars. He is coauthor of Oracle Database 11g
IOUG now has a network of more than and Twitter. The groups that we have Beginner’s Guide (Oracle Press, 2008).
23,000 Oracle technology professionals. set up will aid the members of our com-
This number may not seem large com-
pared to, for example, Facebook’s 150
munity in finding each other in these
venues. We expect that these groups nextSTEPS
million members. But IOUG’s members will prove to be valuable communica- JOIN IOUG
www.ioug.org
have an unsurpassed knowledgebase tion channels within the community
of information and solutions that relate and will allow people to leverage their CHECK OUT
COLLABORATE 09
directly to everyday technical issues. You professional networks. We are excited to www.collaborate09.com
can’t measure that expertise by numbers become part of the fabric of these com-
the IOUG/Oracle customer
of members alone. munities and to aid technology profes- satisfaction survey
In-person events remain a critical sionals to come together informally. www.ioug.org/about/press/9908-ioug_salary_
survey.pdf
way for people to communicate face- One such forum, Oracle Mix, is a
to-face, and IOUG continues to facili- platform that helps Oracle IT profes- Oracle Mix
mix.oracle.com
tate opportunities for that. The annual sionals communicate with each other
IOUG’s group link on Facebook
COLLABORATE conference is one such and with Oracle. Recently, enhancement www.facebook.com/home.php?#/group
opportunity where attendees have a voting and paper selection for Oracle .php?gid=2329868812
chance to rub shoulders with some of OpenWorld were both accomplished IOUG’s group link on LinkedIn
the greatest Oracle technologists in the through the Oracle Mix interface. www.linkedin.com/groups?gid=69562
world. Networking possibilities like that On the social side, IOUG looks at the Official Oracle Wiki
wiki.oracle.com
are both rare and priceless. Facebook as a way of growing our com-
Online networking has augmented munity and providing an interface that FOLLOW
IOUG on Twitter
face-to-face conferences, events, and is not always technical but is always www.twitter.com/ioug
meetings. With discussion forums, interesting. With LinkedIn, IOUG wants
66 m ay / j u n e 2 0 0 9 oracle.com/oraclemagazine
c o m m e n t ALL Secure By m ary an n davidso n
are another kind of list. presented left to right—the first Oracle reAD more Davidson
blogs.oracle.com/maryanndavidson
Our first success was the mandatory Software Security Assurance elements otn.oracle.com/oramag/oracle/secure
class on secure development practices that development groups generally adopt
oracle magazine m ay / j u n e 2 0 0 9 67
c o m m e n t ANALYST’S CORNER BY david Baum
68 m aY / j u n e 2 0 0 9 oracle.com/oraclemagazine
#
1
Middleware
#1 in Application Servers
#1 in Service-Oriented Architecture
oracle.com/goto/middleware
or call 1.800.ORACLE.1
Copyright © 2009, Oracle. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.