Imagination To Realization

Size: px
Start display at page:

Download "Imagination To Realization"

Transcription

1 Imagination To Realization Trigger Writing for Fun and Profit Presented by: Larry Holder Database Administrator The University of Tennessee at Martin April 4, :30 11:30 am April 2-5 Orlando, Florida

2 Session Rules of Etiquette Please set your cell phone or pager on stun. If you must leave the session early, please do so as discreetly as possible, and don t let the door hit you on the way out. Please avoid side conversation during the session, unless you are discussing what a fantastic job I m doing up here... Thanks a Gigabyte! 2

3 Introduction This session provides an introduction to writing database triggers, along with several real-world examples that can enhance your support of Banner. 3

4 Imagination To Realization What s a Trigger? April 2-5 Orlando, Florida

5 What s a Trigger? We ain t talkin about Roy s noble steed... Used by permission of the Roy Rogers-Dale Evans Museum, Branson, MO. 5

6 Ok, so... what s a trigger? A PL/SQL object, akin to a Procedure. Most often, a cool, calm & calculated reaction to an event, such as insert, update, delete, or even select, on a table. Sometimes, a reaction to a database event, such as a user logging onto the database. 6

7 What can I do with it? Modify a field before it is inserted or updated. Insert, update, or delete data in other tables. Perform additional error-checking, and prevent an unwanted insert, update, or delete from occurring. Notify someone by about an event. 7

8 What schema owns the custom triggers? We chose to let SATURN own our custom triggers associated with SATURN-owned tables; likewise for GENERAL, WTAILOR, etc. Be sure the owner of the trigger is granted rights on any tables it references or modifies that are owned by another schema. 8

9 What naming convention is used? UTM_ST_SARADAP_PRE_IU_ROW A pre-insert / update trigger, at the row level, on the table SARADAP. UTM is our prefix, and ST is standard for Student Trigger. Remember 30-character object name max within Oracle. Add numeric suffix if a tie-breaker is needed (multiple triggers on same table are allowed). 9

10 Special variables :old.spraddr_street_line1 meaningless for INSERT, will yield NULL :new.spraddr_street_line1 10

11 Special variables INSERTING, UPDATING, DELETING Useful if trigger handles more than one mode, such as both INSERT and UPDATE, and your logic needs to know which occurred. IF INSERTING THEN do this; ELSE do that; END IF; 11

12 Special variables USER - the Oracle userid of who is connected For self-service, keep in mind that the userid is likely something like WWW_USER. SYSDATE - the current date and time DATABASE_NAME Useful to differentiate between production and test: IF substr(database_name,1,4) = 'PROD' 12

13 Examples of Before/After & Row/Statement create or replace trigger trigger_name BEFORE INSERT or UPDATE on table_name for each ROW create or replace trigger trigger_name AFTER DELETE on table_name statement level if no "for each row" Firing order: 1. Before Statement (once only) 2. Before Row (once per each affected row) 3. The actual DML statement 4. After Row (once per each affected row) 5. After Statement (once only) 13

14 Example: Modifying fields "before" create or replace trigger utm_st_sarpers_pre_in_up_row BEFORE INSERT or UPDATE on SARPERS for each ROW BEGIN IF :new.sarpers_last_name IS NOT NULL THEN IF :new.sarpers_last_name = UPPER(:new.sarpers_last_name) OR :new.sarpers_last_name = LOWER(:new.sarpers_last_name) THEN :new.sarpers_prefix := INITCAP(:new.sarpers_prefix); :new.sarpers_first_name := INITCAP(:new.sarpers_first_name); :new.sarpers_middle_name1 := INITCAP(:new.sarpers_middle_name1); :new.sarpers_middle_name2 := INITCAP(:new.sarpers_middle_name2); :new.sarpers_last_name := INITCAP(:new.sarpers_last_name); :new.sarpers_suffix := INITCAP(:new.sarpers_suffix); :new.sarpers_nickname := INITCAP(:new.sarpers_nickname); :new.sarpers_combined_name := INITCAP(:new.sarpers_combined_name); END IF; END IF; END; / :new.sarpers_former_name := INITCAP(:new.sarpers_former_name); 14

15 Example: Writing to an additional table create or replace trigger utm_st_sarctrl_post_ins_row AFTER INSERT on SARCTRL for each ROW DECLARE PRAGMA AUTONOMOUS_TRANSACTION; BEGIN insert into saraatt values (:new.sarctrl_pidm, :new.sarctrl_term_code_entry, :new.sarctrl_appl_no_saradap, 'WAPP', sysdate); COMMIT; EXCEPTION WHEN OTHERS THEN NULL; COMMIT; END; / Note the use, in this example, of autonomous transaction, if you wish or need to commit an action independently of the transaction causing the trigger. Otherwise, a trigger cannot include a commit. 15

16 Example: Additional error checking create or replace trigger utm_st_spriden_pre_insert_row BEFORE INSERT on SPRIDEN for each ROW BEGIN IF :new.spriden_change_ind IS NULL THEN IF (SUBSTR(:new.spriden_id,1,3) = '960' OR SUBSTR(:new.spriden_id,1,1) = '-') OR (SUBSTR(:new.spriden_id,1,1) > '9' AND :new.spriden_entity_ind = 'C') OR (LENGTH(:new.spriden_id) <= 7 AND :new.spriden_entity_ind = 'C') THEN NULL; ELSE RAISE_APPLICATION_ERROR (-20501, 'UTM ERROR *** ADDING THIS ID VALUE IS BLOCKED'); END IF; END IF; END; / 16

17 Example: Sending an notification create or replace trigger utm_st_sortest_post_del_row after DELETE on SORTEST for each ROW w_conn w_crlf w_mailhost w_mesg w_from w_to w_test_ w_stu_id w_stu_name UTL_SMTP.connection; varchar2(2) := CHR(13) CHR(10); varchar2(30) := 'your_ _server'; varchar2(4000); varchar2(30) := 'your_from_address'; varchar2(30) := 'your_recipient_address'; varchar2(30) := 'your_reciepient_for_non_production'; varchar2(9); varchar2(100); BEGIN BEGIN IF SUBSTR(DATABASE_NAME,1,4)!= 'PROD' THEN w_to := w_test_ ; END IF; select spriden_id, spriden_first_name ' ' spriden_last_name into w_stu_id, w_stu_name from spriden where spriden_pidm = :old.sortest_pidm and spriden_change_ind is null; continued... 17

