|Oracle® Database Advanced Application Developer's Guide
11g Release 1 (11.1)
|PDF · Mobi · ePub|
The new application development features for Release 11.1 are:
DDL statements require exclusive locks on internal structures. If these locks are unavailable when a DDL statement is issued, the DDL statement fails, though it might have succeeded if it had been issued subseconds later. The
WAIT option of the SQL statement
TABLE enables a DDL statement to wait for its locks for a specified period of time before failing.
For more information, see Choosing a Locking Strategy.
Binary XML is a third way to represent an XML document. Binary XML complements, rather than replaces, the existing object-relational storage and
CLOB storage representations. Binary XML has two significant benefits:
XML operations can be significantly optimized, whether or not an XML schema is available.
The internal representation of XML is the same on disk, in memory, and on wire.
As with other storage mechanisms, the details of binary XML storage are transparent to you. You continue to use
XMLType and its associated methods and operators.
For more information, see Representing XML.
See Also:Oracle XML DB Developer's Guide
Metadata for SQL built-in functions is accessible through dynamic performance (
V$) views. Third-party tools can leverage built-in SQL functions without maintaining their metadata in the application layer.
For more information, see Metadata for SQL Built-In Functions.
The regular expression built-in functions
REGEXP_SUBSTR have increased functionality. A new regular expression built-in function,
REGEXP_COUNT, returns the number of times a pattern appears in a string. These functions act the same in SQL and PL/SQL.
For more information, see Oracle Database Implementation of Regular Expressions.
See Also:Oracle Database SQL Language Reference
An invisible index is maintained by Oracle Database for every Data Manipulation Language (DML) statement, but is ignored by the optimizer unless you explicitly set the parameter
TRUE on a session or system level.
Making an index invisible is an alternative to making it unusable or dropping it. Using invisible indexes, you can do the following:
Test the removal of an index before dropping it
Create invisible indexes temporarily for specialized, nonstandard operations, such as online application upgrades, without affecting the behavior of existing applications
For more information, see Drop Unused Indexes.
Before Release 11.1, if you wanted your PL/SQL application to cache the results of a function, you had to design and code the cache and cache-management subprograms. If multiple sessions ran your application, each session had to have its own copy of the cache and cache-management subprograms. Sometimes each session had to perform the same expensive computations.
As of Release 11.1, PL/SQL provides a function result cache. Because the function result cache is stored in a shared global area (SGA), it is available to any session that runs your application.
For more information, see PL/SQL Function Result Cache.
NEXTVAL make writing PL/SQL source code easier for you and improve run-time performance and scalability. You can use
NEXTVAL wherever you can use a
See Example 7-6.
PL/Scope is a compiler-driven tool that collects and organizes data about user-defined identifiers from PL/SQL source code. Because PL/Scope is a compiler-driven tool, you use it through interactive development environments (such as SQL Developer and JDeveloper), rather than directly.
PL/Scope enables the development of powerful and effective PL/Scope source code browsers that increase PL/SQL developer productivity by minimizing time spent browsing and understanding source code.
For a detailed description of PL/Scope, see Chapter 8, "Using PL/Scope."
Nonhierarchical (flat) profilers record the time that a program spends within each subprogram—the function time or self time of each subprogram. Function time is helpful, but often inadequate. For example, it is helpful to know that a program spends 40% of its time in the subprogram
INSERT_ORDER, but it is more helpful to know which subprograms call
INSERT_ORDER often and the total time the program spends under
INSERT_ORDER (including its descendent subprograms). Hierarchical profilers provide such information.
The PL/SQL hierarchical profiler does the following:
Reports the dynamic execution profile of your PL/SQL program, organized by subprogram calls
Accounts for SQL and PL/SQL execution times separately
Requires no special source or compile-time preparation
Stores results in database tables (hierarchical profiler tables) for custom report generation by integrated development environment (IDE) tools (such as SQL Developer and third-party tools)
To generate simple HTML reports from raw profiler output, you can use the
plshprof command-line utility.
Each subprogram-level summary in the dynamic execution profile includes information such as:
Number of calls to the subprogram
Time spent in the subprogram itself (function time or self time)
Time spent in the subprogram itself and in its descendent subprograms (subtree time)
Detailed parent-children information, for example:
All callers of a given subprogram (parents)
All subprograms that a given subprogram called (children)
How much time was spent in subprogram x when called from y
How many calls to subprogram x were from y
You can browse the generated HTML reports in any browser. The browser's navigational capabilities, combined with well chosen links, provide a powerful way to analyze performance of large applications, improve application performance, and lower development costs.
For a detailed description of PL/SQL hierarchical profiler, see Chapter 9, "Using the PL/SQL Hierarchical Profiler."
Before Release 11.1, Continuous Query Notification (CQN) published only object change notifications, which result from DML or DDL changes to the objects associated with registered the queries.
As of Release 11.1, CQN can also publish query result change notifications, which result from DML or DDL changes to the result set associated with the registered queries. New static data dictionary views enable you to see which queries are registered for result-set-change notifications (see Querying CQN Registrations).
For more information, see Chapter 12, "Using Continuous Query Notification."
TRANSACTION_BACKOUT procedure rolls back a transaction and its dependent transactions while the database remains online. This recovery operation uses undo data to create and execute the compensating transactions that return the affected data to its original state.
For more information, see Using Flashback Transaction.
A Flashback Data Archive provides the ability to store and track all transactional changes to a record over its lifetime. It is no longer necessary to build this intelligence into the application. A Flashback Data Archive is useful for compliance with record stage policies and audit reports.
For more information, see Using Flashback Data Archive (Oracle Total Recall).
The XA interface functionality that supports transactions involving multiple resource managers, such as databases and queues, is now available within PL/SQL. You can use PL/SQL to switch and share transactions across SQL*Plus sessions and across processes.
For more information, see Using the DBMS_XA Package.
An XA transaction now spans Oracle RAC instances by default, enabling any application that uses XA to take full advantage of the Oracle RAC environment, enhancing the availability and scalability of the application.
For more information, see Using Oracle XA with Oracle Real Application Clusters (Oracle RAC).
The Identity Code Package provides tools to store, retrieve, encode, decode, and translate between various product or identity codes, including Electronic Product Code (EPC), in Oracle Database. The Identity Code Package provides new data types, metadata tables and views, and PL/SQL packages for storing EPC standard RFID tags or new types of RFID tags in a user table.
The Identity Code Package enables Oracle Database to recognize EPC coding schemes, to support efficient storage and component-level retrieval of EPC data, and to comply with the EPCglobal Tag Data Translation 1.0 (TDT) standard that defines how to decode, encode, and translate between various EPC RFID tag representations.
The Identity Code Package also provides an extensible framework that enables you to use pre-existing coding schemes with applications that are not included in the EPC standard and adapt Oracle Database both to these older systems and to evolving identity codes that might become part of a future EPC standard.
The Identity Code Package also lets you create your own identity codes by first registering the new encoding category, registering the new encoding type, and then registering the new components associated with each new encoding type.
For more information, see Chapter 17, "Using the Identity Code Package."
Online index creation and rebuilding no longer requires a DML-blocking lock.
Before Release 11.1, online index creation and rebuilding required a very short-term DML-blocking lock at the end of the rebuilding. The DML-blocking lock could cause a spike in the number of waiting DML operations, and therefore a short drop and spike of system usage. This system usage anomaly could trigger operating system alarm levels.
The PL/SQL gateway enables a user-written PL/SQL subprogram to be invoked in response to a URL with parameters derived from an HTTP request.
mod_plsql is a form of the gateway that exists as a plug-in to the Oracle HTTP Server. Now the PL/SQL gateway is also embedded in the database itself. The embedded PL/SQL gateway uses the internal Oracle XML Database Listener and does not depend on the Oracle HTTP Server. You configure the embedded version of the gateway with the
For more information, see Using Embedded PL/SQL Gateway.
When an application calls an external C procedure, either Oracle Database or Oracle Listener starts the external procedure agent,
Before Release 11.1, Oracle Listener spawned the multithreaded
extproc agent, and you defined environment variables for
extproc in the file
As of Release 11.1, by default, Oracle Database spawns
extproc directly, eliminating the risk that Oracle Listener might spawn
extproc unexpectedly. This default configuration is recommended for maximum security. If you use it, you define environment variables for
extproc in the file
For more information, including situations in which you cannot use the default configuration, see Loading External Procedures.