Docsity
Docsity

Prepara tus exámenes
Prepara tus exámenes

Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity


Consigue puntos base para descargar
Consigue puntos base para descargar

Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium


Orientación Universidad
Orientación Universidad


Oracle Developer Guide, Apuntes de Psicología

Asignatura: Oracle, Profesor: Sin profesor, Carrera: Psicologia, Universidad: UOC

Tipo: Apuntes

2013/2014

Subido el 25/04/2014

salvilmaes
salvilmaes 🇪🇸

6 documentos

1 / 742

Toggle sidebar

Esta página no es visible en la vista previa

¡No te pierdas las partes importantes!

bg1
Oracle9
i
Application Developer’s Guide - Fundamentals
Release 2 (9.2)
March 2002
Part No. A96590-01
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Vista previa parcial del texto

¡Descarga Oracle Developer Guide y más Apuntes en PDF de Psicología solo en Docsity!

Oracle9i

Application Developer’s Guide - Fundamentals

Release 2 (9.2)

March 2002

Part No. A96590-

Oracle9 i Application Developer’s Guide - Fundamentals, Release 2 (9.2)

Part No. A96590-

Copyright © 1996, 2002 Oracle Corporation. All rights reserved.

Primary Author: John Russell

Contributing Authors: T. Brooksfuller, T. Burroughs, M. Cowan, J. Levinger, R. Moran, R. Strohm

Contributors: D. Alpern, G. Arora, C. Barclay, D. Bronnikov, T. Chang, M. Davidson, G. Doherty, D. Elson, A. Ganesh, M. Hartstein, J. Huang, N. Jain, R. Jenkins Jr., S. Kotsovolos, S. Kumar, C. Lei, D. Lorentz, R. Murthy, R. Pang, B. Sinha, S. Vemuri, W. Wang, D. Wong, A. Yalamanchi, Q. Yu

Graphic Designer: V. Moore

The Programs (which include both the software and documentation) contain proprietary information of Oracle Corporation; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent and other intellectual and industrial property laws. Reverse engineering, disassembly or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited.

The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. Oracle Corporation does not warrant that this document is error-free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Oracle Corporation.

If the Programs are delivered to the U.S. Government or anyone licensing or using the programs on behalf of the U.S. Government, the following notice is applicable:

Restricted Rights Notice Programs delivered subject to the DOD FAR Supplement are "commercial computer software" and use, duplication, and disclosure of the Programs, including documentation, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement. Otherwise, Programs delivered subject to the Federal Acquisition Regulations are "restricted computer software" and use, duplication, and disclosure of the Programs shall be subject to the restrictions in FAR 52.227-19, Commercial Computer Software - Restricted Rights (June, 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City, CA 94065.

The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup, redundancy, and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and Oracle Corporation disclaims liability for any damages caused by such use of the Programs.

Oracle is a registered trademark, and ConText, Oracle Store, Oracle7, Oracle8, Oracle8 i , Oracle9 i , PL/SQL, ProCOBOL, ProC, ProC/C++, SQLNet, and SQL*Plus are trademarks or registered trademarks of Oracle Corporation. Other names may be trademarks of their respective owners.

iv

xvi

  • Overview of Pro*COBOL 1-
    • How You Implement a Pro*COBOL Application 1-
    • Highlights of Pro*COBOL Features 1-
  • Overview of OCI and OCCI 1-
    • Advantages of OCI 1-
    • Parts of the OCI 1-
    • Procedural and Non-Procedural Elements 1-
    • Building an OCI Application 1-
  • Overview of Oracle Objects for OLE (OO4O) 1-
    • OO4O Automation Server 1-
    • OO4O Object Model 1-
    • Support for Oracle LOB and Object Datatypes 1-
    • The Oracle Data Control 1-
    • The Oracle Objects for OLE C++ Class Library...................................................................... 1-
    • Additional Sources of Information........................................................................................... 1-
  • Choosing a Programming Environment 1-
    • Choosing Whether to Use OCI or a Precompiler 1-
    • Using Built-In Packages and Libraries..................................................................................... 1-
    • Java versus PL/SQL 1-
  • Managing Tables 2- 2 Managing Schema Objects
    • Designing Tables 2-
    • Creating Tables 2-
  • Managing Temporary Tables 2-
    • Creating Temporary Tables......................................................................................................... 2-
    • Using Temporary Tables 2-
    • Examples: Using Temporary Tables 2-
    • Tip: Referencing the Same Subquery Multiple Times............................................................. 2-
  • Managing Views 2-
    • Creating Views 2-
    • Replacing Views 2-
    • Using Views in Queries 2-
    • Dropping Views 2-
  • Modifying a Join View 2-
    • About Key-Preserved Tables 2- v
    • Rule for DML Statements on Join Views 2-
    • Using the UPDATABLE_COLUMNS Views.......................................................................... 2-
    • Outer Joins 2-
  • Managing Sequences 2-
    • Creating Sequences 2-
    • Altering Sequences 2-
    • Using Sequences 2-
    • Dropping Sequences 2-
  • Managing Synonyms 2-
    • Creating Synonyms 2-
    • Using Synonyms in DML Statements 2-
    • Dropping Synonyms 2-
  • Creating Multiple Tables and Views in One Operation 2-
  • Naming Schema Objects 2-
    • Rules for Name Resolution in SQL Statements 2-
  • Renaming Schema Objects 2-
  • Switching to a Different Schema 2-
  • Listing Information about Schema Objects 2-
  • Summary of Oracle Built-In Datatypes 3- 3 Selecting a Datatype
  • Representing Character Data 3-
  • Representing Numeric Data 3-
  • Representing Date and Time Data 3-
    • Date Format 3-
    • Time Format 3-
    • Establishing Year 2000 Compliance 3-
  • Representing Geographic Coordinate Data 3-
  • Representing Image, Audio, and Video Data 3-
  • Representing Searchable Text Data 3-
  • Representing Large Data Types 3-
    • Migrating LONG Datatypes to LOB Datatypes 3-
    • Using RAW and LONG RAW Datatypes 3-
  • Addressing Rows Directly with the ROWID Datatype 3-
  • ANSI/ISO, DB2, and SQL/DS Datatypes 3- vi
  • How Oracle Converts Datatypes 3-
    • Datatype Conversion During Assignments............................................................................ 3-
    • Datatype Conversion During Expression Evaluation 3-
  • Representing Dynamically Typed Data 3-
  • Representing XML Data 3-
  • Overview of Integrity Constraints 4- 4 Maintaining Data Integrity Through Constraints
    • When to Enforce Business Rules with Integrity Constraints 4-
    • When to Enforce Business Rules in Applications 4-
    • Creating Indexes for Use with Constraints............................................................................... 4-
    • When to Use NOT NULL Integrity Constraints 4-
    • When to Use Default Column Values........................................................................................ 4-
    • Setting Default Column Values 4-
    • Choosing a Table’s Primary Key 4-
    • When to Use UNIQUE Key Integrity Constraints 4-
    • Constraints On Views for Performance, Not Data Integrity 4-
  • Enforcing Referential Integrity with Constraints 4-
    • About Nulls and Foreign Keys 4-
    • Defining Relationships Between Parent and Child Tables................................................... 4-
    • Rules for Multiple FOREIGN KEY Constraints 4-
    • Deferring Constraint Checks..................................................................................................... 4-
  • Managing Constraints That Have Associated Indexes 4-
    • Minimizing Space and Time Overhead for Indexes Associated with Constraints 4-
  • Guidelines for Indexing Foreign Keys 4-
  • About Referential Integrity in a Distributed Database 4-
  • When to Use CHECK Integrity Constraints 4-
    • Restrictions on CHECK Constraints 4-
    • Designing CHECK Constraints 4-
    • Rules for Multiple CHECK Constraints 4-
    • Choosing Between CHECK and NOT NULL Integrity Constraints 4-
  • Examples of Defining Integrity Constraints 4-
    • Defining Integrity Constraints with the CREATE TABLE Command: Example 4-
    • Defining Constraints with the ALTER TABLE Command: Example 4-
    • Privileges Required to Create Constraints 4- vii
    • Naming Integrity Constraints 4-
  • Enabling and Disabling Integrity Constraints 4-
    • Enabling and Disabling Existing Integrity Constraints 4-
    • Guidelines for Enabling and Disabling Key Integrity Constraints 4-
    • Fixing Constraint Exceptions 4-
  • Altering Integrity Constraints 4-
    • Renaming Integrity Constraints 4-
  • Dropping Integrity Constraints 4-
  • Managing FOREIGN KEY Integrity Constraints 4-
    • Rules for FOREIGN KEY Integrity Constraints 4-
    • Restriction on Enabling FOREIGN KEY Integrity Constraints 4-
  • Viewing Definitions of Integrity Constraints 4-
    • Examples of Defining Integrity Constraints 4-
  • Guidelines for Application-Specific Indexes 5- 5 Selecting an Index Strategy
  • Creating Indexes: Basic Examples 5-
  • When to Use Domain Indexes 5-
  • When to Use Function-Based Indexes 5-
    • Advantages of Function-Based Indexes 5-
    • Examples of Function-Based Indexes 5-
    • Restrictions for Function-Based Indexes 5-
  • What Are Index-Organized Tables? 6- 6 Speeding Up Index Access with Index-Organized Tables
    • Index-Organized Tables Versus Ordinary Tables 6-
    • Advantages of Index-Organized Tables.................................................................................... 6-
  • Features of Index-Organized Tables 6-
  • Why Use Index-Organized Tables? 6-
  • Example of an Index-Organized Table 6-
  • Overview of SQL Statement Execution 7- 7 How Oracle Processes SQL Statements
    • Identifying Extensions to SQL92 (FIPS Flagging) 7- viii
  • Grouping Operations into Transactions 7-
    • Improving Transaction Performance 7-
    • Committing Transactions 7-
    • Rolling Back Transactions 7-
    • Defining Transaction Savepoints 7-
    • Privileges Required for Transaction Management 7-
  • Ensuring Repeatable Reads with Read-Only Transactions 7-
  • Using Cursors within Applications 7-
    • Declaring and Opening Cursors 7-
    • Using a Cursor to Execute Statements Again 7-
    • Closing Cursors 7-
    • Cancelling Cursors 7-
  • Locking Data Explicitly 7-
    • Choosing a Locking Strategy 7-
    • Letting Oracle Control Table Locking 7-
    • Summary of Nondefault Locking Options 7-
    • Explicitly Acquiring Row Locks 7-
  • About User Locks 7-
    • When to Use User Locks............................................................................................................ 7-
    • Example of a User Lock 7-
    • Viewing and Monitoring Locks 7-
  • Using Serializable Transactions for Concurrency Control 7-
    • How Serializable Transactions Interact 7-
    • Setting the Isolation Level of a Transaction 7-
    • Referential Integrity and Serializable Transactions 7-
    • READ COMMITTED and SERIALIZABLE Isolation 7-
    • Application Tips for Transactions 7-
  • Autonomous Transactions 7-
    • Examples of Autonomous Transactions.................................................................................. 7-
    • Defining Autonomous Transactions........................................................................................ 7-
  • Resuming Execution After a Storage Error Condition 7-
    • What Operations Can Be Resumed After an Error Condition? 7-
    • Limitations on Resuming Operations After an Error Condition 7-
    • Writing an Application to Handle Suspended Storage Allocation 7-
    • Example of Resumable Storage Allocation............................................................................. 7- ix
  • Querying Data at a Point in Time (Flashback Query) 7-
    • Setting Up the Database for Flashback Query 7-
    • Writing an Application that Uses Flashback Query.............................................................. 7-
    • Flashback Query Restrictions 7-
    • Tips for Using Flashback Query............................................................................................... 7-
  • What Is Dynamic SQL? 8- 8 Coding Dynamic SQL Statements
  • Why Use Dynamic SQL? 8-
    • Executing DDL and SCL Statements in PL/SQL..................................................................... 8-
    • Executing Dynamic Queries........................................................................................................ 8-
    • Referencing Database Objects that Do Not Exist at Compilation 8-
    • Optimizing Execution Dynamically 8-
    • Executing Dynamic PL/SQL Blocks.......................................................................................... 8-
    • Performing Dynamic Operations Using Invoker-Rights 8-
  • A Dynamic SQL Scenario Using Native Dynamic SQL 8-
    • Sample DML Operation Using Native Dynamic SQL 8-
    • Sample DDL Operation Using Native Dynamic SQL 8-
    • Sample Single-Row Query Using Native Dynamic SQL 8-
    • Sample Multiple-Row Query Using Native Dynamic SQL.................................................. 8-
  • Choosing Between Native Dynamic SQL and the DBMS_SQL Package 8-
    • Advantages of Native Dynamic SQL....................................................................................... 8-
    • Advantages of the DBMS_SQL Package 8-
    • Examples of DBMS_SQL Package Code and Native Dynamic SQL Code 8-
  • Using Dynamic SQL in Languages Other Than PL/SQL 8-
  • Using PL/SQL Records in SQL INSERT and UPDATE Statements 8-
  • Overview of PL/SQL Program Units 9- 9 Using Procedures and Packages
    • Anonymous Blocks 9-
    • Stored Program Units (Procedures, Functions, and Packages) 9-
  • Hiding PL/SQL Code with the PL/SQL Wrapper 9-
  • Compiling PL/SQL Procedures for Native Execution 9-
  • Remote Dependencies 9-
    • Timestamps.................................................................................................................................. 9- x
    • Signatures 9-
    • Controlling Remote Dependencies 9-
  • Cursor Variables 9-
    • Declaring and Opening Cursor Variables 9-
    • Examples of Cursor Variables................................................................................................... 9-
  • Handling PL/SQL Compile-Time Errors 9-
  • Handling Run-Time PL/SQL Errors 9-
    • Declaring Exceptions and Exception Handling Routines 9-
    • Unhandled Exceptions 9-
    • Handling Errors in Distributed Queries 9-
    • Handling Errors in Remote Procedures 9-
  • Debugging Stored Procedures 9-
  • Calling Stored Procedures 9-
  • Calling Remote Procedures 9-
    • Synonyms for Procedures and Packages 9-
  • Calling Stored Functions from SQL Expressions 9-
    • Using PL/SQL Functions 9-
    • Syntax for SQL Calling a PL/SQL Function 9-
    • Naming Conventions 9-
    • Requirements for Calling PL/SQL Functions from SQL Expressions................................ 9-
    • Controlling Side Effects 9-
    • Overloading Packaged PL/SQL Functions............................................................................. 9-
    • Serially Reusable PL/SQL Packages........................................................................................ 9-
  • Returning Large Amounts of Data from a Function 9-
  • Coding Your Own Aggregate Functions 9-
  • Overview of Multi-Language Programs 10- 10 Calling External Procedures
  • What Is an External Procedure? 10-
  • Overview of The Call Specification for External Procedures 10-
  • Loading External Procedures 10-
    • Loading Java Class Methods..................................................................................................... 10-
    • Loading External C Procedures 10-
  • Publishing External Procedures 10-
    • The AS LANGUAGE Clause for Java Class Methods........................................................... 10- xi
    • The AS LANGUAGE Clause for External C Procedures...................................................... 10-
  • Publishing Java Class Methods 10-
  • Publishing External C Procedures 10-
  • Locations of Call Specifications 10-
  • Passing Parameters to Java Class Methods with Call Specifications 10-
  • Passing Parameters to External C Procedures with Call Specifications 10-
    • Specifying Datatypes................................................................................................................ 10-
    • External Datatype Mappings 10-
    • BY VALUE/REFERENCE for IN and IN OUT Parameter Modes.................................... 10-
    • The PARAMETERS Clause 10-
    • Overriding Default Datatype Mapping................................................................................. 10-
    • Specifying Properties 10-
  • Executing External Procedures with the CALL Statement 10-
    • Preliminaries 10-
    • CALL Statement Syntax........................................................................................................... 10-
    • Calling Java Class Methods..................................................................................................... 10-
    • How the Database Server Calls External C Procedures...................................................... 10-
  • Handling Errors and Exceptions in Multi-Language Programs 10-
    • Generic Compile Time Call specification Errors.................................................................. 10-
    • Java Exception Handling 10-
    • C Exception Handling.............................................................................................................. 10-
  • Using Service Procedures with External C Procedures 10-
  • Doing Callbacks with External C Procedures 10-
    • Object Support for OCI Callbacks 10-
    • Restrictions on Callbacks......................................................................................................... 10-
    • Debugging External Procedures............................................................................................. 10-
    • Demo Program.......................................................................................................................... 10-
    • Guidelines for External C Procedures 10-
    • Restrictions on External C Procedures 10-
  • Introduction to Database Security Policies 11- 11 Database Security Overview for Application Developers
    • Security Threats and Countermeasures 11-
    • What Information Security Policies Can Cover 11-
      • Features to Use in Establishing Security Policies................................................................... 11- xii
      • Recommended Application Design Practices to Reduce Risk 11-
    • Introduction to Application Security Policies 11-
      • Considerations for Using Application-Based Security........................................................ 11-
      • Security-Related Tasks of Application Administrators 11-
      • Managing Application Privileges........................................................................................... 11-
      • Creating Secure Application Roles......................................................................................... 11-
      • Associating Privileges with the User’s Database Role 11-
      • Protecting Database Objects Through Use of Schemas....................................................... 11-
      • Managing Object Privileges 11-
      • Creating a Role and Protecting Its Use 11-
      • Enabling and Disabling Roles 11-
      • Granting and Revoking System Privileges and Roles......................................................... 11-
      • Granting and Revoking Schema Object Privileges and Roles............................................ 11-
      • Granting to, and Revoking from, the User Group PUBLIC 11-
  • Introduction to Application Context 12- 12 Implementing Application Security Policies - Features of Application Context............................................................................................... 12- - Ways to Use Application Context with Fine-Grained Access Control 12- - User Models and Virtual Private Database........................................................................... 12- - Creating a Virtual Private Database Policy with Oracle Policy Manager 12- - How to Use Application Context 12- - Examples: Application Context Within a Fine-Grained Access Control Function 12- - Introduction to Application Context Accessed Globally 12- - Initializing Application Context Externally.......................................................................... 12- - Initializing Application Context Globally............................................................................. 12-
  • Introduction to Fine-Grained Access Control 12- - Features of Fine-Grained Access Control.............................................................................. 12- - How Fine-Grained Access Control Works............................................................................ 12- - How to Establish Policy Groups............................................................................................. 12- - How to Add a Policy to a Table, View, or Synonym........................................................... 12- - How to Check for Policies Applied to Statement................................................................. 12- - EXEMPT ACCESS POLICY System Privilege 12- - Automatic Reparse 12-
  • Fine-Grained Auditing 12- xiii
    • Introduction to Standard Auditing and Fine-Grained auditing........................................ 12-
    • Standard Oracle9i Auditing Techniques............................................................................... 12-
    • Fine-Grained Auditing Techniques 12-
  • Enforcing Application Security 12-
    • Use of Ad Hoc Tools a Potential Security Problem 12-
    • Restricting Database Roles from SQL*Plus Users 12-
  • Advantages of Proxy Authentication 13- 13 Proxy Authentication
  • Security Challenges of Three-tier Computing 13-
    • Who Is the Real User? 13-
    • Does the Middle Tier Have Too Much Privilege? 13-
    • How to Audit? Whom to Audit?.............................................................................................. 13-
    • Can the User Be Re-Authenticated to the Database? 13-
  • Oracle9 i Proxy Authentication Solutions 13-
    • Passing Through the Identity of the Real User 13-
    • Limiting the Privilege of the Middle Tier 13-
    • Re-authenticating the Real User 13-
    • Auditing Actions Taken on Behalf of the Real User............................................................ 13-
    • Support for Application User Models 13-
  • Securing Sensitive Information 14- 14 Data Encryption Using DBMS_OBFUSCATION_TOOLKIT
  • Principles of Data Encryption 14-
    • Principle 1: Encryption Does Not Solve Access Control Problems..................................... 14-
    • Principle 2: Encryption Does Not Protect Against a Malicious DBA 14-
    • Principle 3: Encrypting Everything Does Not Make Data Secure 14-
  • Solutions For Stored Data Encryption in Oracle9i 14-
    • Oracle9 i Data Encryption Capabilities 14-
  • Data Encryption Challenges 14-
    • Encrypting Indexed Data 14-
    • Key Management........................................................................................................................ 14-
    • Key Transmission 14-
    • Key Storage.................................................................................................................................. 14-
    • Changing Encryption Keys 14- xiv
    • Binary Large Objects (BLOBS) 14-
  • Example of Data Encryption PL/SQL Program 14-
  • Designing Triggers 15- 15 Using Triggers
  • Creating Triggers 15-
    • Types of Triggers 15-
    • Naming Triggers 15-
    • When Is the Trigger Fired? 15-
    • Controlling When a Trigger Is Fired (BEFORE and AFTER Options) 15-
    • Modifying Complex Views (INSTEAD OF Triggers)............................................................ 15-
    • Firing Triggers One or Many Times (FOR EACH ROW Option) 15-
    • Firing Triggers Based on Conditions (WHEN Clause) 15-
  • Coding the Trigger Body 15-
    • Accessing Column Values in Row Triggers 15-
    • Triggers and Handling Remote Exceptions 15-
    • Restrictions on Creating Triggers 15-
    • Who Is the Trigger User? 15-
    • Privileges Needed to Work with Triggers 15-
  • Compiling Triggers 15-
    • Dependencies for Triggers 15-
    • Recompiling Triggers 15-
    • Migration Issues for Triggers 15-
  • Modifying Triggers 15-
    • Debugging Triggers 15-
  • Enabling and Disabling Triggers 15-
    • Enabling Triggers 15-
    • Disabling Triggers 15-
  • Viewing Information About Triggers 15-
  • Examples of Trigger Applications 15-
  • Responding to System Events through Triggers 15-
  • Event Attribute Functions 16- 16 Working With System Events
  • List of Database Events 16- xv
    • System Events 16-
    • Client Events 16-
  • Introduction to Publish-Subscribe 17- 17 Using the Publish-Subscribe Model for Applications
  • Publish-Subscribe Architecture 17-
  • Publish-Subscribe Concepts 17-
  • Examples of a Publish-Subscribe Mechanism 17-
  • What Is a PL/SQL Web Application? 18- 18 Developing Web Applications with PL/SQL
  • How Do I Generate HTML Output from PL/SQL? 18-
  • How Do I Pass Parameters to a PL/SQL Web Application? 18-
  • Performing Network Operations within PL/SQL Stored Procedures 18-
    • Sending E-Mail from PL/SQL 18-
    • Getting a Host Name or Address from PL/SQL 18-
    • Working with TCP/IP Connections from PL/SQL............................................................. 18-
    • Retrieving the Contents of an HTTP URL from PL/SQL................................................... 18-
    • Working with Tables, Image Maps, Cookies, CGI Variables, and More from PL/SQL 18-
  • Embedding PL/SQL Code in Web Pages (PL/SQL Server Pages) 18-
    • Choosing a Software Configuration 18-
    • Writing the Code and Content for the PL/SQL Server Page 18-
    • Syntax of PL/SQL Server Page Elements 18-
    • Loading the PL/SQL Server Page into the Database as a Stored Procedure................... 18-
    • Running a PL/SQL Server Page Through a URL 18-
    • Examples of PL/SQL Server Pages........................................................................................ 18-
    • Debugging PL/SQL Server Page Problems.......................................................................... 18-
    • Putting an Application using PL/SQL Server Pages into Production 18-
  • Enabling PL/SQL Web Applications for XML 18-
  • Frequently Asked Questions About Porting 19- 19 Porting Non-Oracle Applications to Oracle9i
    • How Do I Perform Natural Joins and Inner Joins?................................................................ 19-
    • Database System? 19- Is There an Automated Way to Migrate a Schema and Associated Data from Another
    • How Do I Perform Large Numbers of Comparisons within a Query?............................... 19-
    • Does Oracle Support Scalar Subqueries? 19-
  • X/Open Distributed Transaction Processing (DTP) 20- 20 Working with Transaction Monitors with Oracle XA
    • Required Public Information..................................................................................................... 20-
  • XA and the Two-Phase Commit Protocol 20-
  • Transaction Processing Monitors (TPMs) 20-
  • Support for Dynamic and Static Registration 20-
  • Oracle XA Library Interface Subroutines 20-
    • XA Library Subroutines 20-
    • Extensions to the XA Interface.................................................................................................. 20-
  • Developing and Installing Applications That Use the XA Libraries 20-
    • Responsibilities of the DBA or System Administrator.......................................................... 20-
    • Responsibilities of the Application Developer 20-
    • Defining the xa_open String.................................................................................................... 20-
    • Interfacing XA with Precompilers and OCIs 20-
    • Transaction Control using XA 20-
    • Migrating Precompiler or OCI Applications to TPM Applications 20-
    • XA Library Thread Safety........................................................................................................ 20-
  • Troubleshooting XA Applications 20-
    • XA Trace Files............................................................................................................................ 20-
    • Trace File Examples.................................................................................................................. 20-
    • In-Doubt or Pending Transactions 20-
    • Oracle Server SYS Account Tables 20-
  • XA Issues and Restrictions 20-
  • Changes to Oracle XA Support 20-
    • XA Changes from Release 8.0 to Release 8.1......................................................................... 20-
    • XA Changes from Release 7.3 to Release 8.0......................................................................... 20-

xvii

Send Us Your Comments

Oracle9i Application Developer’s Guide - Fundamentals, Release 2 (9.2)

Part No. A96590-

Oracle Corporation welcomes your comments and suggestions on the quality and usefulness of this document. Your input is an important part of the information used for revision.

n Did you find any errors? n Is the information clearly presented? n Do you need more information? If so, where? n Are the examples correct? Do you need more examples? n What features did you like most?

If you find any errors or have any other suggestions for improvement, please indicate the document title and part number, and the chapter, section, and page number (if available). You can send com- ments to us in the following ways:

n Electronic mail: [email protected] n FAX: (650) 506-7227 Attn: Server Technologies Documentation Manager n Postal service: Oracle Corporation Server Technologies Documentation 500 Oracle Parkway, Mailstop 4op Redwood Shores, CA 94065 USA

If you would like a reply, please give your name, address, telephone number, and (optionally) elec- tronic mail address.

If you have problems with the software, please contact your local Oracle Support Services.

xix

Preface

The Oracle9i Application Developer’s Guide - Fundamentals describes features of application development for the Oracle9 i Database. Information in this guide applies to features that work the same on all platforms, and does not include system-specific information. This preface contains these topics: n Audience n Organization n Related Documentation n Conventions n Documentation Accessibility

Audience

The Oracle9i Application Developer’s Guide - Fundamentals is intended for programmers developing new applications or converting existing applications to run in the Oracle environment. This book will also be valuable to systems analysts, project managers, and others interested in the development of database applications. This guide assumes that you have a working knowledge of application programming, and that you are familiar with the use of Structured Query Language (SQL) to access information in relational database systems. Certain sections of this guide also assume a knowledge of the basic concepts of object-oriented programming.

xx

Duties of an Application Developer

Activities that are typically required of an application developer include: n Programming in SQL. Your primary source of information for this is the Oracle9i SQL Reference. You can find information about advanced query techniques, to perform analysis and retrieve data in a single query, in the Oracle9i Data Warehousing Guide. n Interfacing to SQL through other languages, such as PL/SQL, Java, or C/C++. Sources of information about these other languages include: n PL/SQL User’s Guide and Reference n Oracle9i Supplied PL/SQL Packages and Types Reference n Oracle9i Java Developer’s Guide n Pro*C/C++ Precompiler Programmer’s Guide n Oracle Call Interface Programmer’s Guide and Oracle C++ Call Interface Programmer’s Guide n Oracle Objects for OLE C++ Class Library n Oracle COM Automation Feature Developer’s Guide n Setting up interactions and mappings between multiple language environments, as described in "Calling External Procedures" on page 10-1. n Working with schema objects. You might designing part or all of a schema, and write code to fit into an existing schema. You can get an overview in "Managing Schema Objects" on page 2-1, and full details in Oracle9i Database Administrator’s Guide. n Interfacing with the database administrator to make sure that the schema can be backed up and restored, for example after a system failure or when moving between a staging machine and a production machine. n Building application logic into the database itself, in the form of stored procedures, constraints, and triggers, to allow multiple applications to reuse application logic and code that checks and cleans up errors. For information on these database features, see "Using Procedures and Packages" on page 9-1, "Maintaining Data Integrity Through Constraints" on page 4-1, and "Using Triggers" on page 15-1. n Some degree of performance tuning. The database administrator might help here. You can find more information in PL/SQL User’s Guide and Reference ,