18 Example: Sending an ... (continued) w_mesg := 'Date: ' TO_CHAR(SYSDATE,'DD Mon YY HH24:MI:SS') w_crlf 'From: ' w_from w_crlf 'Subject: ' 'Deletion from SORTEST (SOATEST)' w_crlf 'To: ' w_to w_crlf w_crlf user ' deleted an entry for ' w_stu_name ' (' w_stu_id ') of' ': code = ' :old.sortest_tesc_code ', date = ' to_char(:old.sortest_test_date,'mm-dd-yyyy') ', score = ' :old.sortest_test_score w_crlf w_crlf ' ' w_crlf; w_conn := UTL_SMTP.open_connection(w_mailhost, 25); UTL_SMTP.helo(w_conn, w_mailhost); UTL_SMTP.mail(w_conn, w_from); UTL_SMTP.rcpt(w_conn, w_to); UTL_SMTP.data(w_conn, w_mesg); UTL_SMTP.quit(w_conn); EXCEPTION WHEN OTHERS THEN NULL; END; END; / 18

19 Disabling and enabling a trigger alter trigger [owner.]name DISABLE; alter trigger [owner.]name ENABLE; Automatically enabled when initially created. select * from dba_triggers where trigger_name like 'UTM%'; 19

20 Mutating trigger example create or replace trigger utm_junk1 BEFORE insert or update of spbpers_ssn on SPBPERS for each ROW BEGIN w_pidm w_new_ssn := :new.spbpers_pidm; := :new.spbpers_ssn; DECLARE w_pidm spbpers.spbpers_pidm%type; w_new_ssn spbpers.spbpers_ssn%type; w_flag char(1) := NULL; CURSOR check_for_dup IS select distinct 'Y' from spbpers where spbpers_ssn = w_new_ssn and spbpers_pidm!= w_pidm; IF :new.spbpers_ssn IS NOT NULL THEN OPEN check_for_dup; FETCH check_for_dup INTO w_flag; CLOSE check_for_dup; IF w_flag = 'Y' THEN RAISE_APPLICATION_ERROR(-20501, '*** SSN already in use ***'); END IF; END IF; END utm_junk1; / 20

21 Results (mutation)... ORA-04091: table SATURN.SPBPERS is mutating, trigger/function may not see it ORA-06512: at "SATURN.UTM_JUNK1", line xx ORA-06512: at "SATURN.UTM_JUNK1", line xx ORA-04088: error during execution of trigger 'SATURN.UTM_JUNK1' 21

22 Solution, part 1 of 3 (package) create or replace package utm_st_spbpers_pkg as TYPE t_pidms IS TABLE OF spbpers.spbpers_pidm%type INDEX BY BINARY_INTEGER; TYPE t_new_ssns IS TABLE OF spbpers.spbpers_ssn%type INDEX BY BINARY_INTEGER; pidms new_ssns t_pidms; t_new_ssns; num_entries BINARY_INTEGER := 0; END utm_st_spbpers_pkg; / 22

23 Solution, part 2 of 3 (before / row) create or replace trigger utm_st_spbpers_pre_iu_row BEFORE insert or update of spbpers_ssn on SPBPERS for each ROW BEGIN utm_st_spbpers_pkg.num_entries := utm_st_spbpers_pkg.num_entries + 1; utm_st_spbpers_pkg.pidms (utm_st_spbpers_pkg.num_entries) := :new.spbpers_pidm; utm_st_spbpers_pkg.new_ssns (utm_st_spbpers_pkg.num_entries) := :new.spbpers_ssn; END utm_st_spbpers_pre_iu_row; 23

24 Solution, part 3 of 3 (after / statement) create or replace trigger utm_st_spbpers_post_iu_stmt AFTER insert or update of spbpers_ssn on SPBPERS DECLARE w_num_entries w_pidm w_new_ssn w_flag w_error utm_st_spbpers_pkg.num_entries%type; spbpers.spbpers_pidm%type; spbpers.spbpers_ssn%type; char(1) := NULL; char(1) := 'N'; CURSOR check_for_dup IS select distinct 'Y' from spbpers where spbpers_ssn = w_new_ssn and spbpers_pidm!= w_pidm; continued... 24

25 BEGIN w_num_entries := utm_st_spbpers_pkg.num_entries; FOR z_index IN 1..w_num_entries LOOP w_pidm := utm_st_spbpers_pkg.pidms (z_index); w_new_ssn := utm_st_spbpers_pkg.new_ssns (z_index); IF w_new_ssn IS NOT NULL THEN OPEN check_for_dup; FETCH check_for_dup INTO w_flag; CLOSE check_for_dup; IF w_flag = 'Y' THEN w_error := 'Y'; END IF; END IF; END LOOP; continued... 25

26 IF w_error = 'Y' THEN utm_st_spbpers_pkg.num_entries := 0; RAISE_APPLICATION_ERROR(-20501, '*** SSN ALREADY IN USE ***'); END IF; utm_st_spbpers_pkg.num_entries := 0; END utm_st_spbpers_post_iu_stmt; / 26

27 New Results (no mutation)... ORA-20501: *** SSN ALREADY IN USE *** This is the application error that we intentionally raised ORA-06512: at "SATURN.UTM_SPBPERS_POST_IU_STMT", line xx ORA-04088: error during execution of trigger 'SATURN.UTM_SPBPERS_POST_IU_STMT' This is expected 27

28 Summary Triggers are a great way to extend the functionality of Banner without introducing baseline modifications. Rome wasn t built in a day. Start out simply, and add more at your own pace. 28

29 Questions & Answers Ok, it s your turn... 29

