Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword or section
Like this

Table Of Contents

What is a Package?
When to Build a Package
Package Initialization
Package Initialization Structure
Configure Session with Init. Section
Populate Collections
Program Overloading
Overloading in PL/SQL Built-ins
How Overloading Works
Examples of Invalid Overloadings
Overload Wherever Possible
A "Classic" Overloaded Package
Advantage of Extended Overloading
Fitting the Program to the User
Creating a File for a Quick Touch
Procedure and Function Overloaded
"By-Type" Overloading
Options for Specifying Column Type
Defining Dynamic SQL Columns
Generating Functions by Value
The Frustrations of Overloading
Quiz!Nuances of Overloading
Using Named Notation
When to Use Collections
Index-By Tables
Index_by Tables
Defining Collections
Obtaining Collection Information
Initializing Collections
Collections of Composites
Sparse is Nice
Transferring DB Table to Collection
Collection Gotchas
Handling Collection Gotchas
Collection Methods
The DELETE Method
Using the TABLE and CAST Operators
Using the MULTISET Operator
Referencing IB Tables inside SQL
Examples of Collections in Action
Bi-Directional Cursor Emulation
An Example: Ranking Salespeople
Trigger Logic Required
The Ranking Package
The Ranking Package, Continued
Which Collection Type Should I Use?
Opening with the Cursor Variable
Opening with Strong Cursor Types
Opening with Weak Cursor Types
Fetching from the Cursor Variable
When to Use Cursor Variables
Cursor Variables
Dynamic SQL and PL/SQL Execution
Four Methods of Dynamic SQL
Native Dynamic SQL
COUNT(*) For Any Table
Other Execute Immediate Examples
Using Objects and Collections in NDS
Multiple Row Queries and NDS
Some Fine Print for NDS
Dynamic SQL using DBMS_SQL
Learning Through Examples
DDL with Dynamic SQL
Updates with Dynamic SQL
Updates with Bind Variables
Processing Flow for a Dynamic Query
Queries with Dynamic SQL
Dynamic SELECT * FROM AnyTable
Dynamic Formula Execution
More on Dynamic PL/SQL
Indirect Referencing with Dyn PL/SQL
DBMS_SQL Status Built-ins
Working with LONG Values
New DBMS_SQL Features
New Features in DBMS_SQL
Describing Cursor Columns
Basic Steps to Describe Columns
"Array Processing" in DBMS_SQL
Recommendations for Dynamic SQL
NDS or DBMS_SQL: Which is Best?
Who Needs Messaging? Everyone!
Applications Relying on Messaging
Key Features of Oracle AQ
AQ architectural overview
Oracle AQ Highlights
AQ Components
Creating Queue Tables and Queues
The "operational package": DBMS_AQ
Simple Enqueue Example
More Interesting Enqueue Example
Dequeue Example
Prioritized Payloads
Defining Message Subscribers
Oracle AQ -Summary
LOB Terms
Types of Large Objects
PL/SQL built-ins for LOBs
Deceptively simple example
The ³LOB locator´
Preparing to use BFILEs
Using BFILE datatype in DDL
The built-in BFILENAME function
Loading File into Database BLOB
New DBMS_LOB APIs in 8i
Large Object -Summary
Overview of Java interoperability
Question 1: What is Java?
Question 2: Will Java Replace PL/SQL?
Some Important Things to Remember
Building a Java Class
Compiling Classes
Running a Class
Using a Class
Compare Performance of Methods
Types of Classes
And Now for Some Scary Buzzwords!
Language Basics
Writing Loops in Java
Passing Parameters
Exception Handling in Java
Differences Between Java & PL/SQL
Java's Not So Tough!
Java Stored Procedures (JSPs)
JSPs: Some sample uses
Creating JSP to call from PL/SQL
Create Java class(es)
Upload using ³loadjava´ utility
Call the wrapped method
Publishing --more concepts
Publish in PL/SQL Package Spec
Publish as module in package body
Publish as object type method
New DDL Statements and Roles
Passing Oracle8 objects
JPublisher utility
Example: Improving File I/O
Encapsulate Java Classes
Build a Package over Java Method
Mapping the Boolean Datatype
Translate Boolean to Number
Wrapper for Pseudo-Boolean function
Passing Objects to Java with STRUCT
Wrapping a STRUCT-based Method
Viewing Output from Java Methods
Error Handling with Java-PL/SQL
Trapping and Identifying Errors
Process & data flow
External procedures: Sample uses
Determine free disk space on NT (1/4)
Package spec (2/4)
Package body in Oracle 8.0 (3/4)
3. Map the parameters
Autonomous Transactions
Logging with ATs
Tips and Gotchas with ATs
The Invoker Rights Model
About Definer Rights
Problems with Definer Rights
Oracle8iInvoker Rights Syntax
"Reflection" Capability of Invoker Rights
Tips and Gotchas for Invoker Rights
When to Invoke Invoker Rights
Combining Invoker & Definer Rights
Row Level Security
Row-Level Security with DBMS_RLS
Components Needed for RLS
A National Health Care System
Set the Context
Define the Predicate
Create the Security Policy
Create Logon Trigger, Setting Context
Queries Transparently Filtered
Built-in Packages: UTL_FILE
UTL_FILE: Server-side I/O
UTL_FILE Module Outline
Authorizing Directory Access
Test UTL_FILE Access
Opening a File
Reading from a File
Writing to a File
Closing a File
Error Handling in UTL_FILE
Recommended Exception Section
Built-in Packages: DBMS_JOB
Overview of DBMS_JOB
DBMS_JOB Module Outline
Submitting a Job
Submit Job Example
DBMS_JOB.ISubmit Job Example
Specifying Job Times & Frequencies
Other Job Queue Operations
Job Queue Views
Setting up the Job Facility
Error Handling with DBMS_JOB
Stopping the Job When It Fails
"Good to Knows" for DBMS_JOB
Built-in Packages: DBMS_PIPE
DBMS_PIPE Overview
Architecture of DBMS_PIPE
Processing Flow of DBMS_PIPE
DBMS_PIPE Module Outline
Creating Public and Private Pipes
Sending a Message
Receiving and Unpack a Message
A Pipe-based Listener Program
Unpacking the Message
Parallelizing YourCode with Pipes
Sequential vs. Parallel Execution
Parallelizing PL/SQL Execution
Code to Kick Off and Calculate
Waiting for Confirmation
Other DBMS_PIPE Examples
Built-in Packages: DBMS_UTILITY
DBMS_UTILITY Module Outline
DBMS_UTILITY Module Outline, cont
Sub-Second Timings with GET_TIME
Building a Layer Over GET_TIME
Accessing the Execution Call Stack
Accessing Call Stack Contents
Resolving Names of Stored Code
0 of .
Results for:
No results containing your search query
P. 1
Advanced Techniques

Advanced Techniques

|Views: 43|Likes:
Published by Sriharsha Majjiga

More info:

Published by: Sriharsha Majjiga on Jan 21, 2011
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less





You're Reading a Free Preview
Pages 6 to 45 are not shown in this preview.
You're Reading a Free Preview
Pages 51 to 61 are not shown in this preview.
You're Reading a Free Preview
Pages 71 to 191 are not shown in this preview.
You're Reading a Free Preview
Pages 197 to 269 are not shown in this preview.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->