Advance PLSQL Programming

By

Course Description: This course, designed for Plsql programmer, Oracle database administrators and software development personnel who need to gain practical experience of the advanced features of PL/SQL such as program design, packages, cursors, large objects and collections. This course provides practical experience in developing and writing triggers, functions, procedures and packages. It also introduces some of the Oracle-supplied packages. It will benefit Oracle database administrators and software development personnel who need to write new or maintain existing, PL/SQL triggers, program units and packages.

Course Duration: 120  Hrs
Mode Of Course : Online
Course Code: To Be Assigned
Course Status : On Hold

It also introduces some of the Oracle-supplied packages. This course is suitable for users of Oracle Database 10g and Oracle Database 11g.

By the end of this course delegates will be able to effectively tune PL/SQL code; create subtypes; create and use collections; execute external C programs and Java programs from PL/SQL; use fine-grained access control; use LOB data types and the DBMS_LOB package; use SecureFile LOBs; effectively design cursors; improve memory usage with PL/SQL result caching and SQL result sets and apply coding standards to avoid SQL injection attacks.

The delegates will practise:

    * Implementing various types of trigger
    * Creating, managing and invoking stored procedures
    * Creating, managing and executing stored functions
    * Developing and using packages
    * Using package features and constructs effectively
    * Wrapping packages
    * Using Cursor Variables
    * Using records and tables or associative arrays in packages
    * Implementing Bulk Binding and Bulk Collecting techniques
    * Managing program unit dependencies
    * Implementing Native Compilation and Compile-time Warnings
    * Implementing Native Dynamic SQL
    * Using a variety of Oracle-supplied packages

Prerequisites
Practical experience of Oracle SQL and the PL/SQL programming language is required. This can be gained by attendance on the pre-requisite courses. Familiarity with the Oracle Database is also required.

COURSE MODULES

Introduction

    * Course objectives
    * The Oracle complete solution
    * Course agenda
    * Tables and data used for this course

COURSE MODULES

PL/SQL Programming Concepts Review

    * Identify PL/SQL block structure
    * Create procedures
    * Create functions
    * Create packages
    * Use cursors
    * Handle exceptions
    * Understand dependencies
    * Identify the Oracle supplied packages

Triggers

    * DML Triggers
    * The CREATE TRIGGER Statement
    * Writing Trigger Code
    * INSTEAD OF Triggers
    * Calling Procedures from Triggers
    * Coding Restrictions
    * System Event and DDL Triggers
    * Attribute Functions
    * Compound Triggers
    * Create Trigger Follows Clause
    * Managing Triggers
    * Privileges Required for Triggers
    * Dictionary Information Concerning Triggers

Procedures

    * What is a Procedure?
    * The CREATE PROCEDURE Statement
    * Procedure Parameters
    * Invoking Procedures
    * Local Subprograms
    * Named Association Parameter Passing
    * Definer's Rights and Invoker's Rights
    * Autonomous Transactions
    * Managing Procedures
    * Privileges Required for Procedures
    * Dictionary Information Concerning Procedures
    * The Call Statement

Functions

    * What is a Function?
    * The CREATE FUNCTION Statement
    * Executing Functions
    * Invoker's Rights
    * Autonomous Transactions
    * DBMS_OUTPUT
    * Using Functions in SQL Statements
    * Deterministic and Parallel-Enabled Functions
    * Function Result Cache
    * Managing Functions
    * Privileges Required for Functions
    * Dictionary Information Concerning Functions

Packages

    * What is a Package?
    * Public and Private Components
    * Creating a Package
    * Example Package
    * Persistent States
    * One-time-only Procedures
    * Overloading
    * Purity Level Checking
    * Forward Declarations
    * Wrapping Packages
    * Managing Packages
    * Privileges Required for Packages
    * Dictionary Information Concerning Packages

Using PL/SQL Records and Tables in Packages

    * Overview of PL/SQL Records, Index-by Tables and Associative Arrays
    * Using PL/SQL Records and Tables in Packages
    * Table Built-in Functions
    * The NOCOPY Hint
    * Bulk Collection
    * Bulk Binding DML Statements

Cursor Variables (Ref Cursors)

    * Declare Cursor Variables
    * Use Cursor Variables
    * Open and Close Cursor Variables
    * Fetch Rows
    * Cursor Variable Attributes
    * Pass Cursor Variables as Parameters
    * Refcursor Datatype

Managing Dependencies

    * Dependent and Referenced Objects
    * Invalidation and Recompilation
    * Local and Remote Dependencies
    * Recompilation Considerations

Native Compilation and Compile-Time Warnings

    * Introduction
    * Native Compilation
    * Automatic Recompilation
    * Automatic Program Sublining
    * WHEN OTHERS ...THEN NULL
    * Data Dictionary Information
    * Compiler Warning Categories
    * Using the DBMS_WARNING Package

Oracle-Supplied Packages

    * Overview of Oracle-Supplied Packages
    * Using the DBMS_SQL Package
    * Using Native Dynamic SQL
    * The DBMS_METADATA Package
    * The UTL_MAIL Package
    * The DBMS_APPLICATION_INFO Package
    * The DBMS_UTILITY Package
    * Scheduling Jobs using the DBMS_SCHEDULER Package

 

Design Considerations

    * List the different guidelines for cursor design
    * Describe cursor variables
    * Pass cursor variables as program parameters
    * Compare cursor variables to static cursors
    * Describe the predefined data types
    * Create subtypes based on existing types for an application

Collections

    * Describe and use nested tables
    * Describe and use varrays
    * Describe and use associative arrays
    * Describe and use string indexed collections
    * Describe and use nested collections
    * Write PL/SQL programs that use collections
    * Describe the common collection exceptions and how to code for them
    * Compare associative arrays to collections

Advanced Interface Methods

    * Execute external C routines from PL/SQL
    * Understand the benefits of external routines
    * Publish the external C routine in the PL/SQL code
    * Execute a PL/SQL routine that calls the external C routine
    * Execute Java routines from PL/SQL
    * Publish the Java class method by creating the PL/SQL subprogram unit specification that references the Java class method
    * Execute the PL/SQL subprogram that invokes the Java class method

PL/SQL Server Pages

    * Define embedding PL/SQL code in Web pages(PL/SQL Server Pages)
    * Describe the format of a PL/SQL Server Page
    * Write the code and content for the PL/SQL Server Page
    * Load the PL/SQL Server Page into the database as a stored procedure
    * Run a PL/SQL Server Page via a URL
    * Debug PL/SQL Server Page problems

Fine Grained Access Control

    * Understand how fine-grained access control works overall
    * Describe the features of fine-grained access control
    * Describe an application context
    * Set up a logon trigger
    * View the results
    * Query the dictionary views holding information on fine-grained access

Performance and Tuning

    * Tune PL/SQL code
    * Write smaller executable sections of code
    * Compare SQL to PL/SQL on performance
    * Understand how bulk binds can improve performance
    * Handle exceptions with the FORALL syntax
    * Identify data type and constraint issues
    * Recognize network issues

Analyzing PL/SQL Code

    * Use the supplied packages and dictionary views to find coding information
    * dbms_describe supplied package
    * Use supplied packages to find error information
    * Trace PL/SQL programs using the dbms_trace supplied packageq
    * Read and interpret the trace information
    * Profile PL/SQL programs using the dbms_profiler supplied package
    * Read and interpret the profiler information