30 Thank You! Larry Holder Please complete the online Evaluation Form 30

31 Without limitation, SunGard, the SunGard logo, Banner, Campus Pipeline, Luminis, PowerCAMPUS, Matrix, and Plus are trademarks or registered trademarks of SunGard Data Systems Inc. or its subsidiaries in the U.S. and other countries. Third-party names and marks referenced herein are trademarks or registered trademarks of their respective owners SunGard. All rights reserved 31

SQL Server Reporting Services

SQL Server Reporting Services SQL Server Reporting Services Presented by: Victoria Katona and Vijay Vasu Arcadia University April 4, 2006 8:30 am 9:30 am April 2-5 Orlando, Florida Session Rules of Etiquette Please turn off your cell

More information

Imagination To Realization

Imagination To Realization Imagination To Realization Introduction to HTML DB (HOT) Presented by: Bih-Shya Gau SunGard Higher Education Monday, April 3, 2006 3:30 5:30 pm April 2-5 Orlando, Florida Session Rules of Etiquette Please

More information

Highlights from DW4.0.0

Highlights from DW4.0.0 CONNECT TO COMMUNITY. At SunGard Summit, come together as a community dedicated to education. Highlights from DW4.0.0 Presented by: Mark C. Wysoski SunGard Higher Education March 23, 2009 Course ID 0137

More information

Banner Student. Introductions. Course Goals. Name Organization Title/function Job responsibilities Banner experience Expectations

Banner Student. Introductions. Course Goals. Name Organization Title/function Job responsibilities Banner experience Expectations Banner Student Population Selection Introductions Name Organization Title/function Job responsibilities Banner experience Expectations 2 Course Goals This course is intended to teach you to identify key

More information

PL/SQL. Exception. When the PL/SQL engine cannot execute the PLSQL block it raise an error. Every Oracle error has an error number

PL/SQL. Exception. When the PL/SQL engine cannot execute the PLSQL block it raise an error. Every Oracle error has an error number PL/SQL Exception When the PL/SQL engine cannot execute the PLSQL block it raise an error. Every Oracle error has an error number Exceptions must be handled by name. PL/SQL predefines some common Oracle

More information

Course 492 Supplementary Materials. Mutating Tables

Course 492 Supplementary Materials. Mutating Tables Course 492 Supplementary Materials Mutating Tables 1 Mutating Table Restriction A mutating table is a table that is currently being modified by an UPDATE, DELETE, or INSERT In the following example, the

More information

Imagination To Realization

Imagination To Realization Imagination To Realization Creating Useful Workflows Presented by: Alexei Tetenov, SunGard Higher Education Managed Services @ Genesee Community College Monday, April 3, 2006 3:30 4:30 pm April 2-5 Orlando,

More information

1Z0-144 Q&As Oracle Database 11g: Program with PL/ SQL

1Z0-144 Q&As Oracle Database 11g: Program with PL/ SQL CertBus.com 1Z0-144 Q&As Oracle Database 11g: Program with PL/ SQL Pass Oracle 1Z0-144 Exam with 100% Guarantee Free Download Real Questions & Answers PDF and VCE file from: 100% Passing Guarantee 100%

More information

1 Proposed PIN P rotection Protection in Banner General 8.0

1 Proposed PIN P rotection Protection in Banner General 8.0 Proposed PIN Protection in Proposed PIN Protection in Banner General 8.0 1 2 Proposed PIN Protection in Banner General 8.0 ~These Enhancements are under These Enhancements are under Development and may

More information

SunGard Higher Education Solutions Converter Tool Training. Introduction. Agenda. <print name> Technical Consultant

SunGard Higher Education Solutions Converter Tool Training. Introduction. Agenda. <print name> Technical Consultant SunGard Higher Education Solutions Converter Tool Training Technical Consultant Introduction The SunGard Higher Education Solutions Converter Tool is an Oracle Forms application that simplifies

More information

Lab # 4. Data Definition Language (DDL)

Lab # 4. Data Definition Language (DDL) Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Lab # 4 Data Definition Language (DDL) Eng. Haneen El-Masry November, 2014 2 Objective To be familiar with

More information

Financial Aid Self-Service Web Snapshot Security Enhancements

Financial Aid Self-Service Web Snapshot Security Enhancements Financial Aid Self-Service Web Snapshot Security Enhancements Todd Emo, Senior Programmer/Analyst - ITS Jeurell Smith, Data Manager - SFS May 24, 2016 Attendee Q & A Administrative areas represented? Currently

More information

SPRIDEN 5 SPRIDEN_FIRST_NAME VARCHAR2(60)... SPRIDEN_MI VARCHAR2(60)... 0,1

SPRIDEN 5 SPRIDEN_FIRST_NAME VARCHAR2(60)... SPRIDEN_MI VARCHAR2(60)... 0,1 SPRIDEN 5 SPRIDEN_PIDM SPRIDEN_ID VARCHAR2(9) SPRIDEN_LAST_NAME VARCHAR2(60) SPRIDEN_FIRST_NAME VARCHAR2(60)... SPRIDEN_MI VARCHAR2(60)... SPRIDEN_CHANGE_IND null SPRIDEN_ENTITY_IND null SPRIDEN_ACTIVITY_

More information

Oracle Database 11g: Program with PL/SQL Release 2

Oracle Database 11g: Program with PL/SQL Release 2 Oracle University Contact Us: +41- (0) 56 483 31 31 Oracle Database 11g: Program with PL/SQL Release 2 Duration: 5 Days What you will learn This course introduces students to PL/SQL and helps them understand

More information

Taming Banner 7 on Oracle 10g

Taming Banner 7 on Oracle 10g SUNGARD SUMMIT 2007 sungardsummit.com 1 Taming Banner 7 on Oracle 10g Presented by: Scott Harden University of Illinois March 20, 2007 Course ID: 58 A Community of Learning Session Rules of Etiquette Please

More information

Oracle Database 11g: SQL and PL/SQL Fundamentals

