Escolar Documentos
Profissional Documentos
Cultura Documentos
C O M / O R A C LEMA GA ZI NE
ALWAYS
AVAILABLE
ORACLE HIGH-AVAILABILITY
TECHNOLOGIES DRIVE BUSINESS 24/7
GO XML/39
SMBs EXPAND
TO MEET
DEMANDS/44
SECURITY GOES
MAINSTREAM/71
Fujitsu_Primequest.indd 2
9/15/06 10:53:53 AM
#! ) " "'%& &+&'!
*)"#%&&+&'!
! !!
!
!
#
"
!
!
!
! !
!
definition —
Embarcadero solutions help manage data enterprise
wide, enabling you to build and communicate an
architecture of your data assets so you always
know what is what, and where it is. With just one,
everything gets simpler. You and your business are
empowered to use and reuse reliable, relevant and
timely data across a range of platforms and storage
formats. Understanding your data is finally possible,
and getting a hold of the metadata is the key.
© 2006 Embarcadero Technologies, Inc. All rights reserved.
F EATU RES
GO
XML
ALWAYS Business transactions on the Web and
content-rich applications have put new
EXPANDING TO
insurance, and improve the
performance of day-to-day
operations. See how Oracle MEET DEMANDS
helps growing businesses Small and medium businesses still have to
stay up and running. meet big demands—for fast performance, high
—Alan Joch
availability, data security,
/30 and scalability—usually
under tight budgets. Discover
Cover: Image by Corbis, enhanced what Oracle is doing to help
by Stephanie Lee SMBs meet these challenges,
satisfy their customers, and grow and thrive under
changing market conditions. —David A. Kelly
/44
DE PAR T M E NTS
57 TEC HNOLOGY
P L/S QL P R AC TIC ES
The Right Place for PL/SQL / 57
Best practices for PL/SQL location, location, location
—Steven Feuerstein
23 CH A NNEL S
Commitment / 23
R EC OV ERY
Recover in a Flash / 59
Reduce database recovery time, using the Oracle flash
The Nature Conservancy protects
recovery area. —Arup Nanda
endangered species and drinking water.
Partner News / 24
AS K TOM
GridApp Systems, IBM, EMC, Adobe, HP,
Intel, Itemfield, Genpact, Turnkey Solutions, On Top-n and Pagination Queries / 63
NAVTEQ, Application Security, Inc., Our technologist gets more results using ROW_NUMBER,
and SilverStorm. RANK, and DENSE_RANK. —Tom Kyte
Book Beat / 24
Peer-to-Peer / 27
Steve Karam,
Nicolas Gasparotto,
Dave Moore
Cutting Edge / 29
Encrypted hard drives and perching planes
67
49
R ES OUR C ES
Oracle Certified Partner Index / 67
D EVEL O PER Advertisers’ Index / 70
O PEN SO U RCE
Embedding Open Source / 49
69
The Oracle Berkeley DB family of products exemplifies
Oracle’s open source commitment. —Rich Schwerin
C OMMENT
F RA MEWO RKS
Modeling Tables and Components / 51 IN THE FIELD
Maintain your data-centric business services with Listening to You / 69
visual diagrams. —Steve Muench IOUG surveys provide guidance for expanding
databases and open source software issues.
O D P.NET —Ari Kaplan
Using PL/SQL Associative Arrays / 53
Bring the power of PL/SQL stored procedures to ODP.NET. ALL S EC UR E
—Mark A. Williams Security Goes Mainstream / 71
Security is too important to be left to experts.
B RO WSER-B A SED —Mary Ann Davidson
Sizing Up Performance / 55
ANALY S T’ S C OR NER
Tips and techniques for optimal Oracle Application
Express performance —Mike Hichwa The Right Stuff / 72
Small businesses can compete on a big scale if
they have enterprise-caliber software.
—David Baum
Information lives at Blue Rhino, a midsize company that had a king-size problem. As the #1 brand in propane tank exchange, their information
storage needs were doubling every year. But their IT budget wasn’t. They chose an EMC® solution that gave them less downtime, faster
backups, and quicker recovery times. The entire package, hardware and software, delivered a high degree of flexibility at an affordable
price, and allowed them to keep their focus on their customers. Read the Blue Rhino profile at www.EMC.com/BlueRhino.
To see what EMC can do for you, talk to your EMC Velocity2 Partner or call 866-796-6369.
EMC2, EMC, and where information lives are registered trademarks of EMC Corporation. All other trademarks used herein are the property of their respective owners. © 2006 EMC Corporation. All rights reserved.
ED ITOR IA L
D ES IGN
Senior Creative Director Susan Olsen
Design Director Richard Merchán
PUBLISH ING
Publisher Jeff Spicer jeff.spicer@oracle.com
A DV ERTISING SA LES
Associate Publisher Kyle Walkenhorst kyle@sprocketmedia.com +1.323.658.6250, Ext. 201
Northwest & Central U.S., Technology Tom Cometa thomas.cometa@sbcglobal.net +1.415.206.9855
Southwest U.S. Technology & Consumer Shaun Mehr shaun@sprocketmedia.com +1.323.658.6250 ext. 205
MidAtlantic U.S., Technology & Consumer Dawn Becker and Lisa Rinaldo dbeck71@optonline.net +1.732.772.0160
Northeast U.S./Canada, Technology & Consumer Ann and David Schissler schissler@comcast.net +1.508.394.4026
Southeast U.S., Technology & Consumer Doug Lewis doug@jordangareth.com +1.770.333.1281
Europe/Middle East/Africa/Asia Pacific, Technology Mark Makinney mark.makinney@oracle.com +44 0 1273 774341
Mailing-List Rentals Edith Roman Associates +1.800.223.2194, Ext. 684
ED ITOR IA L BOA R D
Ian Abramson, Jeff Bernknopf, Karen Cannell, Andrew Clarke, Chris Claterbos, Karthika Devi, Kimberly Floss, Kent Graziano,
Taqi Hasan, Tony Jambu, Tony Jedlinski, Ari Kaplan, Val Kavi, Steve Lemme, Carol McGury, Sumit Sengupta,
Danisment Gazi Unal, Jonathan Vincenzo, Dan Vlamis, Billy Yu
The information contained in Oracle Magazine is for information purposes only and may not be incorporated into
a contract or agreement.
Copyright © 2007, Oracle All Rights Reserved. No part of this publication may be reprinted or otherwise
reproduced without permission from the editors. ORACLE MAGAZINE IS PROVIDED ON AN “AS IS” BASIS.
ORACLE EXPRESSLY DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED. IN NO EVENT
SHALL ORACLE BE LIABLE FOR ANY DAMAGES OF ANY KIND ARISING FROM YOUR USE OF OR RELIANCE
ON ANY INFORMATION PROVIDED HEREIN.
Oracle, JD Edwards, and PeopleSoft are registered trademarks of Oracle Corporation and/or its affiliates. Other
names may be trademarks of their respective owners. For a full listing of Oracle trademarks and registered
trademarks, consult Oracle’s Web site at oracle.com or send a request to trademar_us@oracle.com. All other
product and service names mentioned may be trademarks of their respective owners.
Introducing...
All other brand or product names are trademarks or registered trademarks of their respective holders. 09/2006/TOAD-toadworld_announcement_Q32006
Toad World – Your free exclusive online resource for all things Toad™ ©2006 Quest Software, Inc. All rights reserved. Quest and Quest Software are trademarks or registered trademarks of Quest Software.
Membership gains you access to exclusive freeware, demo videos, tips and tricks, expert blogs, fun Toad
stuff, like ringtones, and much, much more. And the new Toad for Oracle 9.0 teams up with Toad World to
unlock the power of database best practices through advanced automation and education.
If you use Toad, want to start using the industry leading database tool, or just want to be a better database
professional, then Toad World is the place to be.
———————————————————————————————————---------------------------------------------------------------------------------------------------------------------------------------------------------
To learn more and to join Toad World visit www.quest.com/toadworld
———————————————————————————————————-------------------------------------------------------------------------------------------------------------------------------------------------------
---
Available through
Demand USi.
800.809.3003
sales@usi.net
www.usi.net
Technology Events
January 10, Fond du Lac, Wisconsin
www.wi-plug.org/calendar.htm
Georgia Oracle Users Group
January 11, Dunwoody, Georgia
Conferences and sessions to help you stay on the cutting edge www.gouser.org
Nashville Oracle Users Group Meeting
January 17, Nashville, Tennessee
www.noug.net/meeting.htm
RSA Conference 2007
February 5–9 Sacramento Oracle Users Group
Meeting
San Francisco January 17, West Sacramento,
The RSA Conference is the largest, most California
comprehensive gathering of analysts, www.sacoug.org
technology providers, service providers, Twin Cities Oracle Users Group
and end consumers in information security. Quarterly Meeting
Oracle CEO Larry Ellison will give a keynote January 18, St. Louis Park, Minnesota
address at this weeklong educational forum. www.tcoug.org/calendar
Visit www.rsaconference.com/2007/us Atlanta Oracle Applications Users
for more information. Group Meeting
January 19, Dunwoody, Georgia
www.atloaug.org
Los Angeles County Technology Desktop Conference 2007
Northeast Ohio Oracle Users Group
Week 2007 February 20–22, Online Business Meeting
January 22–27, Los Angeles County, Boasting presentations by dozens of Oracle January 19, Independence, Ohio
California experts and with tracks for BI, data warehous- www.neooug.org/generaltab/
generaltab.shtml?events
Technology Week is a series of events show- ing, application development, and more, the
casing the depth and growth of technology Desktop Conference bills itself as the most UKOUG Open Source Seminar
January 23, Berkshire, England
companies throughout Los Angeles County. comprehensive virtual conference of the year.
www.ukoug.co.uk/calendar/show_events
Events are held at a variety of countywide Learn more at www.desktopconference.org. .jsp?year=2007&month=01&day=23
locations. Learn more and register at
Philadelphia Area Oracle User Group
www.latechweek.com. Gartner Business Intelligence Quarterly Meeting
& Information Management January 24, Bala Cynwyd, Pennsylvania
GTC Southwest 2007 Summit philadelphia.oracle.ioug.org
January 29–February 1, Austin, Texas February 27–28, Sydney, Australia Dallas Oracle Users Group Data
The Government Technology Conference This event highlights how BI applications and Warehousing Certification Class
February 7–9, Dallas, Texas
provides business and technology learning data infrastructure can affect financial and www.doug.org/meetings2006.cfm
opportunities for government employees and business performance. Technology’s role in
Northern California Oracle Users Group
provides opportunities to network with peers compliance, the continuing data explosion, and Winter Conference
from state and local governments and meet complex business environments are on the February 8, Redwood Shores,
with top technology vendors to the govern- agenda. Sign up at www.gartner.com/ California
www.nocoug.org
ment. Get details at www.govtech.net/gtc/ 2_events/conferences/bi1a.jsp.
index.php/GTCSouthwest2007. Ottawa Oracle User Group Training
Day 2007
OPP2007 February 9, Ottawa, Ontario, Canada
Gartner Business Intelligence February 28–March 1 www.oug-ottawa.org
Summit San Mateo, California North Carolina Oracle Users
January 30–February 1, London The Oracle Development Tools User Group Group Meeting
Aimed at IT and business professionals who sponsors this “seriously practical” Oracle February 16, Morrisville, North Carolina
www.ncoug.com/ncoug_upcoming_
are defining a business intelligence (BI) strat- PL/SQL Programming Conference for Oracle events.htm
egy, optimizing BI applications, and managing technologists focusing on PL/SQL program-
BI issues, this event highlights new research ming. It includes two days of intensive train-
in organizational competencies, corporate ing by Steven Feuerstein, PL/SQL evangelist, eventsLOCATOR
ALLISON LEVENSON
performance management, data quality, appli- Quest Software; Bryn Llewellyn, PL/SQL Oracle Events
oracle.com/events
cation analytics, and service-oriented architec- product manager, Server Technologies, at
tures. Get more information at www.gartner Oracle; and other PL/SQL experts. Learn more Locate user groups
oracle.com/technology/collaboration/user_group
.com/2_events/conferences/bie8i.jsp. and register at www.odtugopp07.com.
P R O D U C T SPOTLIGHT
ORACLE E-BUSINESS SUITE RELEASE 12 THINKS GLOBALLY
racle E-Business Suite Release 12, scheduled for availability in 2007, is Release 12 is planned to include capabilities that make it simpler and
O being designed to help businesses gain a competitive edge in the global
economy. This major release is intended to allow organizations to think
cheaper to implement, manage, and scale applications. To ease compliance
management, the release is expected to provide a repository for reviewing
globally to make better decisions, work globally to be more competitive, and and auditing accounting business rules in a single environment. The release
manage globally to lower costs and increase performance. is also planned to leverage best practices from existing and acquired
“Oracle E-Business Suite Release 12 is expected to help companies products to deliver an easy-to-use user experience.
meet global market needs,” says Fred Studer, group vice president of The release is intended to simplify global application management
applications and technologies at Oracle. “Oracle E-Business Suite Release through preinstrumented management functionality in Oracle Enterprise
12 should ensure companies that comprehensive requirements driving their Manager 10g for Oracle E-Business Suite Release 12. It is planned to include
global business are absolutely addressed with better technology and better extensive integration capabilities, such as advanced support for integrating
applications—both coming together to drive value for our customers.” Oracle Applications with third-party applications and a Web services
Oracle E-Business Suite Release 12 is planned to include key repository that catalogs hundreds of services in Oracle E-Business Suite.
enhancements to help organizations make decisions based on complete The release is also planned to include thousands of cross-industry
information from systems that span regions and divisions. For example, as capabilities spanning enterprise resource planning, supply chain
part of the release, Oracle Profitability Manager is expected to give users management, and customer relationship management (CRM). For example,
expanded capabilities to perform profitability analysis and reporting not only for the communications industry, Oracle Order Management is expected
for individual product lines, but also for individual customers. Oracle Strategic to support CRM by including the reconfiguration, upgrade, downgrade,
Network Optimization is intended to allow users to continuously evaluate the and disconnection of services. Oracle Asset Tracking is intended to enable
cost and revenue implications of any decision affecting their global supply service providers to manage the financial and operational lifecycle of their
chain. Oracle Project Portfolio Analysis should enable users to choose, fund, network infrastructure.
and prioritize global projects based on what-if scenario analysis. For the high-tech and manufacturing industries, the release is intended
For customers facing the complexities of running an organization with to support compliance requirements in Japan and China through Oracle
multiple divisions across different global regions, Oracle E-Business Suite Financial Management support for charge-based Shikyu and Golden Tax.
to create composite applications. upgrades and “hot” patching; auto- monitoring of Oracle E-Business Suite,
Oracle WebCenter Suite is available mated capture of fault diagnostics for Oracle’s PeopleSoft Enterprise, and
as an option for Oracle Application faster fault resolution; and repair advis- Oracle’s Siebel environments and provide
Server Enterprise Edition, at ers to guide DBAs through the fault management capabilities for customer
US$50,000 per CPU. The first release diagnosis and resolution process. applications running on Oracle and non-
includes Oracle WebCenter Framework, Oracle databases and middleware.
a JavaServer Faces (JSF) and Oracle ORACLE BERKELEY DB RELEASE 4.5 Oracle will deliver advanced appli-
Application Development Framework– DELIVERS KEY ENHANCEMENTS cation management, monitoring, and
based framework for embedding
Asynchronous JavaScript And XML
(Ajax) components, portlets, and
O racle Berkeley DB Release 4.5, the
newest release of Oracle’s open
source, embeddable database, includes
service-level capabilities through three
new Oracle Application Management
Packs for Oracle E-Business Suite,
content into JSF applications; Oracle new capabilities for improved perfor- PeopleSoft Enterprise, and Siebel. The
WebCenter Services; embeddable Web mance, availability, and ease of use. The Oracle Application Management Pack
2.0 content, collaboration, and com- new release supports multiversion con- for PeopleSoft Enterprise is now avail-
munication components; and Oracle currency control, nonstop upgrades for able; the remaining packs are planned
WebCenter Studio, which exposes the replicated environments, and a prebuilt for availability in 2007.
Oracle WebCenter Framework and replication framework to simplify devel- With new capabilities for application
Oracle WebCenter Services to program- opment of highly available applications. management, Oracle Enterprise Manager
mers inside Oracle JDeveloper. This “Oracle Berkeley DB Release 4.5 10g delivers comprehensive management
release also includes Session Initiation is quickly becoming the database of functionality from the operating system
Protocol–based instant messaging, choice for open source and commercial through the application layer—regard-
online presence, threaded discus- developers who need to embed a fast, less of the underlying infrastructure—all
sion and wiki services, Oracle Secure reliable, transactional storage engine the way to the end user.
Enterprise Search, and a limited use within their high-performance applica- “Oracle Applications and third-
license of Oracle Content Database. tions,” says Rex Wang, vice president of party application customers will have
embedded systems marketing at Oracle. a single solution at their disposal to
ORACLE DATABASE 11g BETA PROGRAM Oracle Berkeley DB is part of Oracle’s manage their applications and under-
ANNOUNCED strategy to provide developers with a lying systems comprehensively,” says
Altova® XML Suite 2007 – The world’s leading XML development tools.
The Altova XML Suite 2007 delivers the latest releases of world’s leading XML
development tools all in an unrivaled deal. It contains Altova XMLSpy, the industry
standard XML development environment; MapForce, the premier data integration
and Web services implementation tool; and StyleVision, the ultimate visual stylesheet
designer. What’s more, the Enterprise Edition also includes XML Schema management,
Semantic Web, and XML-aware differencing tools. Save a bundle!
Download the Altova XML Suite today: www.altova.com
BRIEFS
Database to provide a comprehensive As software shifts away from single, system (OSS) solutions for the com-
BI solution, as well as expanded hot- monolithic applications to assemblies munications and media industry. The
pluggable support for third-party data of easily configurable services, develop- company offers communications service
sources and systems. ers are changing the way they work. To providers a comprehensive product set
“The compelling benefits of the new speed the development process, pro- for OSS service fulfillment, including
release will further obviate the need grammers often develop new applica- provisioning, network inventory, and
for organizations to wire together tools tions by reusing existing or sample code activation. MetaSolv’s standards-based
from multiple point product BI vendors as a starting point. However, obtaining, solutions support all types of services,
in order to have complete, integrated, configuring, and deploying code can including next-generation Voice over
best-of-breed solutions, regardless of take a long time and be error-prone. IP, Internet Protocol Television, and IP
whether they have Oracle, non-Oracle, Oracle Developer Depot, which runs on virtual private network.
or mixed environments,” says Thomas Oracle Application Server 10g, elimi- Stellent is a global provider of enter-
Kurian, senior vice president, Oracle nates the complexity of the discover-to- prise content management software
Fusion Middleware. deploy process by providing a library of solutions. With Stellent’s Universal
Oracle Business Intelligence Suite reusable sample application code that Content Management solution, cus-
Enterprise Edition 10g Release 3 is can be downloaded and deployed with tomers can easily deploy multiple
intended to leverage service-oriented a single click. As a result, programmers line-of-business applications—such as
architecture techniques and integration without Java experience can have an public Web sites, secure intranets and
with Oracle BPEL Process Manager to application up and running rapidly, and extranets, and compliance processes—
support multiple models of analytics- more-experienced developers can get a and also scale the technology to support
driven workflow. This is planned to head start on complex projects to meet multisite management and enterprise-
include invocation of a Business Process business requirements quickly. wide content management needs.
Execution Language (BPEL) process Oracle Developer Depot leverages Oracle’s acquisition of Stellent will
from the BI environment; BI that directs popular Web 2.0 technologies such complement and extend Oracle’s exist-
a BPEL process with intelligent deci- as Asynchronous JavaScript And XML ing content management solution
sion points and conditional process (Ajax), the Spring 2.0 Framework, and portfolio. Stellent’s Universal Content
steps based on analytics; and BPEL Really Simple Syndication to facilitate Management works with Oracle
processes invoking analytic workflows code reuse and simplify development. Content Database and offers a variety
through Web services. The suite is also of best-of-breed solutions for document
planned to support seamless integration ORACLE MAKES STRATEGIC ACQUISITIONS management, Web content manage-
with Oracle Portal and Oracle Online
Analytical Processing (OLAP).
The next release is also planned
O racle has acquired SPL WorldGroup
and Sunopsis and agreed to acquire
MetaSolv Software and Stellent.
ment, information rights management,
digital asset management, records and
retention management, and imaging,
to allow users to access information SPL is a leading provider of revenue governance, risk, and compliance. O
through interactive dashboards, reports, and operations management software for
ad hoc analysis, real-time alerts, mobile the utilities industry and tax manage-
disconnected analytics, and integration ment software for government organiza-
with Microsoft Office. The release plan tions. SPL delivers best-in-class solutions Oracle WebCenter Suite
also includes support for Really Simple for customer care and billing, mobile oracle.com/products/middleware/
webcenter.html
Syndication capabilities. workforce management, outage and dis-
tribution management, and asset man- Oracle E-Business Suite
oracle.com/applications/e-business-suite.html
ORACLE DEVELOPER DEPOT SIMPLIFIES agement that are specifically designed
JAVA DEVELOPMENT for electric, gas, and water utilities. Oracle Server Technologies
Beta Programs
applications for learning or prototyping Fusion Middleware product family and Oracle Business Intelligence Suite
purposes. An integrated component make the technology an integrated part 10g Release 3 Enterprise Edition
oracle.com/bi
of Oracle Fusion Middleware, Oracle of its service-oriented architecture,
Developer Depot complements Oracle’s business intelligence, and master data Oracle Developer Depot
oracle.com/technology/tech/java/oc4j/odd
end-to-end Java platform by facilitating management solutions.
Oracle strategic acquisitions
development of Java and service- MetaSolv is a leading provider of oracle.com/corporate/acquisition.html
oriented-architecture–based applications. service-fulfillment operations support
ImageNow® creates a direct and effortless connection between you and the
documents you need to complete your daily business activities. With a rapid,
patented integration style that works intuitively with your existing Oracle
www.imagenow.com/oracle
The documents
you need. Now.
© 2006 Perceptive Software, Inc. ImageNow is a registered trademark of Perceptive Software, Inc. All other product and company names may be
trademarks or registered trademarks of their respective owners. ad_oracle0701
Use
Add PL/SQL
PL/SQLDeveloper
Developer
at work...
to your business...
...and save
...and
time
save
and
time
money
and
money to enjoy yourself
is the
PL/SQL Developer is an Oracle
Oracle development
development tool
tool that gives you maximum productivity,
productivity,
ease of use, and all the features you need.
partners. Many others are signed up to support technologies, and a global reach price through January 31, 2007
oracle.com/events/linux/promotion.html
help us move Linux up to mission- including 7,000 support staff in 17
T O O L F O R E V E RY B O D
CLASS Y’ S
R LD BUD
E WO GE
TH T
SQLDetective: Mr Guidetti, you are the president of Confor Informatica, SQLDetective: What are Confor's goals with SQLDetective?
one of the largest certified Oracle partners in Italy. Confor is now the Confor: We know the Italian Market for PL/SQL developers extremely
exclusive distributor of SQLDetective in Italy. Why SQLDetective? well. With SQLDetective, we expect to regain the number one position
Confor: As the oldest Italian consulting company, focused on Oracle in the Italian market within 3-4 years for this type of solution.
since 1986, we have tested many products extensively in order to grant
our customers the best solutions available. SQLDetective amazes us. About Confor - www.confor.it
It is a superior product at an affordable price. Confor is a consulting and information technology company specializing
in the automotive, leasing, petroleum, and telecom markets. The services
SQLDetective: This represents the business and strategic side of Confor's includes software products, database & application management, system
decision. What aspects of SQLDetective satisfied the expectations of your integration, management consulting and training. Solutions availabe for
technical experts? ERP and CRM systems, as well as for BI and HR projects. Confor has
Confor: We marketed SQL Navigator* and Toad* prior to their acqui- formed partnerships with leading international IT vendors and has
sition by Quest Software* and up to the end of 2004. In 20 years of partnered with Oracle for 20 years.
experience, we have not found a product like SQLDetective. Our experts Luca Guidetti, President of the Board, Confor Informatica S.p.A., Italy
are enthusiastic about its modularity and stability. It satisfies the need
for an easy2use development tool as well as the in-depth analysis of Discover SQLDetective 3.5 - the world class tool for everybody’s budget.
our DBA’s. Visit www.sqldetective.com to learn why the new 3.5 is one of the
most powerful, advanced and easy2use Oracle application development
SQLDetective: What are SQLDetective’s key benefits for your clients? tools available.
Confor: The advantages for the Italian market are: easy2use user
interface; broad range of tools and features; strong stability; unique The NEW SQLDetective 3.5 is ideal for developing database objects,
innovations; accurate technical support and leading price performance. writing and debugging stored programs, executing, testing and formatting
SQL and PL/SQL statements, managing tablespaces and rollback
SQLDetective: Why should Italian PL/SQL developers buy SQLDetective segments.
from Confor?
Confor: We provide first rate technical support, training classes, techni-
cal consultancy and all marketing and sales activities in the local NEW
Italian language. We understand the needs of our Italian Oracle users!
SQL Detective 3.5
www.sqldetective.com
* Quest Software, SQL Navigator and Toad are a registered trademarks of Quest Software, Inc.
c h a n n e l s COMMITMENT BY A A RO N L A Z E N BY
Querying XML:
XQuery, XPath,
and SQL/XML
in Context
GRIDAPP SYSTEMS OFFERS FREE ORACLE on Linux on System z,” says Robert
By Jim Melton and
Stephen Buxton REAL APPLICATION CLUSTERS LICENSES Shimp, vice president of Oracle’s Global
Morgan Kaufmann
www.elsevier.com
ISBN: 1-55-860711-0
G ridApp Systems’ “Ready. Set. RAC!”
promotion bundles GridApp’s D2500
database appliance with free Oracle
Technology business unit.
O
most efficient manner,” says Gopalakrishnan.
Suite, Siebel Customer Relationship racle and Adobe are collaborat-
Browse for Oracle books at oracle.com/ Management, and PeopleSoft Enterprise ing to allow developers to include
technology/books/10g_books.html. using Oracle Database 10g Release 2 animations, charts, and graphs created
in Adobe Flex (Adobe’s Flash-based Portlets (WSRP) 2.0 standards groups on COBOL copybooks.
application creation framework) with the integration. By using Itemfield’s software, Oracle
other Asynchronous JavaScript And customers can integrate unstructured
XML (Ajax) content in enterprise portals ITEMFIELD CONTENTMASTER NOW and semistructured data for extract,
created by Oracle Portal. This allows INTEGRATED WITH WAREHOUSE BUILDER transform, and load; data quality and
applications with highly visual displays
to be integrated with enterprise processes
and data, creating enterprise mashups
I temfield has integrated its
ContentMaster universal data transfor-
mation software with Oracle Warehouse
auditing; integrated relational and
dimensional modeling; and lifecycle
management of data and metadata.
that have the impact and effectiveness of Builder 10g Release 2. The combined
Web 2.0 applications but that also pre- offering uses ContentMaster’s data trans- GENPACT AND TURNKEY AUTOMATE ORACLE
serve the standards-based infrastructure. formation capabilities to allow Oracle E-BUSINESS SUITE TESTING
The integration works with the
current generation of Oracle Portal, and
will be incorporated into future Oracle
Warehouse Builder 10g to handle any
type of data, including unstructured
documents such as Microsoft Word and
G enpact and TurnKey Solutions,
two members of the Oracle
PartnerNetwork, have formed a global
user-interaction environments. Oracle Excel documents and Adobe Portable alliance to provide testing automation
and Adobe intend to work with the Document Format files, and semistruc- for Oracle E-Business Suite customers.
Java Standardization Request (JSR) 168, tured data such as electronic data inter- Genpact will implement TurnKey’s
JSR 268, and Web Services for Remote change, Health Level 7, and complex testing scripts against a wide range
A
Management, Oracle Manufacturing, pplication Security, Inc., (AppSecInc) GridApp Systems
www.gridapp.com
Oracle Order Management, and Oracle has announced Oracle on Linux
IBM System z
Projects. This will automate functional support in AppRadar, part of its appli- www.ibm.com/systems/z
and regression testing efforts to improve cation security solution. AppRadar EMC Solutions for Oracle
patching, upgrade, and go-live Oracle uses real-time monitoring and security www.emc.com
E-Business Suite 11i rollouts. auditing to defend against application Adobe Flex
One result, according to TurnKey vulnerabilities while ensuring adherence www.adobe.com/devnet/flex/articles/flex2_
portal.html
CEO Bruce R. Guebner, will be more- to regulatory requirements. AppRadar
effective conference room pilots. “As protects databases against internal and Oracle Partners for SMBs
oracle.com/solutions/mid/accelerate-
a result of deploying these automated external attacks without degrading data- partners.html
technologies, we’ve seen a significant base performance, and supports both Application Modernization Initiative
drop off in the number of functional host- and network-based deployment. www.hp.com/go/ami
O
www.navteq.com
racle and NAVTEQ, a global pro-
vider of digital maps for vehicle SILVERSTORM RDS OVER INFINIBAND NOW AppSecInc’s AppRadar
www.appsecinc.com
navigation and location-based solutions, ON ORACLE REAL APPLICATION CLUSTERS
SilverStorm RDS for Oracle
have reached a multiyear worldwide
agreement to incorporate NAVTEQ
boundary mapping data into Oracle
S ilverStorm Technologies, a provider
of high-performance interconnect
solutions for clustered computing, has
www.silverstorm.com/oracle
Database 10g and other Oracle products, released the Reliable Datagram Sockets
effectively coupling geospatial informa- (RDS) over InfiniBand interconnect for
tion with enterprise data from supply Oracle Real Application Clusters 10g
chain, customer relationship manage- (Oracle RAC). InfiniBand is a high-
ment, and planning and risk-assessment performance, switched fabric intercon-
applications. The NAVTEQ-Oracle com- nect standard for servers.
bination will make it easier for custom- RDS was codeveloped by SilverStorm
ers to employ Oracle Spatial 10g, Oracle and Oracle. In beta testing, RDS over
Locator, Oracle Application Server 10g InfiniBand provided up to 60 percent
MapViewer, and future Oracle products performance improvement over Gigabit
that will use geographic data. Ethernet for interconnect-intensive
NAVTEQ’s mapping data includes applications. SilverStorm’s high-
administrative boundaries for coun- performance clustering solutions for
tries, states, and cities, as well as major Oracle RAC are showcased in Oracle’s
highways and roads. The company also Enterprise Technology Centers.
plans to offer additional map and demo- RDS has been validated through
graphic products, such as street net- Intel’s Enabled Server Acceleration
works, ZIP codes, and industry-specific Alliance program and is available for
data sets, to Oracle customers. Oracle Database 10g Release 2 at no cost
and in SilverStorm’s QuickSilver 3.2 or
later host releases for Linux. ■
and by age 16, I was writing a base like ours. I first did database Oracle Credentials: Oracle-
certified DBA (Oracle9i ), with more
program to hack into my school’s computer. A class- analysis using bstat/estat utilities, so than 8 years of experience using
mate who saw me writing that program in study hall told his I find the latest version of Statspack Oracle products
dad, who was an Oracle contractor for the Navy, about me, and greatly improves database analysis.
oracle.com/technology/community/
his dad ended up hiring me on as a junior Oracle DBA. Do you have a favorite vacation spot? oracle_ace
What would you like to see Oracle, as a company, do differently? I’d I love the Pyrenees—it’s a beautiful
peerSPECS like to see an increased focus on mountain range with a long and interesting history.
Company: Burleson Oracle Oracle Academy, Oracle’s education
Consulting and Training
Job Title/Description: Senior
program for high school students, Dave Moore
Oracle DBA and instructor, and the Oracle Academic Initiative, What advice do you have about getting into Web and database
responsible for training, mentoring, for students at the college and uni- development? Build a Web site for something you’re passion-
backup and recovery, performance
tuning, and implementation of versity level. It would be great for ate about. If it’s gardening, build and maintain a gardening
new systems Oracle to concentrate on getting Web site that you think would be useful to others. Then
Location: Virginia Beach, Virginia really intelligent up-and-coming enhance it over time—add a
Oracle Credentials: Oracle- technologists into the Oracle field. database back end or wiki. It
certified master (Oracle Database
10g ), with 10 years of experience Tell us about your upcoming book, will be very rewarding.
using Oracle products Easy Oracle Jumpstart ( Rampant What technology has most changed
TechPress, 2006). It’s a DBA your life? First, there’s Quicken,
oracle.com/technology/community/
oracle_ace primer—the basic concepts you which has actually made me
need to know. It’s a joint effort look forward to paying my
between me and another DBA, Robert Freeman. My second bills each month. Second is my
book, Oracle and Ajax, is due to the publisher next April. BlackBerry, which I depend on
much more than my laptop
Nicolas Gasparotto these days.
What’s your favorite tool or technique on the job? Statspack and How do you use the internet? I
session tracing—to find the most important queries and opti- use it mainly for research—like peerSPECS
Company: Database-Brothers, Inc.
mize their execution time by finding out the pitfalls of throw- (DBI), a firm specializing in database
rewriting them when possible, ing a split-finger fastball at performance and accountability
or by playing with indexes too early an age. These days, Job Title/Description:
Vice president, research and
and parameters. Implementing however, I find myself visiting development, responsible for all
table partitioning is a big fewer and fewer sites. I use CNN R&D tasks for database security
and performance products
challenge: One table in .com as my morning newspaper
Location: Austin,Texas
our database is more than but really only frequent about Length of Time Using Oracle
150GB, without accounting four other Web sites: asktom Products: 15 years
for the indexes, and finding .oracle.com; oracleutilities.com;
the best partition settings oracle.com/technology; and, of oracle.com/technology/community/
oracle_ace
for this table is crucial for course, www.quicken.com. O
ORACLE
PRESS
—THE GENUINE AUTHORITY
For more than 10 years, Oracle Press has been working closely with Oracle experts
and the user community to develop the most authoritative, comprehensive, and
current references on Oracle products and technologies.
The choice is clear—if you buy only one book, be sure it’s from Oracle Press.
Deploy a rock-solid data backup and This in-depth volume explains how to Enhance productivity and simplify
disaster recovery strategy using the maximize database availability, scala- database development tasks using
tips and techniques in this complete bility, and efficiency using Oracle Real Oracle SQL Developer and this
guide to Oracle Recovery Manager. Application Clusters (RAC). hands-on guide.
O R I G I N A L • AU T H E N T I C
AVA I L A B L E N OW E V E RY W H E R E B O O K S A R E S O L D .
Join the community to be the first to hear about new Oracle Press O N LY F R O M O S B O R N E
releases and special offers at www.oraclepressbooks.com.
c h a n n e l s CUTTING EDGE
Perching Plane
It’s a bird! It’s a plane! No. . . it’s a perching plane—a plane
that lands like a bird. From the early days of aircraft
design, engineers have looked to birds for inspi-
ration. Whereas most engineers focus on
how birds fly, Ephrahim Garcia at Cornell
University in Ithaca, New York, believes
Secure Hard Drives
birds have a lot to teach us about
In this fast-paced world, we’ve all got plenty to worry about,
landing. He is designing a pilotless
so losing a laptop with sensitive information on it is the last
aircraft that can land vertically by
thing you need—especially if you work for a large company
“perching” like a bird.
or government organization. Sure, there are passwords and
Currently the perching
other security applications that limit access to data, but there
plane is being developed to
are better ways to secure hard drive content.
address a problem with recon-
Seagate’s DriveTrust technology is a drive-level set of
naissance planes: They find something
security services that take advantage of the hard drive’s
interesting to look at but can’t inspect it
computing environment. Modern disk drives contain a
properly because they don’t have enough
full-fledged computing element, including processor, RAM,
fuel to keep flying over the area for any
a multitasking operating system, and dedicated private
length of time. “If you could land the plane
magnetic storage. Although host operating system envi-
on the edge of a nearby building, you could
ronments are designed to enable widespread application
continue surveillance of an area,” says Garcia.
support, hard drives are closed computing environments
Since runways are hard to come by on the tops
that run specialized code to manage drive functions. In
of buildings, the reconnaissance plane would have to land
short, the hard drive is an ideal place for securing informa-
vertically. Existing vertical landing craft, such as helicop-
tion because its internal operations are sealed off from other
ters or Harrier jump jets, are too heavy and require too
computing system resources.
much fuel to make them suitable for surveillance. Instead,
DriveTrust-enabled drives automatically encrypt and
Garcia believes, by mimicking the way birds come in to
decrypt all the data that travels in and out of the drive.
land, he can bring an aircraft to a gentle stop using aero-
Unlike other data encryption applications, DriveTrust
dynamics alone.
encryption keys are password-protected and never appear
When a bird wants to perch, it flares its wing feathers,
in any readable format on the drive. Encryption
angling them against the airflow; then it does the same with
combined with strong authentica-
its tail feathers as it lowers them. This configuration pro-
tion simplifies and secures
duces as much drag as possible, and slows the bird enough
hard drive disposal and
for a safe touchdown. When Garcia’s plane is preparing to
reuse. Data on an encrypted
land, the wings rotate upward to force the fuselage down,
drive is only accessible when
creating strong drag. The tail extends away from the body on
the encryption key is enabled
a long boom, which is articulated so the tail can droop down
through a valid password. If
to provide varying degrees of drag as it moves.
the encryption key is changed
or eliminated, all of the data is
SEAGATE, CORNELL UNIVERSITY
same campus, or even in the same building. If standby database can field queries and run certain tasks require downtime, but Oracle’s goal
the production database becomes unavailable backups to relieve processing demands on the is to eliminate planned maintenance downtime.”
RAC. Its dual server cluster protects “K” Line’s global trans-
portation management system with automatic failover should
either server node crash for any reason. “K” Line uses Oracle
RAC to automatically balance transaction processing between
its two servers. The result is a boost in processing capacity:
All resources are used all the time, and users are protected
from server failure.
“Oracle RAC really impressed us because it allows us to take
advantage of both servers,” says Knut LaVine, general manager
of application development at “K” Line America. “We saw a
dramatic improvement in the performance of the application
because we were able to utilize both servers at the same time.”
BUDGET RELIEF
Mano Malayanur of Fannie Mae’s Guarantee Businesses Systems group calls Oracle
The right high-availability architecture delivers other economic Data Guard “our preferred solution for disaster recovery.” The decision to go with
advantages as well. Because Oracle software can provide the Oracle followed an extensive proof-of-concept pilot project.
highest level of availability on commodity hardware, such as
x86-based servers, high-availability designers aren’t forced sors and large amounts of RAM. These powerful servers came
to buy expensive proprietary platforms, long thought to be at a relative bargain of only about US$5,000 each. The redun-
essential for reliability. This expensive philosophy dates back dancy available from these Oracle RAC–running econo-models
to mainframe models and argues that the more you spend on gives Alvarez confidence about his HA capabilities. “If we lose
hardware, the fewer breakdowns you’ll experience. a box, who cares—we’re not dependent on any one device in
Today, enterprises can achieve comparable reliability at a our network,” Alvarez says.
fraction of the mainframe cost using Oracle’s high-availability Farecast’s predictive engine relies on an Oracle data ware-
functionality and commodity-priced hardware. “We used to house with more than 5TB of data for storing and analyzing
spend a tremendous amount of money buying very expensive data for its airfare predictions. Before Oracle Database 10g and
proprietary UNIX systems,” says Hernan Alvarez, director of Oracle RAC, Farecast relied on a MySQL database, a product
engineering operations for Farecast, an online travel-booking that Farecast just outgrew, according to Alvarez. “Clustering is
site based in Seattle, Washington. “With the advent of cluster- what’s compelling about the Oracle technology,” he says. “We
ing software and open source operating systems, that para- looked at other clustering and database alternatives, including
digm has shifted. Now it’s the software that’s really making IBM DB2 and Microsoft SQL Server. But we have a very large
things happen.” database, so with partitioning, compression, and clustering on
Farecast invested in Oracle RAC, which automatically trans- top of that, there really wasn’t any other choice. SQL Server
fers and rebalances workload from a failed server to surviving just wasn’t going to get it done.”
servers in a cluster. The ability to deploy a high-availability Alvarez adds that Oracle RAC’s ability to configure multiple
solution on commodity hardware using Oracle RAC is a cor- low-cost commodity servers and create a highly available and
nerstone of Farecast’s strategy. scalable grid that requires no change to application or database
The travel site applies its proprietary algorithms to fare structures keeps total costs under control. “I’d say our hardware
data collected from airlines and third-party sources to predict costs are one-tenth of what they were five years ago,” he says.
prices for customers shopping for the best deals. Customers Which helps Farecast align its high-availability needs with
access the site from around the world, which means that any its business demands. “We could always roll out a $10 million
downtime, whether for planned maintenance or resulting from solution and get the HA job done, but does that meet our
technical problems, would almost always affect some custom- business goals?” he asks. “We’re able to stay within budget and
DAVID DEAL
ers during the business day. get the performance and availability we’re looking for [with
To cope, Farecast uses 100 x86 servers with 64-bit proces- Oracle], so it’s a huge business success.”
interest-bearing accounts. Interest yields are one of the income vidual e-commerce transaction processing times to less than
streams that Comic Relief uses to avoid paying for adminis- two seconds. “Oracle RAC is the cornerstone of our high-
PLANNED DOWNTIME
Storage Failure Rolling Patch Updates
Automatic Storage Oracle Database supports the
Management simplifies disk application of patches to the nodes
management tasks such as of an Oracle RAC system in a
mirroring, helping DBAs rolling fashion, keeping the AVOIDING
protect against data storage system available during DOWNTIME
failure. patch application.
FOR SYSTEM
CHANGES
BEST PRACTICES
availability solution. It gives us a chance to cope with flash HIGH AVAILABILITY IS A PHILOSOPHY
crowds, high demand, or even a failure in one of our database Fannie Mae, a financial services company that collaborates
servers with little or no degradation of performance to an end with mortgage lenders to ensure that loans are available
user,” says Gill. for home buyers, needs guaranteed system uptime for its
As an extra precaution, Oracle Data Guard provides financial systems and to meet federal regulations. “Regulatory
disaster recovery failover between data centers by keeping requirements dictate that all of our critical applications have
a standby copy of the database at the second data center complete redundancy to meet specific high-availability needs,”
synchronized with the database at the primary location. “If says Mano Malayanur, manager of technical operations and
there’s a failure in our primary environment, we can shift infrastructure management and infrastructure architect for
sessions to the other site,” he says. Comic Relief’s standby Fannie Mae’s Guarantee Businesses Systems (GBS) group.
JOHN BLYTHE
database also provides a critical layer of additional data pro- The GBS arm of Fannie Mae runs Oracle Database 10g
tection and high availability. Release 2, a local high-availability cluster, and Oracle Data
As Oracle continues to enhance and grow its products and services, it’s more important than ever to find the
pieces that complete your business puzzle and increase the performance of your Oracle environment.
COLLABORATE 07 is the one event where you can:
• ACCESS the latest education on Oracle database and applications technology through your choice
of more than 600 presentations and workshops facilitated by industry experts and members of the
IOUG, OAUG and Quest users groups.
• HEAR directly from Oracle executives and product experts in educational sessions and keynote presentations.
• LEVERAGE the users groups’ collective voice to Oracle.
• EXPERIENCE expanded networking opportunities with more than 5,500 members of the greater
Oracle user community.
• DISCOVER the full breadth of top Oracle third-party solution providers with access to more than
200 vendors in the Exhibitor Showcase.
Presented by:
CONFERENCE REGISTRATION OPENS NOVEMBER 1, 2006
querying, and managing massive volumes of XML data. Oracle get the best-possible response time is to have a database that
XML DB has been adopted by many enterprises that are does not treat XML as just text but rather understands XML.”
seeking a way to take advantage of their database infrastruc- According to Delcourt, developers at the agency need to
ture and skills to manage diverse data. be able to store and access XML data without compromising
the State Assembly and State Senate. They also index all the Office of Legislative Counsel’s Servin.
documents to simplify searching and research. “Our drafting “Our Oracle-based system makes it easy for them to find the
system stores content in Oracle XML DB in a schema-based exact information they need.”
tured data into databases, including images, faxes, movies, and other kinds of information,” says Vishu Krishnamurthy,
XML, content, e-mail, and other complex datatypes,” he says. Oracle’s senior director of XML development. “We have pro-
“Customers like to use databases for this content because of gressively optimized speed and intelligence across datatypes
STRUCTURAL DETAILS
There are two primary ways to store XML tions are automatically generated from the this storage yields optimal throughput when
content in a relational database—structured XML schema, so they can be decomposed inserting and retrieving whole documents. This
and unstructured. and stored in the database without any loss approach allows the document to be retained
Structured storage entails decomposing of information. This allows Oracle XML DB intact—increasingly important for digital signa-
the content of the XML document into a set of to leverage the full power of standard SQL tures and authentication.
objects. A benefit to this storage approach is interfaces, while reducing storage space and Oracle Database 10g, which uses standard
that the data can be accessed by applications memory requirements. access methods for navigating and querying
that understand only relational technology. With unstructured storage the entire XML XML based on the World Wide Web Consortium
When an XML schema is registered with document is stored natively as a character (W3C) XML data model, supports both XML
Oracle XML DB, the required type defini- large object (CLOB) inside the database, and storage approaches.
and enhanced the SQL syntax to handle uses Oracle XML DB to parse the messages
domain-specific information.” SNAPSHOTS and break them into relational structures,
Oracle has made XML a fundamen- which are then passed through to the data
CIMIRe
tal datatype—as part of Oracle XML DB, www.cimire.fgov.be warehouse. Setting up relational tables to
Oracle created the XMLType object to Location: Brussels, Belgium store XMLType data enables the growing
process XML documents and messages, Industry: Public sector media company to keep schema-less XML
with instances for both structured and Oracle products: Oracle Database 10g, documents in its Oracle database.
unstructured storage. In Oracle Database Oracle XML DB Crichton likes several things about the
10g Release 2, Oracle added standards- XML functionality in Oracle Database 10g—
State of California Office of
based XQuery capabilities, a schema-based Legislative Counsel namely, a notable performance improve-
resource metadata facility, a set of SQL func- www.leginfo.ca.gov ment, better stability, and plenty of room to
tions for data manipulation operations on Location: Sacramento, California scale to 10 million customers. “Oracle has
XML data, and much more. Industry: Public sector always given us the performance we need,
“Traditionally unstructured informa- Oracle products: Oracle Database 10g, and the XML functionality is becoming pro-
tion is stored in a file system that includes Oracle XML DB gressively more robust,” he says.
files, folders, and all associated metadata,”
British Sky Broadcasting Group
says Krishnamurthy, “but this paradigm is www.sky.com VERSATILE FRAMEWORKS
inherently insecure and unreliable and cer- Location: Isleworth, U.K. XML has become a popular way to store
tainly doesn’t scale well. That’s why Oracle Industry: Media and entertainment and exchange complex information. Next-
provides the same access mechanism for Oracle products: Oracle Database 10g, generation application development stacks
all types of content that can be stored in a Oracle XML DB will build XML-based content-management
secure, centralized repository.” applications that are much more versatile
and dynamic.
MEDIA CONVERGENCE “That’s when the technology will move from the edge to
This approach to managing content is ideal for British Sky the core,” Oracle’s Krishnamurthy predicts, “as businesses
Broadcasting (BSkyB), the largest digital pay-television start using XML to store all types of business information
platform in the United Kingdom and Ireland and a leading and to build applications that include voice mail interfaces,
broadcaster of sports, movies, entertainment, and news. The videos, new sets of connections and associations, and collab-
company manages real-time XML data feeds, which contain orative work models.”
rich customer information—everything from the purchase of BSkyB’s Crichton agrees with that assessment. He says the
personal video recorders and high-definition television ser- company plans to use Oracle XML DB to produce output for
vices to a specific movie preference in the video-on-demand third parties, such as customer viewing profiles for informing
program. To support its burgeoning subscriber base, BSkyB targeted marketing campaigns.
deployed an Oracle data warehouse. “Oracle’s built-in XML functions give us the option to
“We’re using Oracle to capture a great deal of information produce XML data files in a single SQL query, which sim-
about subscribers—not just basic contact information but plifies development and maintenance,” Crichton explains.
also case-management data arising from technical inquiries,” “Oracle is definitely at the forefront when it comes to building
says Dave Crichton, a senior developer on BSkyB’s Customer XML functionality.” O
Marketing Business Intelligence team.
Crichton is responsible for maintaining a 3TB data ware- David Baum (david@dbaumcomm.com) is a freelance business writer based in
house of customer relationship management (CRM) infor- Santa Barbara, California.
mation about all of BSkyB’s 8.2 million subscribers, such as
customer name, contact information, location details, and
onsite equipment. The information is used to cross-sell and READ
up-sell additional products and services to these established “Using XML with XML DB and ODP.NET”
customers, as well as to reach out to new customers through- oracle.com/technology/pub/articles/williams_xmldotnet.html
out the United Kingdom. “Getting Started with Oracle XML DB”
download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb02rep.htm
Each night, BSkyB’s data warehouse is refreshed with infor-
mation from its CRM system in the form of XML data feeds DOWNLOAD Oracle Database 10g
oracle.com/technology/software/products/database/oracle10g
into relational data structures in the data warehouse. BSkyB
From $99
Per server/per year*
Unbreakable Linux
oracle.com/linux
or call 1.800.ORACLE.1
*Terms, conditions and restrictions apply. $99 price solely includes access to Linux binaries and updates.
24x7 global support starts at $399 per year/per server.
Copyright © 2006, Oracle. All rights reserved. Oracle, JD Edwards, PeopleSoft and Siebel are registered trademarks of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners. The Tux design is copyrighted work of Larry Ewing.
CORP_Linux_99Price_1730
gent requirements of the SMB market. Oracle of SMBs, it’s important that software is easy to price point for Oracle Fusion Middleware, so you
Application Express, a feature of Oracle use,” says Hardie. “It’s also important that the can get the entire Oracle technology stack to
Database 10g, is one such solution. “With Oracle technology you start out with can easily scale store, share, secure, and manage your data for
Application Express, all you need is an Oracle at low cost without forklift upgrades and code very little cost.”
oracle.com/technology/smb
(ROI) on its database investments, it knows that this is a
VISIT the Linux Technology Center
winning approach. On the middleware front, the company is oracle.com/technology/linux
already seeing improvements. “Last year when we implanted
within the table shape, enter the new As a result, Oracle JDeveloper creates more meaningful (such as AllEmployees),
column name information (such as new Dept and Emp entity objects and by clicking the view instance shape and
MANAGER_ID:NUMBER(5,2)), and press adds them to the diagram. It also creates typing a new name. Finally, you can test
Enter. You can also rename a column an association between the objects based the application module directly from
or change its datatype by clicking the on the foreign key constraint specified the diagram by selecting it and selecting
column entry and editing it in place. In in the table definition. Note that you Test from the context menu.
addition, you can define one-to-many can now modify these components in Your diagram will automatically
relationships between two tables by much the same way you did in the pre- update to reflect changes you make
simply clicking the Foreign Key icon vious section. You can use the Property to any component, regardless of how
in the Component Palette, clicking Inspector to change a component’s visual you make them. For example, I have
the source table, and then clicking the aspects, the Component Palette to create used familiar business components
target table. And if you double-click new components, and onscreen editing wizards in past articles to create view
a schema object or relationship line functions to perform common inline objects and view links. In this example,
in the diagram, the appropriate visual tasks such as adding or modifying attri- you could create a Departments view
editor appears, allowing you to view and butes. Furthermore, you can double-click object based on the Dept entity and
modify the object’s full definition. any component to bring up the respective a view link between Departments and
The tables and other schema objects component editor for in-depth editing. EmployeeList. Then you could use
are known as “offline” objects, because Now drag a view object compo- the Application Module editor to add
the changes you make in the diagram nent from the Component Palette, master/detail linked view instances
do not immediately cause updates to the and drop it onto the diagram. Give it named Departments and EmployeeList
database. Instead, you save your changes the name EmployeeList, by typing that to its data model. After you do so, the
to disk, and when you are ready to make name directly into the new view object diagram will update to automatically
database changes, you generate a DDL shape. Next, select the data the View show the changes to the data model.
script that creates or alters your database Object query will reference. To do so, The online version of this column,
to match your database design. To gener- hold down the Ctrl key while selecting at oracle.com/technology/oramag/
ate a DDL script, right-click the database the Empno, Ename, and Sal attributes oracle/07-jan/o17frame.html, includes
diagram and select Generate -> Data from the Emp entity on the diagram. information on polishing, publishing,
Definition Language for Diagram from Then drag the selected attributes to the and printing your diagram.
the context menu. new view object and release the mouse This whirlwind tour is meant to help
button. As a result, the Emp entity now you boost your own visual development
CREATING YOUR BUSINESS COMPONENTS becomes the primary entity for the new skills up a notch. Hopefully, you’ll use
You can use Oracle JDeveloper busi- view object and the selected attributes these and other diagramming tools pro-
ness components diagrams to visually are added to its attribute list. vided in the Oracle JDeveloper environ-
document and maintain the Oracle You can also add related join infor- ment on your next project. O
Application Development Framework mation to the view object. For example,
(ADF) objects that implement your busi- to add the department name of each Steve Muench is a consulting product manager for
ness services. To demonstrate, let’s create employee, just select the Dname attribute Oracle JDeveloper. In his more than 16 years at Oracle,
a simple diagram to work with entity from the Dept entity and drop it onto the he has developed and supported Oracle tools and
objects, view objects, and an applica- view object. Note that Oracle JDeveloper XML technologies and continues to evangelize them.
tion module based on the underlying automatically adds the primary key attri- Muench coauthored Oracle ADF Developer’s Guide for
DEPT and EMP database tables. In the bute (in this case, Dept.Deptno) from a Forms/4GL Developers (Oracle, 2006), and he shares
Application Navigator, right-click your secondary entity and shows a message tips and tricks on OTN and in his Dive into BC4J and
Model project and select New to open alert indicating that it has done so. ADF Weblog (radio.weblogs.com/0118231).
the New Gallery dialog box. Select the Next, drop an Application Module
Diagrams category and the Business component from the Component Palette
Components Diagram icon. Name onto the diagram. Give it the name
the diagram Business Service, provide EmpModule, by typing that name directly READ online-only column content
oramag.model as the package name, and into the new application module shape. oracle.com/technology/oramag/oracle/07-jan/
o17frame.html
click OK. Next, go to the Connection Add an instance of the EmployeeList
Navigator, select the DEPT and EMP view object to the EmpModule’s data READ more about Oracle
JDeveloper 10g and Oracle ADF
tables (as you did in the last section), model, by dragging the view object and oracle.com/technology/products/jdev
and drag them onto the diagram. In the dropping it onto the application module. oracle.com/technology/products/jdev/tips/
muench/designpatterns
Create from Database Object dialog By default, Oracle JDeveloper gives the
box, select Business Component Entity view instance the name EmployeeList1, DOWNLOAD Oracle JDeveloper 10g
oracle.com/technology/products/jdev
Objects, and click OK. but you can change it to something
use Oracle databases must use PL/SQL -- define the procedure that will perform the array insert
for access to the database structures.
procedure array_insert (p_job_id in t_job_id,
Knowing that you need to use PL/SQL p_job_title in t_job_title,
in the database as the application pro- p_min_salary in t_min_salary,
p_max_salary in t_max_salary);
gramming interface (API) and that you end associative_array;
need to reduce network usage, where /
do you begin? Fortunately, ODP.NET’s create or replace package body associative_array as
support for PL/SQL associative arrays can -- implement the procedure that will perform the array insert
help you meet both IT mandates.
procedure array_insert (p_job_id in t_job_id,
ODP.NET developers can use PL/SQL p_job_title in t_job_title,
as an API to the data in the database and p_min_salary in t_min_salary,
p_max_salary in t_max_salary) is
use associative array binding to reduce begin
network round-trips. The result is a forall i in p_job_id.first..p_job_id.last
insert into jobs (job_id,
reduced workload for both the network job_title,
and Oracle Database, which means faster min_salary,
max_salary)
performance and better scalability for values (p_job_id(i),
your applications. p_job_title(i),
p_min_salary(i),
p_max_salary(i));
THE SAMPLE APPLICATION end array_insert;
Suppose that one of the reasons for end associative_array;
/
the PL/SQL and performance mandates
is that your company is growing
rapidly: The IT department alone has tion and body code in Listing 1 are the SQL> desc jobs
three new job classifications—database interface, and it runs in the database’s
administrator, manager, and vice HR schema. (Note that a Microsoft Name Null? Type
president. This column demonstrates Visual Studio developer might use Oracle ------------------------------ -------------------- ---------------------------------
how to use .NET, PL/SQL, and associa- Developer Tools for Visual Studio .NET JOB_ID NOT NULL VARCHAR2(10)
tive arrays to add these job categories or a tool such as Oracle SQL Developer to JOB_TITLE NOT NULL VARCHAR2(35)
to an Oracle database—with minimal create and edit the PL/SQL code.) MIN_SALARY NUMBER(6)
network utilization. The associative_array package con- MAX_SALARY NUMBER(6)
The sample developed in this column tains code for both the package specifica-
uses the HR schema provided with Oracle tion and the package body. The package Because each datatype in the
Database. This schema includes a JOBS specification declares the single proce- associative_array package is defined
table that contains a row for each job. dure that will be implemented in the to be a table of each database column
package body as well as four datatypes type, the package code effectively creates
THE PL/SQL CODE that define the parameter types to the four arrays that match the types of their
PL/SQL code will provide the interface procedure. Each type represents a respective columns in the JOBS table.
between the application and the database. column in the JOBS table, which has the For example, the t_job_id type is
The associative_array package specifica- following structure: declared to be a single-column table
the PL/SQL interface has been colocated application assigns the values (for the READ more about PL/SQL
with the data in the database. three new jobs) that will be inserted into associative arrays
Oracle Database PL/SQL User’s Guide and Reference
To test the new PL/SQL interface, run the JOBS table. Next, the application sets download.oracle.com/docs/cd/B19306_01/
the C# console application—available at the size of each array, adds the param- appdev.102/b14261/toc.htm
oracle.com/technology/oramag/oracle/ eters to the OracleCommand object’s Oracle Data Provider for .NET Developer’s Guide
07-jan/o17odp.zip—in Visual Studio. parameter collection, and invokes the download.oracle.com/docs/cd/B19306_01/win.102/
b14307/toc.htm
First, change the connection string to stored procedure to insert the data.
the appropriate values for your Oracle Finally, the application queries the VISIT the .NET Developer Center
oracle.com/technology/tech/dotnet
database instance so ODP.NET can pass table to show that the three new jobs
DOWNLOAD
associative arrays, then compile the code (IT_DBA, IT_MAN, and IT_VP) were sample code for this column
in Visual Studio, and then select Debug successfully added to the JOBS table. oracle.com/technology/oramag/oracle/07-jan/
o17odp.zip
-> Step Into from the Visual Studio
menu to see how it works. GOING FURTHER ODP.NET
oracle.com/technology/software/tech/
As you step through the code, PL/SQL associative arrays are not limited windows/odpnet
note that the application creates an to INSERT operations. You can also use
Sizing Up Performance
Tips and techniques for optimal Oracle Application Express performance
s Oracle Application Express per CPU, or 8.33 page views per CPU per 1,000 page views per minute, multiply
becomes more popular, many second. Meeting this requirement dictates the number of minutes in eight hours
users are asking for guidance on that the average page-view time in the (480) by the page views per minute
sizing and performance tuning. application must not exceed 120 ms. (1,000) to determine that the applica-
In this column, I’ll show you a quick and The relationship between the available tion can support 480,000 page views per
convenient way to estimate performance CPUs and the required page views per eight hours, or 4,800 users.
and sizing. I’ll also demonstrate how to minute results in the average response As a rule of thumb, you should size
identify and deal with performance issues. time per page, which can be expressed in for your busiest hour, because an appli-
Here are some of the more common the following equation: cation may serve only 100 page views
questions this column will answer: per minute in the course of a day but
OHow much hardware, especially how (N*60)= A may serve 1,000 page views per minute
many CPUs, will I need to handle a P during the peak hour.
given workload? where N is the number of CPUs, P is the Another rule of thumb is that you
OHow many users will my application number of page views per minute, and A should ensure an average page-view time
support? is the average response time per page. of 300 milliseconds or less. For high-
OHow do I locate my performance Using this simple equation, you can volume applications, with many hun-
bottlenecks? approximate the required average page- dreds or thousands of concurrent users,
Let’s start with some background. view time to support a targeted number the goal should be an average page-view
of page views per minute. By altering time of 150 milliseconds or less.
UNDERSTANDING ORACLE APPLICATION the number of CPUs or page views per
EXPRESS APPLICATION PERFORMANCE minute, you can establish clear perfor- FINDING AND ELIMINATING THE BOTTLENECKS
The key to optimal performance for most mance targets for your application. The overhead associated with the genera-
Oracle Application Express applications An application’s average page-view tion of a page view in Oracle Application
is to keep the average page-view times time can also help you predict the Express is fairly static. Any other process-
relatively short. Scaling is linear: For impact a change in the size of your user ing of developer-created SQL and PL/SQL
example, an application with average community will have as that community in an Oracle Application Express applica-
page-view times of 10 milliseconds (ms) grows. To determine how many users tion is in addition to this static overhead.
will be able to handle about 10 times as the application can support, start by first The easiest way to begin tuning your
many concurrent users as an application determining the number of page requests Oracle Application Express application
with average page-view times of 100 ms. during a given time period. is to run the application as an end user
You can use the performance statistics For example, if an average session with an adequate volume of real data.
collected by Oracle Application Express comprising 50 page views takes 10 Then, using the Monitor Activity feature
to easily approximate how well an minutes, then the application supports of Oracle Application Express, you can
Oracle Application Express application 5 page views per minute for a typical readily identify the poorest-performing
will scale. The performance statistics are session. If you are sizing the applica- pages in the application (see Figure 1).
available on the Monitor Activity page. tion to allow for 1,000 page views per Once you have identified the poorest-
Assuming that the application is well minute, the application will support 200 performing pages, you can examine them
tuned, with efficient SQL and PL/SQL, concurrent users per session. in Debug mode, by running the applica-
the single most important sizing factor is Extrapolating this data to approxi- tion and clicking the Debug link in the
the CPU. mate the daily user community, let’s Developer Toolbar. Debug mode renders
For example, suppose you are devel- further assume that all users are in the the page concurrently with timing infor-
oping an Oracle Application Express same time zone and that, on average, mation—you’ll see time codes that cor-
application that is required to support each user performs two sessions per respond to specific Oracle Application
1,000 page views per minute. On a dual- eight-hour day, resulting in 100 page Express actions as well as additional
CPU system, the application would need views (2 * 50 page views per session). details about item names, computation,
to achieve 500 page views per minute, Because you are sizing the application for and processing points.
0.05: Region: Projects Application” in the Oracle Application this column will help you estimate the
0.06: Show report Express User’s Guide for more informa- performance and scalability of Oracle
0.06: Determine column headings tion about using TKPROF in Oracle Application Express–based applications.
0.06: Activate sort Application Express.) If you’re not happy with an application’s
0.07: Parse query as: MIKE1 performance, use these pointers to
0.07: Binding: “:P24_SEARCH”=”P24_ TUNING PAGE ELEMENTS locate the slowest pages and then iden-
SEARCH” value=”” Page processes, computations, authori- tify the poorly performing components
0.07: Print column headings zations, validations, and conditions are within those pages. With this informa-
0.07: Rows loop: 15 row(s) other common tuning opportunities in tion, you can ensure that your Oracle
0.18: Region: Icon View Oracle Application Express applications. Application Express applications meet
The performance of these elements performance expectations. O
...
codeLISTING 3: Relocating the current_caseload function I slap my forehead, dig out the
e-mail, and find that the function is
CREATE OR REPLACE PACKAGE BODY call_manager
IS named dept_avg_caseload. I check for
FUNCTION current_caseload ( the existence of call_util in my PL/SQL
employee_id_in IN employees.employee_id%TYPE) editing environment, and—lo and
RETURN PLS_INTEGER
IS BEGIN ... END current_caseload; behold—the call_util.dept_avg_caseload
function in all its already implemented
PROCEDURE show_caseload ( beauty is there, waiting to be used.
department_id_in IN departments.department_id%TYPE)
IS BEGIN ... END show_caseload; I now go back to my distribute_calls
procedure, delete the avg_caseload_for_
PROCEDURE distribute_calls ( dept function, and change my executable
department_id_in IN departments.department_id%TYPE
) section as shown in Listing 4.
IS BEGIN ... END distribute_calls; Now one of the subprograms I am
END; using in my procedure is declared so
/
far away that I don’t even have control
over its implementation and may never
codeLISTING 4: Revised distribute_calls executable section even see that implementation. Is that a
BEGIN problem? No. I have more than enough to
WHILE ( calls_are_unhandled ( ) ) do and worry about!
LOOP The call_util.dept_avg_caseload func-
FOR emp_rec IN emps_in_dept_cur (department_id_in)
LOOP tion is implemented far from my usage,
IF current_caseload (emp_rec.employee_id) < but it is as close as possible to all usages,
call_util.dept_avg_caseload (department_id_in) which span various packages, and so
THEN
assign_next_open_call (emp_rec.employee_id); must be declared in the package specifi-
END IF; cation of call_utils.
END LOOP; This column concludes online,
END LOOP;
END distribute_calls; at oracle.com/technology/oramag/
oracle/07-jan/o17plsql.html, with a
checklist of recommendations on where
subprogram as closely as possible to its it makes more sense for me to move the to locate your PL/SQL code for Oracle
usage. Following that rule without any current_caseload function out of both Developer applications. O
further analysis, I would define each distribute_calls and show_caseload.
of the programs as local subprograms So with a little reshuffling of code, I Steven Feuerstein (steven.feuerstein@quest.com) is
within distribute_calls itself, as shown end up with the package body shown in Quest Software’s PL/SQL evangelist. He has published
in Listing 2 (the ellipses [...] indicate the Listing 3. 10 books on Oracle’s programming language, including
implementation of the subprograms). Now I have moved the current_ Oracle PL/SQL Programming and Oracle PL/SQL Best
Procedures and functions directly caseload function farther away from Practices (O’Reilly Media), and has created the free
defined within the declaration section distribute_calls, but that is because it is Quest Code Tester for Oracle.
of any PL/SQL block are called local or used by two subprograms in the package.
nested subprograms. In this example, they So it is now as close as possible to both
can be called only within the distribute_ of its usages. Yet I don’t expect or see
calls procedure, and that certainly defines any need for current_caseload to be used READ online-only column content
them as closely as possible to their usage. outside of the distribute_calls package, oracle.com/technology/oramag/oracle/07-jan/
o17plsql.html
Yet, as I do this, I find myself think- so I do not place the header of current_
ing about the other programs I have caseload in the package specification. READ more
PL/SQL Practices
already written in this package and how Now my attention turns to avg_ oracle.com/technology/oramag/oracle/plsql
I might want to use some of this new caseload_for_dept. Something about Best Practice PL/SQL
code in programs I’ll write in the future. this program seems so familiar. What is oracle.com/technology/pub/columns/plsql
I realize, for example, that last week it, what is it? Oh, yeah! My coworker LEARN more about using PL/SQL
I wrote another function that is very Sandra sent out an e-mail last week collections with SQL object types
similar to current_caseload. It is now letting us all know that she had put Oracle Database PL/SQL User’s Guide and Reference
download.oracle.com/docs/cd/B19306_01/
“buried” inside a procedure named together a package named call_util that appdev.102/b14261/objects.htm#sthref2434
show_caseload. Rather than implement contained several handy utility programs, DOWNLOAD Oracle Database 10g
the same logic twice (and thereby need including a function that returned the oracle.com/technology/software/products/database/
oracle10g
to debug and maintain it in both places), average caseload for an employee.
Recover in a Flash
Reduce database recovery time, using the Oracle flash recovery area.
f you are using Oracle You can check the
Recovery Manager values of the FRA param-
(RMAN) as a backup tool eters set by querying the
for your Oracle database, V$RECOVERY_FILE_DEST
you probably already know data dictionary view:
that you have two options
for the backup location: disk select *
and tape. If you choose the from v$recovery_file_dest;
former, you may back up to
any location available to the For my example, the
server, but you must make result shows that there
sure the location has enough are 51 files in the FRA
space for the backups. You (the NUMBER_OF_FILES
also have to remove the old column). To determine the
backups to make room for file types, you can check
the new ones, keep track of the V$FLASH_RECOVERY_
the redundant backups, and AREA_USAGE view. This
make sure that backups and view shows the used and
archive logs are available. reclaimable spaces of each
FRA as the location and 2GB as the size, type of file as percentages of this total
FLASH RECOVERY AREA you issue the following while logged in space. To get a more useful picture, you
To help manage disk backups, in Oracle as the SYS user: can combine these two views in a single
Database 10g Release 1 and later, you can query, shown in Listing 1, which shows
define a special disk area that serves as alter system set the total size of the files instead of per-
a location for all types of backups. This db_recovery_file_dest_size = 2G; centages. As you can see from the output,
location is the flash recovery area (FRA). alter system set there are 34 archived log files, 16 Oracle
Oracle Database manages the space inside db_recovery_file_dest = ‘/home/oracle/FRA’; RMAN backup files, and 1 flashback log
this area; keeps track of backups that are file. The nonessential backups that can
needed; and if necessary, deletes old ones To ensure that the values are set after be deleted show up as RECLAIMABLE.
to make room for new ones. By default, the database is restarted, put the following If there is not sufficient space, the Oracle
the Oracle RMAN backups (both regular lines in the initialization parameter file: RMAN backup will return with an error:
and image copies), online redo logs,
archived logs, control files, and flashback db_recovery_file_dest_size = 2G ORA-19809: limit exceeded for
logs are created in the FRA. When new db_recovery_file_dest = ‘/home/oracle/FRA’ recovery files
backups or files demand more room, ORA-19804: cannot reclaim 104857600
Oracle Database automatically removes If you are setting up the FRA on an bytes disk space from 1073741824 limit
the nonessential backups, freeing the DBA Oracle Real Application Clusters (Oracle
from this chore. The files in the FRA are RAC) database, the FRA location must To create enough space for the Oracle
considered nonessential when they become be visible to all database nodes. So it RMAN backups to complete successfully,
obsolete according to the retention policy, must be one of the following: a shared either manually remove some backups
or when they have already been backed file system, an NFS-mounted file system, or increase the size of the FRA. To see
up to tape with Oracle RMAN. or an Automatic Storage Management the list of image copies in the FRA
(ASM) disk group. If you use ASM, the made by Oracle RMAN, you can use
SETTING UP parameter is set as the Oracle RMAN list copy of database
DAN HUBIG
users01.dbf
Copy of Datafile
Connect to Oracle RMAN and com-
plete the rest of the recovery activities, DATABASE FRA
which are similar to the steps listed Damaged Datafile
(not useful)
Datafile Datafile Datafile
above except that Step 2 is now “Switch Datafile Datafile Datafile Copy Copy Copy
2 3 4
datafile 4 to the copy in the FRA.” All 2 3 4
select name from v$datafile burden of managing the space from the DBAs can direct all backups to a single
where file# = 4; DBA to the database. location that is managed by Oracle
Database. Using the Oracle RMAN
NAME BACK UP TO TAPE image copies in the FRA, DBAs can very
---------------------------------------------------------------------------------------------------- Although the backup to the FRA comes quickly recover from damage to a datafile
/home/oracle/oradata/PRODB2/users01.dbf with great benefits, it is still not foolproof without using a traditional restore-and-
for normal disaster protection. Disks can recovery operation. O
In case of a failure, you save valuable fail, making these FRA backups disap-
time by quickly using the image copy of pear. Similarly, unlike tapes, disks cannot Arup Nanda (arup@proligence.com) has been an
the datafile in the FRA, and there is no be removed easily and stored at a differ- Oracle DBA for more than 12 years, handling all
need to restore it first. The same concept ent location. Therefore, you still need to aspects of database administration—from performance
can be applied to the entire database as back up the FRA to tape. To do so, use tuning to security and disaster recovery. He is a
well. If the original location of all the the following command in RMAN. It coauthor of PL/SQL for DBAs (O’Reilly Media, 2005)
datafiles is damaged, you can easily switch backs up all contents of the FRA, includ- and was Oracle Magazine’s DBA of the Year in 2003.
the entire database to the copy stored in ing archived logs:
the FRA. To switch to the FRA copy, issue
the following, which directs the whole run {
database to use all the latest image copies allocate channel c1 type sbt_tape;
in the FRA location as its datafiles: backup recovery area; READ more about the
} flash recovery area
“Configuring the Flash Recovery Area:
RMAN> switch database to copy; Advanced Topics”
download.oracle.com/docs/cd/B19306_01/
CONCLUSION backup.102/b14191/rcmconfg001.htm#sthref476
Note that you can also perform the The primary objective of any backup
Flashback database command
above operations on the image copies design is to enhance the process of “Flash Back to a Better Time”
in any location without using the FRA. recovery—to make it faster and more oracle.com/technology/oramag/oracle/04-may/
o34tech_avail.html
However, using the FRA moves the reliable. Using the flash recovery area,
!
"
"
#
$ %
$ &
!
""
'
( )
!
& * *&
"
+&) ! #
"$
%
!
** %
#
"
)#
"'
'
,--.'
"
'
would get three records, but the records SQL> select * ambiguity. They will do so, but the
I retrieved would be somewhat random. 2 from analytic functions might return more
For example 3 (select x,y, than n rows. In my opinion, when
4 row_number() the attribute I order by is not unique,
SQL> update emp 5 over (order by x) rn I want my query to return all of the
2 set sal = 3000 6 from t) relevant records—not just the first n
3 where ename = ‘SMITH’; 7 where rn <= 3; arbitrary ones. To that end, I can use
1 row updated. the RANK and DENSE_RANK analytic
X Y RN functions. Let’s take a look at what
SQL> select * -------–– -------- ------ they do:
2 from ( 1 100 1
3 select ename, sal, 1 200 2 SQL> select ename,sal,
4 row_number() 1 300 3 2 row_number()
5 over (order by sal desc) rn 3 over (order by sal desc)rn,
6 from emp 3 rows selected. 4 rank()
7 ) 5 over (order by sal desc)rnk,
8 where rn <= 3 Now, here’s what happens if I reload 6 dense_rank()
9 order by sal desc this table with the same data, just in a 7 over (order by sal desc)drnk
10 / different order: 8 from emp
9 order by sal desc
ENAME SAL RN SQL> truncate table t; 10 /
-------------– ----------- ------ Table truncated.
KING 5000 1 ENAME SAL RN RNK DRNK
SMITH 3000 2 SQL> insert into t --------------- ------------ ------ ---------- -------------
SCOTT 3000 3 2 values ( 1, 400 ); KING 5000 1 1 1
SQL> insert into t FORD 3000 2 2 2
3 rows selected. 2 values ( 1, 200 ); SCOTT 3000 3 2 2
SQL> insert into t JONES 2975 4 4 3
As you can see, FORD disappeared 2 values ( 1, 300 ); BLAKE 2850 5 5 4
from this result set. However, you might SQL> insert into t CLARK 2450 6 6 5
find that if you perform this update and 2 values ( 1, 100 );
...
ordering by something nonunique, the 5 over (order by x) rn unique numbers from 1..N to a result set.
first set of n rows you get back may be 6 from t) O RANK does not assign unique
different, given exactly the same input 7 where rn <= 3; numbers—FORD and SCOTT tied for
data. For example second place—nor does it assign contig-
X Y RN uous numbers. No record was assigned
SQL> create table t -------–– -------- ------ the value of 3, because two people tied
2 ( x number, 1 400 1 for second place, and no one came in
3 y number 1 200 2 third, according to RANK.
4 ); 1 300 3 O DENSE_RANK, like RANK, does
select /*+ first_rows(25) */ out with the salary top-n query. For faster and more efficient query plan step
your_columns, more details on deterministic queries, for a GROUP BY operation, and it defi-
row_number() go to oracle.com/technology/oramag/ nitely doesn’t sort data.
over (order by something unique)rn oracle/06-sep/o56asktom.html. Also, Don’t be misled if the results are not
from your_tables ) for complete information on using ana- the same on your system. It does not
where rn between :n and :m lytic functions, see download.oracle. matter if, when you execute that query,
order by rn; com/docs/cd/B19306_01/server.102/ the results are sorted on your system—it
b14223/analysis.htm#i1007779 (chapter takes only one countercase to demon-
For example, suppose you wanted 21 of the Data Warehousing Guide). In strate that something is not always true.
to paginate through the ALL_OBJECTS my opinion, analytic functions are the Only with an ORDER BY can you make
view, wanted to show 25 rows on a coolest thing to happen to SQL since the any assumptions about the sorted order
page, and needed to show page 5. The SELECT keyword was introduced. of data. Many things—from parallel
query would be query to partitioning, to reverse-key
DOES GROUP BY SORT? indexes, to hash-partitioned indexes, to
SQL> variable n number Does a GROUP BY clause in a query guaran- HASH GROUP BY steps, to the presence
SQL> variable m number tee that the output data will be sorted on the (or lack) of B*tree indexes—can and
SQL> exec :n := 101; :m := 125 GROUP BY columns in order, even if there is no will cause data not to be returned in the
PL/SQL procedure successfully completed. ORDER BY clause? sorted order you anticipated.
Unless and until there is an ORDER If you need data sorted, you have to
SQL> select * BY statement on a query, the rows use an ORDER BY statement; there is no
2 from ( returned cannot be assumed to be in avoiding that. For more of this ORDER
3 select /*+ first_rows(25) */ any order. Without an ORDER BY, the BY discussion, check out asktom.oracle
4 object_id,object_name, data may be returned in any order in .com/~tkyte/OrderBy.html. O
5 row_number() over which the database feels like returning
6 (order by object_id) rn it. This has always been true and will Tom Kyte has worked for Oracle since 1993. He is a
7 from all_objects) always be true. vice president in the Oracle Public Sector group and
8 where rn between :n and :m In fact, in Oracle Database 10g the author of Expert Oracle Database Architecture:
9 order by rn; Release 2, you’ll see GROUP BY return- 9i and 10g Programming Techniques and Solutions
ing data in a random order much more (Apress, 2005) and Effective Oracle by Design (Oracle
OBJECT_ID OBJECT_NAME RN often than before: Press, 2003), among others.
-------------------------- --------------------------------- -------
102 I_SEQ1 101 SQL> set autotrace on explain
103 I_OBJAUTH1 102 SQL> select job, count(*)
2 from emp
...
Partners able to demonstrate superior product knowledge, competence, and a commitment to doing business with Oracle qualify for the Oracle PartnerNetwork Certified Advantage Partner level. These partners receive a higher level
of service, training, benefits, and resources from Oracle to support them in delivering quality to customers. For more information on partners, please visit the Oracle PartnerNetwork Solutions Catalog at solutions.oracle.com.
Listening to You
IOUG surveys provide guidance for expanding databases and open source software issues.
hom do you listen to? When perhaps more selective—if our backup more than half of their critical apps. And
you need insight into how windows aren’t to exceed operational although price is the irresistible appeal
to do your job better or windows. Performance issues—how the of open source software, other consider-
where the database industry application response scales with database ations are important. Maintenance and
is headed, what is your best source of size—must be investigated, clarified, and support is one of the major concerns:
information? Does one particular colum- solved. Replication to multiple sites—for 35 percent of those surveyed see open
nist resonate with you? Is it a company’s high availability, disaster recovery, and source as more difficult than commercial
press releases or white papers that make efficient access—becomes problematic software to maintain and support.
you go “Hmm”? Is it some coworker or with large and growing databases. The The rapid adoption of open source
colleague who has just the right perspec- storage aspect is significant, with tiers of in Oracle environments presents many
tive on the matters that matter? options—archives, expensive disks, inex- challenges, as well as rewards, for enter-
The Independent Oracle Users Group pensive disks—to consider and select. prises. Companies need to plan for
(IOUG) conducts quarterly surveys of its Another recent IOUG survey queried integrating open source solutions and
membership on all kinds of issues that the use of Linux, an open source operat- have firm policies in place. Do the open
affect your job, your enterprise, and the ing system with both free and for-pay source solutions meet company secu-
industry as a whole. The monthly maga- versions. Once regarded as a hobbyist rity policies? Are current applications
zine Database Trends and Applications operating system, Linux now has a place compatible and certified with the open
and vendors looking for specific infor- at most enterprises, and its adoption source technologies? Does staff need to
mation sponsor these surveys, but it’s is increasing. The survey suggests that be retrained for new skills? Will the scal-
your opinion that makes them valuable. in the next year, Linux installations ability and performance meet business
These e-mail surveys go out to 20,000 will increase from 37 to 44 percent of requirements? These and other questions
IOUG members worldwide, and what enterprises in a year; Windows popular- need to be asked before companies can
the membership says is worth listening to. ity will fall from 60 to 48 percent, and realize the rewards of cost savings, easier
One recent IOUG survey about UNIX will fall from 74 to 67 percent. maintenance, and better performance.
database growth revealed invaluable The main attraction of Linux is cost The IOUG surveys will continue
information for perspective and plan- savings: It’s hard to say no to free. “You in the year ahead, giving everyone the
ning purposes. Databases are growing get what you pay for” doesn’t seem to opportunity to profit from the valuable
by 20 to 80 percent per year. Just a few apply to a solid and stable operating experience and perspective that IOUG
years ago, a 10GB database was big. Our system that many major enterprises members offer. The IOUG is listening
survey revealed that 23 percent of enter- accept. Even the for-pay versions of to DBAs, IT directors, system architects,
prises now have at least one terabyte- Linux are less expensive than the more application designers, project managers,
sized database. These bigger databases widely used commercial operating CIOs, and presidents like you. O
aren’t just found at large enterprises, systems. Performance and reliability
although 41 percent of large enterprises equal or exceed those of commercial Ari Kaplan (ari_kaplan@ioug.org) is president of the
do report at least one terabyte database. products, according to many respon- Independent Oracle Users Group (IOUG) and senior
Fully 24 percent of medium enterprises dents. Clearly Linux is a phenomenon consultant at Datalink. He founded Expand Beyond
and 10 percent of small enterprises that we all need to be aware of and to Corporation, a leader in mobile IT software. He has been
also report terabyte databases. Some include in enterprise planning. involved in Oracle technology since 1992.
enterprises—including heavyweights In the recent survey, Linux has taken
like Google, Yahoo!, and Oracle itself— the lead as the top platform for data-
report petabyte-sized database environ- bases, but Linux is only one example
READ about Oracle on Linux
ments. (That’s a million gigabytes.) of open source software that many oracle.com/technologies/linux
Such large databases, and the yearly enterprises use. A full 66 percent of DOWNLOAD Oracle Database
growth in all databases, present chal- respondents reported using open source 10g Release 2
lenges that we need to handle. Backup software for at least one mission-critical oracle.com/technology/software/products/database/
oracle10g
solutions need to become faster— application. In fact, 9 percent use it for
5-!33D98 )SENBERG 3CHOOL
G
OF -ANAGEMENT
5NIVERSITY OF -ASSACHUSETTS !MHERST
{
-/Ê*,"
--",-
*ÀviÃÃ>Ê ÃÕVViÃÃÊ ÃÊ Ê }iÀÊ ÕÃÌÊ >LÕÌÊ
Ü}Ê "À>ViÊ ÌiV
}Þ]Ê ÌÊ ÜÊ ÀiµÕÀiÃÊ
ÊV>«ÕÃÊÀiÃ`iVÞÊÀiµÕÀiiÌ
UÊ ÎÇÊVÀi`Ì]Ê«>ÀÌÌiÊ«À}À>
Ü}Ê Ì
iÊ º>}Õ>}iÊ vÊ LÕÃiÃð»Ê /
iÊ
UÊ
ÕÀÃiÃÊÌ>Õ}
ÌÊLÞÊ}À>`Õ>ÌiÊv>VÕÌÞ
pÊÓääx]ÊÓääÈÊ>`ÊÓääÇÊ*ÀViÌÊ,iÛiÜ\Ê 1>ÃÃÊ
iÀÃÌÊ"iÊ*ÀviÃÃ>Ê Ê}ÛiÃÊ
iÃÌÊ ÕÃiÃÃÊ-V
ÃÊÀ>}Ã UÊ VVÀi`Ìi`Ê>Ì>ÞÊ>`ÊÌiÀ>Ì>ÞÊ
ÞÕÊÌÊLÕÃiÃÃÊÌÃÊÌÊÃÕVVii`°Ê
LÞÊ
-
decentralized: all development groups It’s very likely to be used in a Web-facing DOWNLOAD
have security points of contact; all devel- application, which is another reason you Oracle Database 10g Express Edition
opers are trained on security. My goal want it hardened out of the box. (Oracle Database XE)
oracle.com/technology/products/database/xe
for security is not to build another high Also, we took a lesson from history.
making the databases simpler to use environments. They want to manage READ about Unbreakable Linux
oracle.com/technologies/linux
and more self-managing, so they will their businesses. This gives them two oracle.com/technology/tech/linux
work right out of the box. A self- basic choices: Either they can go to
Storage
Systems Management
Services
Software
© 2006 Network Appliance, Inc. All rights reserved. Specifications subject to change without notice. NetApp and the Network Appliance logo are registered trademarks
and Network Appliance is a trademark of Network Appliance, Inc. in the U.S. and other countries. Oracle is a registered trademark of Oracle Corporation. All other brands
or products are trademarks or registered trademarks of their respective holders and should be treated as such. Part # C14989-01