Oracle PL/SQL Stored Program Units

Course Code: OSPU

Duration: 3 days

 
 
 
 

Oracle PL/SQL Stored Program Units Course Overview

The Oracle PL/SQL Stored Program Units course provides practical experience in developing and writing triggers, functions, procedures and packages. It also introduces some of the Oracle-supplied packages.

Similarly, the course is targeted to closely follow the official Oracle Database curriculum for certification.

Exercises and examples are used throughout the course to give practical hands-on experience with the techniques covered.

Versions supported 12cR2, 18c and 19c.

Course Objectives

To provide the skills needed to develop, write and maintain triggers, stored program units and packages.

Who will the Course Benefit?

Oracle database administrators and software development personnel who need to write new or maintain existing, PL/SQL triggers, program units and packages.

Practical experience of Oracle SQL and of using SQL*Plus or SQL Developer and a good working knowledge of the fundamentals of the Oracle PL/SQL programming language are required.

Course Information

The 3 Day Stored Program Units course can be combined with the 2 Day Oracle PL/SQL course, this is equivalent to attending the 5 Day Oracle Program with PL/SQL course.

Skills Gained

The delegate will learn and acquire skills as follows:

  • 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

Oracle PL/SQL Stored Program Units Training Course

Course Introduction

  • Administration and Course Materials
  • Course Structure and Agenda
  • Delegate and Trainer Introductions

Session 1: 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

Session 2: 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

Session 3: 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

Oracle PL/SQL Stored Program Units Training Course

Session 4: 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

Session 5: 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

Session 6: 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

Session 7: MANAGING DEPENDENCIES

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

Oracle PL/SQL Stored Program Units Training Course

Session 8: 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

Session 9: 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

Session 10: PL/SQL DESIGN CONSIDERATIONS

  • Invoker versus Definer™ Rights
  • Grant Roles to PL/SQL Packages and Programs
  • Programming Standards for Variables, Parameters and Constants
  • Standardise Constants with a Package
  • Standardise Exceptions with a Package
  • Write PL/SQL Code using Local Subprograms
  • Use NOCOPY Compiler Hint
  • Optimise Code with the PARALLEL ENABLE hint
  • Use the AUTONOMOUS TRANSACTION Pragma
Notes:
  • Course technical content is subject to change without notice.
  • Course content is structured as sessions, this does not strictly map to course timings. Concepts, content and practicals often span sessions.

Examinations

This Oracle PL/SQL Stored Program Units course together with the Oracle PL/SQL course is an excellent choice for delegates preparing to take the following exam:

  • Oracle Database: Program with PL/SQL 1Z0-149

Attending these courses and studying the associated reference materials can form part of the preparation to achieve certification. Experience, practice, self-study and aptitude are also key requirements for exam success.

Before taking any exam, ensure you have the recommended experience. The Oracle website lists all exam requirements and these are updated regularly.

Exams are not included as part of the course.

Requirements

Practical experience of Oracle SQL*Plus or SQL Developer and a good working knowledge of the fundamentals of the Oracle PL/SQL programming language is required. This can be gained by attendance on the pre-requisite courses.

Pre-Requisite Courses

Course Reviews

Excellent instruction and a very enjoyable course. John clearly and concisely answered my questions and explained the areas which I found difficult in an easy to understand manner. Would highly recommend!

Vincenzo - Trainee Software Developer - Utilities - April 2023


John is a really helpful and kind instructor, any question I had he would explain it fully and provide examples to make it easier to understand. He would be the reason I recommend this course to others.

Grace - Trainee Analyst/Programmer - Finance


The content was really well explained and the practical examples helped explain the content in detail. Watching the code being written and amended was really beneficial. All questions were answered fully to the point where code was adapted to show both right and wrong techniques. The course has really helped my understanding of packages and their uses and content.

Geoff - Applications Development Engineer - Outsourcing


John is a knowledgeable and fantastic character! Our 3-day course was on 1-1 basis as I was the only one enrolled which facilitated a training session a delegate can get the most out of. We had each other's attention fully and covered all aspects of training. Virtual training is as much fun and effective as in-person one! Thank you so much John!

Kasia - Business Systems Engineer - Manufacturing


A very good course for anyone looking to learn more about standard oracle features, utilities and performance.

Ambrose - Postal/Distribution


Technical course content was excellent and just what I required regards procedures, functions and packages, so the exercises were very useful and learning the syntax and formats and commands. Plenty of time was allocated for practical exercises and writing code which I would encourage on future courses. The theory was much needed also and improved my understanding of PL/SQL I have already seen in daily tasks. The trainer was very knowledgeable and took time to explain sections as required and answers to any questions. The folder will be very beneficial in practicing back at work to consolidate these Oracle skills.

Andrew - Application Support Manager - Postal/Distribution


Public Scheduled Events

Classroom & Live Virtual Instructor-Led Training

Duration: 3 days

Price: £1,495.00 exc. VAT 


Start Date Options Spaces  
22 May 2024
StayAhead Virtual Courses available 
Spaces Book Now 
24 Jul 2024
StayAhead Virtual Courses available 
Spaces Book Now 
18 Sep 2024
StayAhead Virtual Courses available 
Spaces Book Now 
13 Nov 2024
StayAhead Virtual Courses available 
Spaces Book Now 
 

Live Virtual Classroom

 
Join live instructor-led classroom training from the comfort of your home or office.
All the convenience and benefits of the classroom experience without the hassle and costs of travel and accommodation.
 
 



Our Customers Include

 
EDF
Amazon
American Express
Aviva
QA
BAE
University of Cambridge
Barnardo's
Scottish Government
Bauer
Bloomberg
BP
HSBC
DVLA
GlaxoSmithKline
Government Campus
Capita
Tui
NHS
Ordnance Survey
Ministry of Defence
Zurich Insurance Group
trainline
Vodafone
 
 



Our Course Curriculum

 
 
 
+44 (0)20 7600 6116
Enquiries@StayAhead.com
Copyright © 2024 StayAhead Training Ltd
Cookies   /   Privacy Policy