Oracle Database 11g: SQL and PL/SQL Fundamentals Oracle University Contact Us: +33 (0) 1 57 60 20 81 Oracle Database 11g: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn In this course, students learn the fundamentals of SQL and PL/SQL

More information

Banner Job Submission 1

Banner Job Submission 1 Welcome to SunGard Banner General Job Submission Introductions Name Organization Title/function Job responsibilities Banner experience Expectations 2 Course Goals This course is intended to teach you to

More information

Question: Which statement would you use to invoke a stored procedure in isql*plus?

Question: Which statement would you use to invoke a stored procedure in isql*plus? What are the two types of subprograms? procedure and function Which statement would you use to invoke a stored procedure in isql*plus? EXECUTE Which SQL statement allows a privileged user to assign privileges

More information

HIGHER EDUCATION. What can we help you achieve? Workflow Process Modeling Workflow 4.3 Workbook

HIGHER EDUCATION. What can we help you achieve? Workflow Process Modeling Workflow 4.3 Workbook HIGHER EDUCATION What can we help you achieve? Workflow Process Modeling Workflow 4.3 Workbook January 2007 Confidential Business Information --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

More information

Data Definition Language (DDL)

Data Definition Language (DDL) Islamic University of Gaza Faculty of Engineering Computer Engineering Dept. Database Lab (ECOM 4113) Lab 6 Data Definition Language (DDL) Eng. Mohammed Alokshiya November 11, 2014 Database Keys A key

More information

1Z Oracle Database 11g - Program with PL/SQL Exam Summary Syllabus Questions

1Z Oracle Database 11g - Program with PL/SQL Exam Summary Syllabus Questions 1Z0-144 Oracle Database 11g - Program with PL/SQL Exam Summary Syllabus Questions Table of Contents Introduction to 1Z0-144 Exam on Oracle Database 11g - Program with PL/SQL... 2 Oracle 1Z0-144 Certification

More information

Introduction to Computer Science and Business

Introduction to Computer Science and Business Introduction to Computer Science and Business The Database Programming with PL/SQL course introduces students to the procedural language used to extend SQL in a programatic manner. This course outline

More information

Overview Of Banner 7 Channels

Overview Of Banner 7 Channels Overview Of Banner 7 Channels John Morgan, SunGard SCT, Banner Architect Evaluation Code 310 Rock Eagle 2004, Thu., Oct. 21, 3:00 PM Topics of Discussion Introduction to Channels for Banner Overview of

More information

Autonomous Transactions

Autonomous Transactions Autonomous Transactions Autonomous transactions allow you to create a new transaction within a transaction that may commit or roll back changes, independently of its parent transaction. They allow you

More information

Oracle Database 11g: Program with PL/SQL

Oracle Database 11g: Program with PL/SQL Oracle University Contact: +31 (0)30 669 9244 Oracle Database 11g: Program with PL/SQL Duration: 5 Dagen What you will learn This course introduces students to PL/SQL and helps them understand the benefits

More information

Full file at

Full file at ch2 True/False Indicate whether the statement is true or false. 1. The SQL command to create a database table is an example of DML. 2. A user schema contains all database objects created by a user. 3.

More information

Oracle PLSQL Training Syllabus

Oracle PLSQL Training Syllabus Oracle PLSQL Training Syllabus Introduction Course Objectives Course Agenda Human Resources (HR) Schema Introduction to SQL Developer Introduction to PL/SQL PL/SQL Overview Benefits of PL/SQL Subprograms

More information

UNIT II PL / SQL AND TRIGGERS

UNIT II PL / SQL AND TRIGGERS UNIT II PL / SQL AND 1 TRIGGERS TOPIC TO BE COVERED.. 2.1 Basics of PL / SQL 2.2 Datatypes 2.3 Advantages 2.4 Control Structures : Conditional, Iterative, Sequential 2.5 Exceptions: Predefined Exceptions,User

More information

Overview of PL/SQL. About PL/SQL. PL/SQL Environment. Benefits of PL/SQL. Integration

Overview of PL/SQL. About PL/SQL. PL/SQL Environment. Benefits of PL/SQL. Integration About PL/ Overview of PL/ PL/ is an extension to with design features of programming languages. Data manipulation and query statements of are included within procedural units of code. PL/ Environment Benefits

More information

Trigger is a stored procedure which is called implicitly by oracle engine whenever a insert, update or delete statement is fired.

Trigger is a stored procedure which is called implicitly by oracle engine whenever a insert, update or delete statement is fired. Aim:- TRIGGERS Trigger is a stored procedure which is called implicitly by oracle engine whenever a insert, update or delete statement is fired. Advantages of database triggers: ---> Data is generated

More information

5. Single-row function

5. Single-row function 1. 2. Introduction Oracle 11g Oracle 11g Application Server Oracle database Relational and Object Relational Database Management system Oracle internet platform System Development Life cycle 3. Writing

More information

Oracle Database: SQL and PL/SQL Fundamentals NEW

Oracle Database: SQL and PL/SQL Fundamentals NEW Oracle Database: SQL and PL/SQL Fundamentals NEW Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training delivers the fundamentals of SQL and PL/SQL along with the

More information

Banner Oracle PL/SQL and Database Objects Training Workbook

Banner Oracle PL/SQL and Database Objects Training Workbook Banner Oracle PL/SQL and Database Objects Training Workbook January 2007 Using Oracle for Banner 7 HIGHER EDUCATION What can we help you achieve? Confidential Business Information -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

More information

Banner Student. Introductions. Course Goals. Name Organization Title/function Job responsibilities Banner experience Expectations

Banner Student. Introductions. Course Goals. Name Organization Title/function Job responsibilities Banner experience Expectations Banner Student Tape Load Processing Introductions Name Organization Title/function Job responsibilities Banner experience Expectations 2 Course Goals This course is intended to provide you with the necessary

More information

Banner 8 Security Enhancements Part 1

Banner 8 Security Enhancements Part 1 Banner 8 Security Enhancements Part 1 Presented by: Les von Holstein SunGard Higher Education Tuesday, March 22, 2011 10:00 11:00 Session ID 4582 Focus Group Thank You! George Mason University Georgia

More information

Oracle PL/SQL. DUMmIES. by Michael Rosenblum and Dr. Paul Dorsey FOR

Oracle PL/SQL. DUMmIES. by Michael Rosenblum and Dr. Paul Dorsey FOR Oracle PL/SQL FOR DUMmIES by Michael Rosenblum and Dr. Paul Dorsey Oracle PL/SQL For Dummies Published by Wiley Publishing, Inc. 111 River Street Hoboken, NJ 07030-5774 www.wiley.com Copyright 2006 by

More information

Oracle Database: SQL and PL/SQL Fundamentals Ed 2

Oracle Database: SQL and PL/SQL Fundamentals Ed 2 Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 67863102 Oracle Database: SQL and PL/SQL Fundamentals Ed 2 Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals

More information

Lab # 2. Data Definition Language (DDL) Eng. Alaa O Shama

Lab # 2. Data Definition Language (DDL) Eng. Alaa O Shama The Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Database Lab Lab # 2 Data Definition Language (DDL) Eng. Alaa O Shama October, 2015 Objective To be familiar

More information

Lecture 08. Spring 2018 Borough of Manhattan Community College

Lecture 08. Spring 2018 Borough of Manhattan Community College Lecture 08 Spring 2018 Borough of Manhattan Community College 1 The SQL Programming Language Recent versions of the SQL standard allow SQL to be embedded in high-level programming languages to help develop

More information

Creating and Managing Tables Schedule: Timing Topic

Creating and Managing Tables Schedule: Timing Topic 9 Creating and Managing Tables Schedule: Timing Topic 30 minutes Lecture 20 minutes Practice 50 minutes Total Objectives After completing this lesson, you should be able to do the following: Describe the

More information

Introductions. Course Goal

Introductions. Course Goal Banner Performance Reporting and Analytics Introductions Name Title/function Job responsibilities ODS experience Expectations 2 Course Goal Provide the participants with an understanding of information

More information

ORACLE: PL/SQL Programming

ORACLE: PL/SQL Programming %ROWTYPE Attribute... 4:23 %ROWTYPE... 2:6 %TYPE... 2:6 %TYPE Attribute... 4:22 A Actual Parameters... 9:7 Actual versus Formal Parameters... 9:7 Aliases... 8:10 Anonymous Blocks... 3:1 Assigning Collection

More information

COSC344 Database Theory and Applications. Lecture 11 Triggers

COSC344 Database Theory and Applications. Lecture 11 Triggers COSC344 Database Theory and Applications Lecture 11 Triggers COSC344 Lecture 11 1 Overview Last Lecture - PL/SQL This Lecture - Triggers - Source: Lecture notes, Oracle documentation Next Lecture - Java

More information

Banner Performance on Oracle 10g

Banner Performance on Oracle 10g Banner Performance on Oracle 10g Presented by: Scott Harden University of Illinois April 16, 2008 INDIVIDUAL ACHIEVEMENT. EDUCATIONAL EXCELLENCE. ADMINISTRATIVE INNOVATION. INSTITUTIONAL PERFORMANCE. 1

More information

When a database trigger routine does not have to take place before the triggering event, which timing should you assign to the trigger?

When a database trigger routine does not have to take place before the triggering event, which timing should you assign to the trigger? Page 1 of 80 Item: 1 (Ref:1z0-147e.9.2.4) When a database trigger routine does not have to take place before the triggering event, which timing should you assign to the trigger? nmlkj ON nmlkj OFF nmlkj

More information

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle Database 11g: Program with PL/ SQL. Version: Demo

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle Database 11g: Program with PL/ SQL. Version: Demo Vendor: Oracle Exam Code: 1Z0-144 Exam Name: Oracle Database 11g: Program with PL/ SQL Version: Demo QUESTION NO: 1 View the Exhibit to examine the PL/SQL code: SREVROUPUT is on for the session. Which

More information

Now, we can refer to a sequence without having to use any SELECT command as follows:

Now, we can refer to a sequence without having to use any SELECT command as follows: Enhancement in 11g Database PL/SQL Sequence: Oracle Database 11g has now provided support for Sequence in PL/SQL. Earlier to get a number from a sequence in PL/SQL we had to use SELECT command with DUAL

More information

SARAPPD 5 0,1 SARAPPD_TERM_CODE_ENTRY VARCHAR2(6) 0,1 SARAPPD_APDC_DATE DATE SARAPPD_APDC_CODE VARCHAR2(2) SARAPPD_ACTIVITY_DATE DATE

SARAPPD 5 0,1 SARAPPD_TERM_CODE_ENTRY VARCHAR2(6) 0,1 SARAPPD_APDC_DATE DATE SARAPPD_APDC_CODE VARCHAR2(2) SARAPPD_ACTIVITY_DATE DATE SARAPPD 5 SARAPPD_PIDM SARAPPD_TERM_CODE_ENTRY VARCHAR2(6) SARAPPD_APPL_NO SARAPPD_SEQ_NO SARAPPD_APDC_ SARAPPD_APDC_CODE VARCHAR2(2) SARAPPD_MAINT_IND SARAPPD_ACTIVITY_ SARAPPD_USER SARAPPD_DATA_ORIGIN

More information

Oracle Database: Program with PL/SQL

Oracle Database: Program with PL/SQL Oracle University Contact Us: + 420 2 2143 8459 Oracle Database: Program with PL/SQL Duration: 5 Days What you will learn This Oracle Database: Program with PL/SQL training starts with an introduction

More information

Oracle Database: Program with PL/SQL Ed 2

Oracle Database: Program with PL/SQL Ed 2 Oracle University Contact Us: +38 61 5888 820 Oracle Database: Program with PL/SQL Ed 2 Duration: 5 Days What you will learn This Oracle Database: Program with PL/SQL training starts with an introduction

More information

Oracle PL/SQL Best Practices Part 1. John Mullins

Oracle PL/SQL Best Practices Part 1. John Mullins Oracle PLSQL Best Practices Part 1 John Mullins jmullins@themisinc.com www.themisinc.com www.themisinc.comwebinars Presenter John Mullins Themis Inc. (jmullins@themisinc.com) 30+ years of Oracle experience

More information

SCT Plus to SCT Banner Migration Tools SunGard SCT Application Practices Migration Guide. July 2005

SCT Plus to SCT Banner Migration Tools SunGard SCT Application Practices Migration Guide. July 2005 SCT Plus to SCT Banner Migration Tools SunGard SCT Application Practices July 2005 Business Information ---------------------------------------------------------------------------------------------------------------------------------------------------

More information

Question Bank PL/SQL Fundamentals-I

Question Bank PL/SQL Fundamentals-I Question Bank PL/SQL Fundamentals-I UNIT-I Fundamentals of PL SQL Introduction to SQL Developer, Introduction to PL/SQL, PL/SQL Overview, Benefits of PL/SQL, Subprograms, Overview of the Types of PL/SQL

More information

Oracle Database 12c R2: Program with PL/SQL Ed 2 Duration: 5 Days

Oracle Database 12c R2: Program with PL/SQL Ed 2 Duration: 5 Days Oracle Database 12c R2: Program with PL/SQL Ed 2 Duration: 5 Days This Database Program with PL/SQL training shows you how to develop stored procedures, functions, packages and database triggers. You'll

More information

Conditionally control code flow (loops, control structures). Create stored procedures and functions.

Conditionally control code flow (loops, control structures). Create stored procedures and functions. TEMARIO Oracle Database: Program with PL/SQL Ed 2 Duration: 5 Days What you will learn This Oracle Database: Program with PL/SQL training starts with an introduction to PL/SQL and then explores the benefits

More information

Lesson B Objectives IF/THEN. Chapter 4B: More Advanced PL/SQL Programming

Lesson B Objectives IF/THEN. Chapter 4B: More Advanced PL/SQL Programming Chapter 4B: More Advanced PL/SQL Programming Monday 2/23/2015 Abdou Illia MIS 4200 - Spring 2015 Lesson B Objectives After completing this lesson, you should be able to: Create PL/SQL decision control

More information

IZ0-144Oracle 11g PL/SQL Certification (OCA) training

IZ0-144Oracle 11g PL/SQL Certification (OCA) training IZ0-144Oracle 11g PL/SQL Certification (OCA) training Advanced topics covered in this course: Managing Dependencies of PL/SQL Objects Direct and Indirect Dependencies Using the PL/SQL Compiler Conditional

More information

Oracle 11g Invisible Indexes Inderpal S. Johal. Inderpal S. Johal, Data Softech Inc.

Oracle 11g Invisible Indexes   Inderpal S. Johal. Inderpal S. Johal, Data Softech Inc. ORACLE 11G INVISIBLE INDEXES Inderpal S. Johal, Data Softech Inc. INTRODUCTION In this document we will work on another Oracle 11g interesting feature called Invisible Indexes. This will be very helpful

More information

Oracle Database 12c: Program with PL/SQL Duration: 5 Days Method: Instructor-Led

Oracle Database 12c: Program with PL/SQL Duration: 5 Days Method: Instructor-Led Oracle Database 12c: Program with PL/SQL Duration: 5 Days Method: Instructor-Led Course Description This training starts with an introduction to PL/SQL and then explores the benefits of this powerful programming

More information

Introduction to SQL/PLSQL Accelerated Ed 2

Introduction to SQL/PLSQL Accelerated Ed 2 Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 67863102 Introduction to SQL/PLSQL Accelerated Ed 2 Duration: 5 Days What you will learn This Introduction to SQL/PLSQL Accelerated course

More information

Oracle PLSQL. Course Summary. Duration. Objectives

Oracle PLSQL. Course Summary. Duration. Objectives Oracle PLSQL Course Summary Use conditional compilation to customize the functionality in a PL/SQL application without removing any source code Design PL/SQL packages to group related constructs Create

More information

Non-Academic Requirements

Non-Academic Requirements National Student Loan Clearinghouse Reporting, Regents Test Load, and Student Schedule Form Georgia Enhanced Banner Student and Financial Aid Systems User Documentation Version 8.24 July 2013 This page

More information

Active Databases Part 1: Introduction CS561

Active Databases Part 1: Introduction CS561 Active Databases Part 1: Introduction CS561 1 Active Databases n Triggers and rules are developed for data integrity and constraints n Triggers make passive database active Database reacts to certain situations

More information

COMP 430 Intro. to Database Systems. Encapsulating SQL code

COMP 430 Intro. to Database Systems. Encapsulating SQL code COMP 430 Intro. to Database Systems Encapsulating SQL code Want to bundle SQL into code blocks Like in every other language Encapsulation Abstraction Code reuse Maintenance DB- or application-level? DB:

More information

GEORGIA SUMMIT Population Selection. Annelle Colevins Tuesday, Sept 21 3:25 4:15

GEORGIA SUMMIT Population Selection. Annelle Colevins Tuesday, Sept 21 3:25 4:15 GEORGIA SUMMIT 21 Population Selection Annelle Colevins Tuesday, Sept 21 3:25 4:15 SESSION RULES OF ETIQUETTE Please turn off your cell phone/beeper If you must leave the session early, please do so as

More information

PROCEDURAL DATABASE PROGRAMMING ( PL/SQL AND T-SQL)

PROCEDURAL DATABASE PROGRAMMING ( PL/SQL AND T-SQL) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 6 Database Programming PROCEDURAL DATABASE PROGRAMMING ( PL/SQL AND T-SQL) AGENDA 8. Using Declarative SQL in Procedural SQL

More information

Banner General Common Matching Training Workbook

Banner General Common Matching Training Workbook Banner General Common Matching Training Workbook September 2007 Release 7.5 HIGHER EDUCATION What can we help you achieve? Confidential Business Information -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

More information

COSC344 Database Theory and Applications. Lecture 5 SQL - Data Definition Language. COSC344 Lecture 5 1

COSC344 Database Theory and Applications. Lecture 5 SQL - Data Definition Language. COSC344 Lecture 5 1 COSC344 Database Theory and Applications Lecture 5 SQL - Data Definition Language COSC344 Lecture 5 1 Overview Last Lecture Relational algebra This Lecture Relational algebra (continued) SQL - DDL CREATE

More information

Oracle Login Max Length Table Name 11g Column Varchar2

Oracle Login Max Length Table Name 11g Column Varchar2 Oracle Login Max Length Table Name 11g Column Varchar2 Get max(length(column)) for all columns in an Oracle table tables you are looking at BEGIN -- loop through column names in all_tab_columns for a given

More information

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

Actual4Test.   Actual4test - actual test exam dumps-pass for IT exams Actual4Test http://www.actual4test.com Actual4test - actual test exam dumps-pass for IT exams Exam : 1z0-144 Title : Oracle Database 11g: Program with PL/SQL Vendor : Oracle Version : DEMO Get Latest &

More information

ORACLE TRAINING. ORACLE Training Course syllabus ORACLE SQL ORACLE PLSQL. Oracle SQL Training Syllabus

ORACLE TRAINING. ORACLE Training Course syllabus ORACLE SQL ORACLE PLSQL. Oracle SQL Training Syllabus ORACLE TRAINING ORACLE Training Course syllabus ORACLE SQL ORACLE PLSQL Oracle SQL Training Syllabus Introduction to Oracle Database List the features of Oracle Database 11g Discuss the basic design, theoretical,

More information

Creating Oracle Tables ( Lesson 2 )

Creating Oracle Tables ( Lesson 2 ) Creating Oracle Tables ( Lesson 2 ) 2.1 Demo Application During this course we will be using Application Express and Oracle 10g Express Edition to create an application. The application will be used to

More information

Banner Transformed Getting Started With Your Administrative Applications. Release 9.0 October 2015

Banner Transformed Getting Started With Your Administrative Applications. Release 9.0 October 2015 Banner Transformed Getting Started With Your Administrative Applications Release 9.0 October 2015 Notices Notices Without limitation: Ellucian, Banner, Colleague, and Luminis are trademarks of the Ellucian

More information

Oracle PL/SQL - 12c & 11g [Basic PL/SQL & Advanced PL/SQL]

Oracle PL/SQL - 12c & 11g [Basic PL/SQL & Advanced PL/SQL] Chapter Overview of PL/SQL Programs Control Statements Using Loops within PLSQL Oracle PL/SQL - 12c & 11g [Basic PL/SQL & Advanced PL/SQL] Table of Contents Describe a PL/SQL program construct List the

More information

2. Programming written ( main theme is to test our data structure knowledge, proficiency

2. Programming written ( main theme is to test our data structure knowledge, proficiency ORACLE Job Placement Paper Paper Type : General - other 1. Tech + Aptitude written 2. Programming written ( main theme is to test our data structure knowledge, proficiency sorting searching algorithms

More information

Oracle PL SQL Training & Certification

Oracle PL SQL Training & Certification About Intellipaat Intellipaat is a fast-growing professional training provider that is offering training in over 150 most sought-after tools and technologies. We have a learner base of 600,000 in over

More information

ADVANTAGES. Via PL/SQL, all sorts of calculations can be done quickly and efficiently without use of Oracle engine.

ADVANTAGES. Via PL/SQL, all sorts of calculations can be done quickly and efficiently without use of Oracle engine. 1 PL/SQL INTRODUCTION SQL does not have procedural capabilities. SQL does not provide the programming techniques of condition checking, looping and branching that is required for data before permanent

More information

Introductions. Training Agenda. Name Title/function Job responsibilities Expectations

Introductions. Training Agenda. Name Title/function Job responsibilities Expectations Banner Performance Reporting and Analytics Introductions Name Title/function Job responsibilities Expectations 2 Training Agenda Introductions Banner ODS Overview

More information

ORACLE Job Placement Paper. Paper Type : General - other

ORACLE Job Placement Paper. Paper Type : General - other ORACLE Job Placement Paper Paper Type : General - other 1. Tech + Aptitude written 2. Programming written ( main theme is to test our data structure knowledge, proficiency sorting searching algorithms

More information

About these Release Notes. Documentation Accessibility. New Features in Pro*COBOL

About these Release Notes. Documentation Accessibility. New Features in Pro*COBOL Pro*COBOL Release Notes 12c Release 1 (12.1) E18407-06 April 2013 About these Release Notes This document contains important information about Pro*COBOL 12c Release 1 (12.1). It contains the following

More information

Oracle - Oracle Database: Program with PL/SQL Ed 2

Oracle - Oracle Database: Program with PL/SQL Ed 2 Oracle - Oracle Database: Program with PL/SQL Ed 2 Code: Lengt h: URL: DB-PLSQL 5 days View Online This Oracle Database: Program with PL/SQL training starts with an introduction to PL/SQL and then explores

More information

5 Integrity Constraints and Triggers

5 Integrity Constraints and Triggers 5 Integrity Constraints and Triggers 5.1 Integrity Constraints In Section 1 we have discussed three types of integrity constraints: not null constraints, primary keys, and unique constraints. In this section

More information

Primary Key on combination of GOODPIDM and BADPIDM ( There can be only one record per combination of Good and Bad id ) nsv_duphist.

Primary Key on combination of GOODPIDM and BADPIDM ( There can be only one record per combination of Good and Bad id ) nsv_duphist. All Modules Reporting Need View: Provides access to Duplicated Id history information (for deleted "BAD" ids < DUPDLTH > and currently existing in Banner ). *Note: Starting October 2009 BAD ids

More information

The routines used in this example are explained in detail further down in this section. create table t ( msg varchar2(20), cnt int );

The routines used in this example are explained in detail further down in this section. create table t ( msg varchar2(20), cnt int ); DBMS_JOB DBMS_JOB The DBMS_JOB package allows you to schedule one-off or recurring jobs in your database. A job is a stored procedure, anonymous PL/SQL block, or external procedure written in C or Java.

More information

How To Drop All Tables In A Schema In Oracle 10g

How To Drop All Tables In A Schema In Oracle 10g How To Drop All Tables In A Schema In Oracle 10g Imports/exports all schema object types If you run Oracle Application Express with Oracle Database 10g release 1 (10.1) or later, you can generate When

More information

PLSQL 9i Index. Section Title Page

PLSQL 9i Index. Section Title Page One PLSQL Introduction 2 Procedural Language for SQL 3 Two PLSQL Structure 5 Basic Structure of PLSQL 6 The Declaration Section in PLSQL 7 Local Variables in PLSQL 8 Naming Local Variables in PLSQL 10

More information

Business Analytics. SQL PL SQL [Oracle 10 g] P r i n c e S e t h i w w w. x l m a c r o. w e b s. c o m

Business Analytics. SQL PL SQL [Oracle 10 g] P r i n c e S e t h i w w w. x l m a c r o. w e b s. c o m Business Analytics Let s Learn SQL-PL SQL (Oracle 10g) SQL PL SQL [Oracle 10 g] RDBMS, DDL, DML, DCL, Clause, Join, Function, Queries, Views, Constraints, Blocks, Cursors, Exception Handling, Trapping,

More information

You ve Got Mail. Leslie M. Tierstein, STR LLC Mark Castaldo, STR LLC

You ve Got Mail. Leslie M. Tierstein, STR LLC Mark Castaldo, STR LLC Leslie M. Tierstein, STR LLC Mark Castaldo, STR LLC 1 Overview Architecture, design and code for a robust correspondence generation system Mail merge capability User maintainable Multiple recipients Multiple,

More information

Section I : Section II : Question 1. Question 2. Question 3.

Section I : Section II : Question 1. Question 2. Question 3. Computer Science, 60-415 Midterm Examiner: Ritu Chaturvedi Date: Oct. 27 th, 2011 Student Name: Student Number: INSTRUCTIONS (Please Read Carefully) Examination Period is 1 hour and 15 minutes Answer all

More information

Misc. Triggers Views Roles Sequences - Synonyms. Eng. Mohammed Alokshiya. Islamic University of Gaza. Faculty of Engineering

Misc. Triggers Views Roles Sequences - Synonyms. Eng. Mohammed Alokshiya. Islamic University of Gaza. Faculty of Engineering Islamic University of Gaza Faculty of Engineering Computer Engineering Dept. Database Lab (ECOM 4113) Lab 9 Misc. Triggers Views Roles Sequences - Synonyms Eng. Mohammed Alokshiya December 7, 2014 Views

More information

Chapter 1 SQL and Data

Chapter 1 SQL and Data Chapter 1 SQL and Data What is SQL? Structured Query Language An industry-standard language used to access & manipulate data stored in a relational database E. F. Codd, 1970 s IBM 2 What is Oracle? A relational

More information

SQL:1999 additional features. Object-oriented concepts Object relational concepts in SQL:1999 Active database concepts Active concepts in SQL:1999

SQL:1999 additional features. Object-oriented concepts Object relational concepts in SQL:1999 Active database concepts Active concepts in SQL:1999 SQL:1999 additional features Object-oriented concepts Object relational concepts in SQL:1999 Active database concepts Active concepts in SQL:1999 Additional features : Motivation Not in relational model:

More information

SCT Banner Student VBS Using FGAC Technical Training Workbook. Release 7.1 May 2005

SCT Banner Student VBS Using FGAC Technical Training Workbook. Release 7.1 May 2005 SCT Banner Student VBS Using FGAC Technical Training Workbook Release 7.1 May 2005 Confidential Business Information ----------------------------------------------------------------------------------------------------------------------------------------------------------------------

More information

New York Oracle Users Group. September 26, 2002 New York, NY

New York Oracle Users Group. September 26, 2002 New York, NY New York Oracle Users Group September 26, 2002 New York, NY Fire and Forget : When to Use Autonomous Transactions Michael Rosenblum Dulcian, Inc. www.dulcian.com ! Definition: Autonomous Transactions "

More information

IEPPLUS. Custom Form Designer

IEPPLUS. Custom Form Designer IEPPLUS Custom Form Designer 1990-2015 SunGard Public Sector Inc. All rights reserved. No part of this publication may be reproduced without the prior written permission of SunGard Public Sector Inc.,

More information

Home Page User Guide IEPPLUS 4.3

Home Page User Guide IEPPLUS 4.3 User Guide IEPPLUS 4.3 1990-2014 SunGard Public Sector Inc. All rights reserved. No part of this publication may be reproduced without the prior written permission of SunGard Public Sector Inc., with the

More information

Making RORRULE Rule!!!!

Making RORRULE Rule!!!! Making RORRULE Rule!!!! Tania Pittman & Rich Loftus, USG Board of Regents Pat Barton, Clayton College & State University September 18, 2003 Lamar C 3:10 p.m. Session Rules of Etiquette! Please hold all

More information

Topics Fundamentals of PL/SQL, Integration with PROIV SuperLayer and use within Glovia

Topics Fundamentals of PL/SQL, Integration with PROIV SuperLayer and use within Glovia Topics Fundamentals of PL/SQL, Integration with PROIV SuperLayer and use within Glovia 1. Creating a Database Alias 2. Introduction to SQL Relational Database Concept Definition of Relational Database

More information

Sql Server Check If Global Temporary Table Exists

Sql Server Check If Global Temporary Table Exists Sql Server Check If Global Temporary Table Exists I am trying to create a temp table from the a select statement so that I can get the schema information from the temp I have yet to see a valid justification

More information

Oracle Database: Introduction to SQL/PLSQL Accelerated

Oracle Database: Introduction to SQL/PLSQL Accelerated Oracle University Contact Us: Landline: +91 80 67863899 Toll Free: 0008004401672 Oracle Database: Introduction to SQL/PLSQL Accelerated Duration: 5 Days What you will learn This Introduction to SQL/PLSQL

More information