SlideShare a Scribd company logo
Copyright © 2006, Oracle. All rights reserved.
Managing Dependencies
9-2 Copyright © 2006, Oracle. All rights reserved.
Understanding Dependencies
Table
View
Database trigger
Procedure
Function
Package body
Package specification
User-defined object
and collection types
Function
Package specification
Procedure
Sequence
Synonym
Table
View
User-defined object
and collection types
Referenced objectsDependent objects
9-3 Copyright © 2006, Oracle. All rights reserved.
Dependencies
View or
procedure
Direct
dependency
Referenced
Indirect
dependency
Direct
dependency
Dependent
Table
Referenced
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
Procedure
Dependent
9-4 Copyright © 2006, Oracle. All rights reserved.
Local Dependencies
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
Procedure View
Local references
Procedure Table
vvvvvvvvvvvvv
v
xxxxxxxxxxxxx
x
vvvvvvvvvvvvv
v
xxxxxxxxxxxxx
x
vvvvvvvvvvvvv
v
xxxxxxxxxxxxx
x
vvvvvvvvvvvvv
v
Direct local
dependency
9-5 Copyright © 2006, Oracle. All rights reserved.
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
Procedure View
Local references
Procedure Table
vvvvvvvvvvvvv
v
xxxxxxxxxxxxx
x
vvvvvvvvvvvvv
v
xxxxxxxxxxxxx
x
vvvvvvvvvvvvv
v
xxxxxxxxxxxxx
x
vvvvvvvvvvvvv
v
Direct local
dependency
Local Dependencies
The Oracle server implicitly recompiles any INVALID
object when the object is next called.
Definition
change
INVALIDINVALIDINVALID
9-6 Copyright © 2006, Oracle. All rights reserved.
Displaying Direct Dependencies by Using
USER_DEPENDENCIES
SELECT name, type, referenced_name, referenced_type
FROM user_dependencies
WHERE referenced_name IN ('EMPLOYEES','EMP_VW' );
…
…
9-7 Copyright © 2006, Oracle. All rights reserved.
Displaying Direct and Indirect
Dependencies
1. Run the script utldtree.sql that creates the
objects that enable you to display the direct and
indirect dependencies.
2. Execute the DEPTREE_FILL procedure.
EXECUTE deptree_fill('TABLE','SCOTT','EMPLOYEES')
9-8 Copyright © 2006, Oracle. All rights reserved.
Displaying Dependencies
DEPTREE view
SELECT nested_level, type, name
FROM deptree
ORDER BY seq#;
…
…
9-9 Copyright © 2006, Oracle. All rights reserved.
EMPLOYEES table
REDUCE_SAL
procedure
RAISE_SAL
procedure
Another Scenario of Local Dependencies
xxxxxxxxxxxxxxxxxxxxx
vvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvv
vvvvvvxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxx
vvvvvvvvvvvvvvvvvvvvv
xxxxxxxxxxxxxxxxxxxxx
vvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvv
vvvvvvxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxx
vvvvvvvvvvvvvvvvvvvvv
…
9-10 Copyright © 2006, Oracle. All rights reserved.
QUERY_EMP
procedure
EMPLOYEES public synonym
A Scenario of Local Naming Dependencies
EMPLOYEES
table
…
…
xxxxxxxxxxxxxxxxxxxxx
vvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvv
vvvvvvxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxx
vvvvvvvvvvvvvvvvvvvvv
9-11 Copyright © 2006, Oracle. All rights reserved.
Understanding Remote Dependencies
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
Procedure ViewProcedure Table
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
Direct local
dependency
Direct remote
dependency
Local and remote references
Network
9-12 Copyright © 2006, Oracle. All rights reserved.
Understanding Remote Dependencies
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
Procedure ViewProcedure Table
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
Direct local
dependency
Direct remote
dependency
Local and remote references
Network
Definition
change
INVALIDINVALIDVALID
9-13 Copyright © 2006, Oracle. All rights reserved.
Concepts of Remote Dependencies
Remote dependencies are governed by the mode that
is chosen by the user:
• TIMESTAMP checking
• SIGNATURE checking
9-14 Copyright © 2006, Oracle. All rights reserved.
REMOTE_DEPENDENCIES_MODE Parameter
Setting REMOTE_DEPENDENCIES_MODE:
• As an init.ora parameter
REMOTE_DEPENDENCIES_MODE = value
• At the system level
ALTER SYSTEM SET
REMOTE_DEPENDENCIES_MODE = value
• At the session level
ALTER SESSION SET
REMOTE_DEPENDENCIES_MODE = value
9-15 Copyright © 2006, Oracle. All rights reserved.
Remote Dependencies and
Time Stamp Mode
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
Procedure ViewProcedure Table
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
Network
Network
9-16 Copyright © 2006, Oracle. All rights reserved.
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
Procedure ViewProcedure Table
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
Network
Network
Remote Dependencies and
Time Stamp Mode
Definition
change
INVALIDINVALIDVALID
9-17 Copyright © 2006, Oracle. All rights reserved.
Remote Procedure B Compiles
at 8:00 a.m.
Remote procedure B
Valid
Compiles
9-18 Copyright © 2006, Oracle. All rights reserved.
Local Procedure A Compiles
at 9:00 a.m.
Local procedure A
Valid
Remote procedure B
Time stamp
of B
Valid
Time stamp
of A
Record time
stamp of B
9-19 Copyright © 2006, Oracle. All rights reserved.
Execute Procedure A
Local procedure A
Valid
Remote procedure B
Time stamp
of B
Valid
Time stamp
of A
Time stamp
of B
Time stamp
comparison
Execute B
9-20 Copyright © 2006, Oracle. All rights reserved.
Remote Procedure B Recompiled
at 11:00 a.m.
Valid
Compiles
Remote procedure B
9-21 Copyright © 2006, Oracle. All rights reserved.
Local procedure A
Valid
Remote procedure B
Time stamp
of B
Valid
Time stamp
of A
Time stamp
of B
Time stamp
comparison
ERROR
Invalid
Execute Procedure A
9-22 Copyright © 2006, Oracle. All rights reserved.
Signature Mode
• The signature of a procedure is:
– The name of the procedure
– The data types of the parameters
– The modes of the parameters
• The signature of the remote procedure is saved in
the local procedure.
• When executing a dependent procedure, the
signature of the referenced remote procedure is
compared.
9-23 Copyright © 2006, Oracle. All rights reserved.
Recompiling a PL/SQL
Program Unit
Recompilation:
• Is handled automatically through implicit run-time
recompilation
• Is handled through explicit recompilation with the
ALTER statement
ALTER PROCEDURE [SCHEMA.]procedure_name COMPILE;
ALTER FUNCTION [SCHEMA.]function_name COMPILE;
ALTER PACKAGE [SCHEMA.]package_name
COMPILE [PACKAGE | SPECIFICATION | BODY];
ALTER TRIGGER trigger_name [COMPILE[DEBUG]];
9-24 Copyright © 2006, Oracle. All rights reserved.
Unsuccessful Recompilation
Recompiling dependent procedures and functions is
unsuccessful when:
• The referenced object is dropped or renamed
• The data type of the referenced column is
changed
• The referenced column is dropped
• A referenced view is replaced by a view with
different columns
• The parameter list of a referenced procedure is
modified
9-25 Copyright © 2006, Oracle. All rights reserved.
Successful Recompilation
Recompiling dependent procedures and functions is
successful if:
• The referenced table has new columns
• The data type of referenced columns has not
changed
• A private table is dropped, but a public table that
has the same name and structure exists
• The PL/SQL body of a referenced procedure has
been modified and recompiled successfully
9-26 Copyright © 2006, Oracle. All rights reserved.
Recompilation of Procedures
Minimize dependency failures by:
• Declaring records with the %ROWTYPE attribute
• Declaring variables with the %TYPE attribute
• Querying with the SELECT * notation
• Including a column list with INSERT statements
9-27 Copyright © 2006, Oracle. All rights reserved.
Packages and Dependencies
Package body
Procedure A
definition
Definition changed
Procedure A
declaration
Package specification
ValidStand-alone
procedure
Valid
9-28 Copyright © 2006, Oracle. All rights reserved.
Package body
Procedure A
definition
Procedure A
declaration
Package specification
Valid
Packages and Dependencies
Stand-alone
procedure
Definition
changed
Invalid
Copyright © 2006, Oracle. All rights reserved.
Manipulating Large Objects
9-30 Copyright © 2006, Oracle. All rights reserved.
What Is a LOB?
LOBs are used to store large unstructured data such as
text, graphic images, films, and sound waveforms.
Photo (BLOB)
“Four score and seven years
ago our fathers brought forth
upon this continent, a new
nation, conceived in LIBERTY,
and dedicated to the
proposition that all men are
created equal.”
Text (CLOB)
Movie (BFILE)
9-31 Copyright © 2006, Oracle. All rights reserved.
Contrasting LONG and LOB Data Types
LONG and LONG RAW
Single LONG column per table
Up to 2 GB
SELECT returns data
Data stored in-line
Sequential access to data
LOB
Multiple LOB columns per table
Up to 4 GB
SELECT returns locator
Data stored in-line or out-of-line
Random access to data
9-32 Copyright © 2006, Oracle. All rights reserved.
Anatomy of a LOB
The LOB column stores a locator to the LOB’s value.
LOB locator
LOB column
of a table
LOB value
9-33 Copyright © 2006, Oracle. All rights reserved.
Internal LOBs
The LOB value is stored in the database.
“Four score and seven years ago
our fathers brought forth upon
this continent, a new nation,
conceived in LIBERTY, and dedicated
to the proposition that all men
are created equal.”
CLOB BLOB
9-34 Copyright © 2006, Oracle. All rights reserved.
Managing Internal LOBs
• To interact fully with LOB, file-like interfaces are
provided in:
– PL/SQL package DBMS_LOB
– Oracle Call Interface (OCI)
– Oracle Objects for object linking and embedding
(OLE)
– Pro*C/C++ and Pro*COBOL precompilers
– JDBC (Java Database Connectivity)
• The Oracle server provides some support for LOB
management through SQL.
9-35 Copyright © 2006, Oracle. All rights reserved.
What Are BFILEs?
The BFILE data type supports an external or file-based
large object as:
• Attributes in an object type
• Column values in a table
Movie (BFILE)
9-36 Copyright © 2006, Oracle. All rights reserved.
Securing BFILEs
Access
permissions
User
Movie (BFILE)
9-37 Copyright © 2006, Oracle. All rights reserved.
A New Database Object: DIRECTORY
DIRECTORY
LOB_PATH =
'/oracle/lob/'
User
Movie (BFILE)
9-38 Copyright © 2006, Oracle. All rights reserved.
Guidelines for Creating
DIRECTORY Objects
• Do not create DIRECTORY objects on paths with
database files.
• Limit the number of people who are given the
following system privileges:
– CREATE ANY DIRECTORY
– DROP ANY DIRECTORY
• All DIRECTORY objects are owned by SYS.
• Create directory paths and properly set
permissions before using the DIRECTORY object
so that the Oracle server can read the file.
9-39 Copyright © 2006, Oracle. All rights reserved.
Managing BFILEs
The DBA or the system administrator:
1. Creates an OS directory and supplies files
2. Creates a DIRECTORY object in the database
3. Grants the READ privilege on the DIRECTORY
object to appropriate database users
The developer or the user:
4. Creates an Oracle table with a column defined as a
BFILE data type
5. Inserts rows into the table using the BFILENAME
function to populate the BFILE column
6. Writes a PL/SQL subprogram that declares and
initializes a LOB locator, and reads BFILE
9-40 Copyright © 2006, Oracle. All rights reserved.
Preparing to Use BFILEs
1. Create an OS directory to store the physical data
files.
2. Create a DIRECTORY object by using the CREATE
DIRECTORY command.
3. Grant the READ privilege on the DIRECTORY object
to appropriate users.
mkdir /temp/data_files
CREATE DIRECTORY data_files
AS '/temp/data_files';
GRANT READ ON DIRECTORY data_files
TO SCOTT, MANAGER_ROLE, PUBLIC;
9-41 Copyright © 2006, Oracle. All rights reserved.
Populating BFILE Columns with SQL
• Use the BFILENAME function to initialize a BFILE
column. The function syntax is:
• Example:
– Add a BFILE column to a table.
– Update the column using the BFILENAME function.
FUNCTION BFILENAME(directory_alias IN VARCHAR2,
filename IN VARCHAR2)
RETURN BFILE;
UPDATE employees
SET video = BFILENAME('DATA_FILES', 'King.avi')
WHERE employee_id = 100;
ALTER TABLE employees ADD video BFILE;
9-42 Copyright © 2006, Oracle. All rights reserved.
CREATE FUNCTION get_filesize(file_ptr BFILE)
RETURN NUMBER IS
file_exists BOOLEAN;
length NUMBER:= -1;
BEGIN
file_exists := DBMS_LOB.FILEEXISTS(file_ptr)=1;
IF file_exists THEN
DBMS_LOB.FILEOPEN(file_ptr);
length := DBMS_LOB.GETLENGTH(file_ptr);
DBMS_LOB.FILECLOSE(file_ptr);
END IF;
RETURN length;
END;
/
Using DBMS_LOB Routines with BFILEs
The DBMS_LOB.FILEEXISTS function can verify if the
file exists in the OS. The function:
• Returns 0 if the file does not exist
• Returns 1 if the file does exist
9-43 Copyright © 2006, Oracle. All rights reserved.
Migrating from LONG to LOB
Oracle Database 10g enables migration of LONG
columns to LOB columns.
• Data migration consists of the procedure to move
existing tables containing LONG columns to use
LOBs:
• Application migration consists of changing
existing LONG applications for using LOBs.
ALTER TABLE [<schema>.] <table_name>
MODIFY (<long_col_name> {CLOB | BLOB | NCLOB}
9-44 Copyright © 2006, Oracle. All rights reserved.
Migrating from LONG to LOB
• Implicit conversion: From LONG (LONG RAW) or a
VARCHAR2(RAW) variable to a CLOB (BLOB)
variable, and vice versa
• Explicit conversion:
– TO_CLOB() converts LONG, VARCHAR2, and CHAR to
CLOB.
– TO_BLOB() converts LONG RAW and RAW to BLOB.
• Function and procedure parameter passing:
– CLOBs and BLOBs as actual parameters
– VARCHAR2, LONG, RAW, and LONG RAW are formal
parameters, and vice versa.
• LOB data is acceptable in most of the SQL and
PL/SQL operators and built-in functions.
9-45 Copyright © 2006, Oracle. All rights reserved.
DBMS_LOB Package
• Working with LOBs often requires the use of the
Oracle-supplied DBMS_LOB package.
• DBMS_LOB provides routines to access and
manipulate internal and external LOBs.
• Oracle Database 10g enables retrieving LOB data
directly using SQL without a special LOB API.
• In PL/SQL, you can define a VARCHAR2 for a CLOB
and a RAW for a BLOB.
9-46 Copyright © 2006, Oracle. All rights reserved.
DBMS_LOB Package
• Modify LOB values:
APPEND, COPY, ERASE, TRIM, WRITE,
LOADFROMFILE
• Read or examine LOB values:
GETLENGTH, INSTR, READ, SUBSTR
• Specific to BFILEs:
FILECLOSE, FILECLOSEALL, FILEEXISTS,
FILEGETNAME, FILEISOPEN, FILEOPEN
9-47 Copyright © 2006, Oracle. All rights reserved.
DBMS_LOB Package
• NULL parameters get NULL returns.
• Offsets:
– BLOB, BFILE: Measured in bytes
– CLOB, NCLOB: Measured in characters
• There are no negative values for parameters.
9-48 Copyright © 2006, Oracle. All rights reserved.
SET LINESIZE 50 SERVEROUTPUT ON FORMAT WORD_WRAP
DECLARE
text VARCHAR2(4001);
BEGIN
SELECT resume INTO text
FROM emp_hiredata
WHERE employee_id = 170;
DBMS_OUTPUT.PUT_LINE('text is: '|| text);
END;
/
Selecting CLOB Values in PL/SQL
text is: Date of Birth: 1 June 1956 Resigned = 30
September 2000
PL/SQL procedure successfully completed.
9-49 Copyright © 2006, Oracle. All rights reserved.
Removing LOBs
• Delete a row containing LOBs:
• Disassociate a LOB value from a row:
DELETE
FROM emp_hiredata
WHERE employee_id = 405;
UPDATE emp_hiredata
SET resume = EMPTY_CLOB()
WHERE employee_id = 170;
9-50 Copyright © 2006, Oracle. All rights reserved.
Temporary LOBs
• Temporary LOBs:
– Provide an interface to support creation of LOBs
that act like local variables
– Can be BLOBs, CLOBs, or NCLOBs
– Are not associated with a specific table
– Are created using the
DBMS_LOB.CREATETEMPORARY procedure
– Use DBMS_LOB routines
• The lifetime of a temporary LOB is a session.
• Temporary LOBs are useful for transforming data
in permanent internal LOBs.
9-51 Copyright © 2006, Oracle. All rights reserved.
Creating a Temporary LOB
PL/SQL procedure to create and test a temporary LOB:
CREATE OR REPLACE PROCEDURE is_templob_open(
lob IN OUT BLOB, retval OUT INTEGER) IS
BEGIN
-- create a temporary LOB
DBMS_LOB.CREATETEMPORARY (lob, TRUE);
-- see if the LOB is open: returns 1 if open
retval := DBMS_LOB.ISOPEN (lob);
DBMS_OUTPUT.PUT_LINE (
'The file returned a value...' || retval);
-- free the temporary LOB
DBMS_LOB.FREETEMPORARY (lob);
END;
/
9-52 Copyright © 2006, Oracle. All rights reserved.
Practice 8: Overview
This practice covers the following topics:
• Using DEPTREE_FILL and IDEPTREE to view
dependencies
• Recompiling procedures, functions, and packages
• Creating object types using the CLOB and BLOB
data types
• Creating a table with LOB data types as columns
• Using the DBMS_LOB package to populate and
interact with the LOB data

More Related Content

What's hot

Procedure and Functions in pl/sql
Procedure and Functions in pl/sqlProcedure and Functions in pl/sql
Procedure and Functions in pl/sql
Ñirmal Tatiwal
 
04 Handling Exceptions
04 Handling Exceptions04 Handling Exceptions
04 Handling Exceptions
rehaniltifat
 
PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts
Bharat Kalia
 
All About PL/SQL Collections
All About PL/SQL CollectionsAll About PL/SQL Collections
All About PL/SQL Collections
Steven Feuerstein
 
Oracle sql high performance tuning
Oracle sql high performance tuningOracle sql high performance tuning
Oracle sql high performance tuning
Guy Harrison
 
Oracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step GuideOracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step Guide
Srinimf-Slides
 
Triggers
TriggersTriggers
Triggers
Pooja Dixit
 
Cursores.ppt
Cursores.pptCursores.ppt
Cursores.ppt
Alan737817
 
MySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZEMySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZE
Norvald Ryeng
 
Including Constraints -Oracle Data base
Including Constraints -Oracle Data base Including Constraints -Oracle Data base
Including Constraints -Oracle Data base
Salman Memon
 
PL/SQL Fundamentals I
PL/SQL Fundamentals IPL/SQL Fundamentals I
PL/SQL Fundamentals I
Nick Buytaert
 
Explain the explain_plan
Explain the explain_planExplain the explain_plan
Explain the explain_plan
Maria Colgan
 
PL/SQL - CURSORS
PL/SQL - CURSORSPL/SQL - CURSORS
PL/SQL - CURSORS
IshaRana14
 
High Performance PL/SQL
High Performance PL/SQLHigh Performance PL/SQL
High Performance PL/SQL
Steven Feuerstein
 
07 Using Oracle-Supported Package in Application Development
07 Using Oracle-Supported Package in Application Development07 Using Oracle-Supported Package in Application Development
07 Using Oracle-Supported Package in Application Development
rehaniltifat
 
Displaying Data from Multiple Tables - Oracle Data Base
Displaying Data from Multiple Tables - Oracle Data BaseDisplaying Data from Multiple Tables - Oracle Data Base
Displaying Data from Multiple Tables - Oracle Data Base
Salman Memon
 
Oracle SQL Basics
Oracle SQL BasicsOracle SQL Basics
Oracle SQL Basics
Dhananjay Goel
 
Oracle SQL, PL/SQL Performance tuning
Oracle SQL, PL/SQL Performance tuningOracle SQL, PL/SQL Performance tuning
Oracle SQL, PL/SQL Performance tuning
Smitha Padmanabhan
 
Oracle Database Trigger
Oracle Database TriggerOracle Database Trigger
Oracle Database Trigger
Eryk Budi Pratama
 

What's hot (20)

Procedure and Functions in pl/sql
Procedure and Functions in pl/sqlProcedure and Functions in pl/sql
Procedure and Functions in pl/sql
 
04 Handling Exceptions
04 Handling Exceptions04 Handling Exceptions
04 Handling Exceptions
 
PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts
 
All About PL/SQL Collections
All About PL/SQL CollectionsAll About PL/SQL Collections
All About PL/SQL Collections
 
Oracle sql high performance tuning
Oracle sql high performance tuningOracle sql high performance tuning
Oracle sql high performance tuning
 
Oracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step GuideOracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step Guide
 
Triggers
TriggersTriggers
Triggers
 
Cursores.ppt
Cursores.pptCursores.ppt
Cursores.ppt
 
MySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZEMySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZE
 
Including Constraints -Oracle Data base
Including Constraints -Oracle Data base Including Constraints -Oracle Data base
Including Constraints -Oracle Data base
 
PL/SQL Fundamentals I
PL/SQL Fundamentals IPL/SQL Fundamentals I
PL/SQL Fundamentals I
 
Explain the explain_plan
Explain the explain_planExplain the explain_plan
Explain the explain_plan
 
PL/SQL - CURSORS
PL/SQL - CURSORSPL/SQL - CURSORS
PL/SQL - CURSORS
 
High Performance PL/SQL
High Performance PL/SQLHigh Performance PL/SQL
High Performance PL/SQL
 
07 Using Oracle-Supported Package in Application Development
07 Using Oracle-Supported Package in Application Development07 Using Oracle-Supported Package in Application Development
07 Using Oracle-Supported Package in Application Development
 
Stored procedure
Stored procedureStored procedure
Stored procedure
 
Displaying Data from Multiple Tables - Oracle Data Base
Displaying Data from Multiple Tables - Oracle Data BaseDisplaying Data from Multiple Tables - Oracle Data Base
Displaying Data from Multiple Tables - Oracle Data Base
 
Oracle SQL Basics
Oracle SQL BasicsOracle SQL Basics
Oracle SQL Basics
 
Oracle SQL, PL/SQL Performance tuning
Oracle SQL, PL/SQL Performance tuningOracle SQL, PL/SQL Performance tuning
Oracle SQL, PL/SQL Performance tuning
 
Oracle Database Trigger
Oracle Database TriggerOracle Database Trigger
Oracle Database Trigger
 

Viewers also liked

Case study what you can take to the bank(primary functions)
Case study   what you can take to the bank(primary functions)Case study   what you can take to the bank(primary functions)
Case study what you can take to the bank(primary functions)
rehaniltifat
 
Transcript of Presentation(Simple & Compound Interest) for Audience
Transcript of Presentation(Simple & Compound Interest) for AudienceTranscript of Presentation(Simple & Compound Interest) for Audience
Transcript of Presentation(Simple & Compound Interest) for Audience
rehaniltifat
 
Designpatternscard
DesignpatternscardDesignpatternscard
Designpatternscardkyutae.kang
 
Remote DBA Experts 11g Features
Remote DBA Experts 11g FeaturesRemote DBA Experts 11g Features
Remote DBA Experts 11g Features
Remote DBA Experts
 
Turbocharge SQL Performance in PL/SQL with Bulk Processing
Turbocharge SQL Performance in PL/SQL with Bulk ProcessingTurbocharge SQL Performance in PL/SQL with Bulk Processing
Turbocharge SQL Performance in PL/SQL with Bulk Processing
Steven Feuerstein
 
Oracle - Program with PL/SQL - Lession 18
Oracle - Program with PL/SQL - Lession 18Oracle - Program with PL/SQL - Lession 18
Oracle - Program with PL/SQL - Lession 18
Thuan Nguyen
 
Oracle - Program with PL/SQL - Lession 04
Oracle - Program with PL/SQL - Lession 04Oracle - Program with PL/SQL - Lession 04
Oracle - Program with PL/SQL - Lession 04
Thuan Nguyen
 
Oracle - Program with PL/SQL - Lession 10
Oracle - Program with PL/SQL - Lession 10Oracle - Program with PL/SQL - Lession 10
Oracle - Program with PL/SQL - Lession 10
Thuan Nguyen
 
Oracle - Program with PL/SQL - Lession 07
Oracle - Program with PL/SQL - Lession 07Oracle - Program with PL/SQL - Lession 07
Oracle - Program with PL/SQL - Lession 07
Thuan Nguyen
 

Viewers also liked (9)

Case study what you can take to the bank(primary functions)
Case study   what you can take to the bank(primary functions)Case study   what you can take to the bank(primary functions)
Case study what you can take to the bank(primary functions)
 
Transcript of Presentation(Simple & Compound Interest) for Audience
Transcript of Presentation(Simple & Compound Interest) for AudienceTranscript of Presentation(Simple & Compound Interest) for Audience
Transcript of Presentation(Simple & Compound Interest) for Audience
 
Designpatternscard
DesignpatternscardDesignpatternscard
Designpatternscard
 
Remote DBA Experts 11g Features
Remote DBA Experts 11g FeaturesRemote DBA Experts 11g Features
Remote DBA Experts 11g Features
 
Turbocharge SQL Performance in PL/SQL with Bulk Processing
Turbocharge SQL Performance in PL/SQL with Bulk ProcessingTurbocharge SQL Performance in PL/SQL with Bulk Processing
Turbocharge SQL Performance in PL/SQL with Bulk Processing
 
Oracle - Program with PL/SQL - Lession 18
Oracle - Program with PL/SQL - Lession 18Oracle - Program with PL/SQL - Lession 18
Oracle - Program with PL/SQL - Lession 18
 
Oracle - Program with PL/SQL - Lession 04
Oracle - Program with PL/SQL - Lession 04Oracle - Program with PL/SQL - Lession 04
Oracle - Program with PL/SQL - Lession 04
 
Oracle - Program with PL/SQL - Lession 10
Oracle - Program with PL/SQL - Lession 10Oracle - Program with PL/SQL - Lession 10
Oracle - Program with PL/SQL - Lession 10
 
Oracle - Program with PL/SQL - Lession 07
Oracle - Program with PL/SQL - Lession 07Oracle - Program with PL/SQL - Lession 07
Oracle - Program with PL/SQL - Lession 07
 

Similar to 09 Managing Dependencies

UKOUG2018 - I Know what you did Last Summer [in my Database].pptx
UKOUG2018 - I Know what you did Last Summer [in my Database].pptxUKOUG2018 - I Know what you did Last Summer [in my Database].pptx
UKOUG2018 - I Know what you did Last Summer [in my Database].pptx
Marco Gralike
 
D17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlD17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlMoeen_uddin
 
Oracle REST Data Services Best Practices/ Overview
Oracle REST Data Services Best Practices/ OverviewOracle REST Data Services Best Practices/ Overview
Oracle REST Data Services Best Practices/ Overview
Kris Rice
 
Java Library for High Speed Streaming Data
Java Library for High Speed Streaming Data Java Library for High Speed Streaming Data
Java Library for High Speed Streaming Data
Oracle Developers
 
Managing Oracle Enterprise Manager Cloud Control 12c with Oracle Clusterware
Managing Oracle Enterprise Manager Cloud Control 12c with Oracle ClusterwareManaging Oracle Enterprise Manager Cloud Control 12c with Oracle Clusterware
Managing Oracle Enterprise Manager Cloud Control 12c with Oracle ClusterwareLeighton Nelson
 
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisationMySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
Mark Swarbrick
 
Belfast JUG 23-10-2013
Belfast JUG 23-10-2013Belfast JUG 23-10-2013
Belfast JUG 23-10-2013
eamonnlong
 
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
HostedbyConfluent
 
Les18-Oracle
Les18-OracleLes18-Oracle
Les18-Oraclesuman1248
 
Leveraging Open Source for Database Development: Database Version Control wit...
Leveraging Open Source for Database Development: Database Version Control wit...Leveraging Open Source for Database Development: Database Version Control wit...
Leveraging Open Source for Database Development: Database Version Control wit...
All Things Open
 
Dataguard presentation
Dataguard presentationDataguard presentation
Dataguard presentation
Vimlendu Kumar
 
Functional reactive programming
Functional reactive programmingFunctional reactive programming
Functional reactive programming
Araf Karsh Hamid
 
Top 20 FAQs on the Autonomous Database
Top 20 FAQs on the Autonomous DatabaseTop 20 FAQs on the Autonomous Database
Top 20 FAQs on the Autonomous Database
Sandesh Rao
 
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckServlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Edward Burns
 
ODTUG Webinar AWR Warehouse
ODTUG Webinar AWR WarehouseODTUG Webinar AWR Warehouse
ODTUG Webinar AWR Warehouse
Kellyn Pot'Vin-Gorman
 
less08.ppt
less08.pptless08.ppt
AWR, ASH with EM13 at HotSos 2016
AWR, ASH with EM13 at HotSos 2016AWR, ASH with EM13 at HotSos 2016
AWR, ASH with EM13 at HotSos 2016
Kellyn Pot'Vin-Gorman
 
ORACLE CORE DBA ONLINE TRAINING
ORACLE CORE DBA ONLINE TRAININGORACLE CORE DBA ONLINE TRAINING
ORACLE CORE DBA ONLINE TRAINING
TRAINING ICON
 
Oracle core dba online training
Oracle core dba online trainingOracle core dba online training
Oracle core dba online training
TRAINING ICON
 

Similar to 09 Managing Dependencies (20)

UKOUG2018 - I Know what you did Last Summer [in my Database].pptx
UKOUG2018 - I Know what you did Last Summer [in my Database].pptxUKOUG2018 - I Know what you did Last Summer [in my Database].pptx
UKOUG2018 - I Know what you did Last Summer [in my Database].pptx
 
D17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlD17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sql
 
Oracle REST Data Services Best Practices/ Overview
Oracle REST Data Services Best Practices/ OverviewOracle REST Data Services Best Practices/ Overview
Oracle REST Data Services Best Practices/ Overview
 
Java Library for High Speed Streaming Data
Java Library for High Speed Streaming Data Java Library for High Speed Streaming Data
Java Library for High Speed Streaming Data
 
Managing Oracle Enterprise Manager Cloud Control 12c with Oracle Clusterware
Managing Oracle Enterprise Manager Cloud Control 12c with Oracle ClusterwareManaging Oracle Enterprise Manager Cloud Control 12c with Oracle Clusterware
Managing Oracle Enterprise Manager Cloud Control 12c with Oracle Clusterware
 
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisationMySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
 
Belfast JUG 23-10-2013
Belfast JUG 23-10-2013Belfast JUG 23-10-2013
Belfast JUG 23-10-2013
 
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
 
Les18-Oracle
Les18-OracleLes18-Oracle
Les18-Oracle
 
Plsql les04
Plsql les04Plsql les04
Plsql les04
 
Leveraging Open Source for Database Development: Database Version Control wit...
Leveraging Open Source for Database Development: Database Version Control wit...Leveraging Open Source for Database Development: Database Version Control wit...
Leveraging Open Source for Database Development: Database Version Control wit...
 
Dataguard presentation
Dataguard presentationDataguard presentation
Dataguard presentation
 
Functional reactive programming
Functional reactive programmingFunctional reactive programming
Functional reactive programming
 
Top 20 FAQs on the Autonomous Database
Top 20 FAQs on the Autonomous DatabaseTop 20 FAQs on the Autonomous Database
Top 20 FAQs on the Autonomous Database
 
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckServlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
 
ODTUG Webinar AWR Warehouse
ODTUG Webinar AWR WarehouseODTUG Webinar AWR Warehouse
ODTUG Webinar AWR Warehouse
 
less08.ppt
less08.pptless08.ppt
less08.ppt
 
AWR, ASH with EM13 at HotSos 2016
AWR, ASH with EM13 at HotSos 2016AWR, ASH with EM13 at HotSos 2016
AWR, ASH with EM13 at HotSos 2016
 
ORACLE CORE DBA ONLINE TRAINING
ORACLE CORE DBA ONLINE TRAININGORACLE CORE DBA ONLINE TRAINING
ORACLE CORE DBA ONLINE TRAINING
 
Oracle core dba online training
Oracle core dba online trainingOracle core dba online training
Oracle core dba online training
 

Recently uploaded

Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 

Recently uploaded (20)

Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 

09 Managing Dependencies

  • 1. Copyright © 2006, Oracle. All rights reserved. Managing Dependencies
  • 2. 9-2 Copyright © 2006, Oracle. All rights reserved. Understanding Dependencies Table View Database trigger Procedure Function Package body Package specification User-defined object and collection types Function Package specification Procedure Sequence Synonym Table View User-defined object and collection types Referenced objectsDependent objects
  • 3. 9-3 Copyright © 2006, Oracle. All rights reserved. Dependencies View or procedure Direct dependency Referenced Indirect dependency Direct dependency Dependent Table Referenced xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv Procedure Dependent
  • 4. 9-4 Copyright © 2006, Oracle. All rights reserved. Local Dependencies xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv vvvvvvvvvvvvvv Procedure View Local references Procedure Table vvvvvvvvvvvvv v xxxxxxxxxxxxx x vvvvvvvvvvvvv v xxxxxxxxxxxxx x vvvvvvvvvvvvv v xxxxxxxxxxxxx x vvvvvvvvvvvvv v Direct local dependency
  • 5. 9-5 Copyright © 2006, Oracle. All rights reserved. xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv vvvvvvvvvvvvvv Procedure View Local references Procedure Table vvvvvvvvvvvvv v xxxxxxxxxxxxx x vvvvvvvvvvvvv v xxxxxxxxxxxxx x vvvvvvvvvvvvv v xxxxxxxxxxxxx x vvvvvvvvvvvvv v Direct local dependency Local Dependencies The Oracle server implicitly recompiles any INVALID object when the object is next called. Definition change INVALIDINVALIDINVALID
  • 6. 9-6 Copyright © 2006, Oracle. All rights reserved. Displaying Direct Dependencies by Using USER_DEPENDENCIES SELECT name, type, referenced_name, referenced_type FROM user_dependencies WHERE referenced_name IN ('EMPLOYEES','EMP_VW' ); … …
  • 7. 9-7 Copyright © 2006, Oracle. All rights reserved. Displaying Direct and Indirect Dependencies 1. Run the script utldtree.sql that creates the objects that enable you to display the direct and indirect dependencies. 2. Execute the DEPTREE_FILL procedure. EXECUTE deptree_fill('TABLE','SCOTT','EMPLOYEES')
  • 8. 9-8 Copyright © 2006, Oracle. All rights reserved. Displaying Dependencies DEPTREE view SELECT nested_level, type, name FROM deptree ORDER BY seq#; … …
  • 9. 9-9 Copyright © 2006, Oracle. All rights reserved. EMPLOYEES table REDUCE_SAL procedure RAISE_SAL procedure Another Scenario of Local Dependencies xxxxxxxxxxxxxxxxxxxxx vvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvv vvvvvvxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxx vvvvvvvvvvvvvvvvvvvvv xxxxxxxxxxxxxxxxxxxxx vvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvv vvvvvvxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxx vvvvvvvvvvvvvvvvvvvvv …
  • 10. 9-10 Copyright © 2006, Oracle. All rights reserved. QUERY_EMP procedure EMPLOYEES public synonym A Scenario of Local Naming Dependencies EMPLOYEES table … … xxxxxxxxxxxxxxxxxxxxx vvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvv vvvvvvxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxx vvvvvvvvvvvvvvvvvvvvv
  • 11. 9-11 Copyright © 2006, Oracle. All rights reserved. Understanding Remote Dependencies xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv Procedure ViewProcedure Table vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv Direct local dependency Direct remote dependency Local and remote references Network
  • 12. 9-12 Copyright © 2006, Oracle. All rights reserved. Understanding Remote Dependencies xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv Procedure ViewProcedure Table vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv Direct local dependency Direct remote dependency Local and remote references Network Definition change INVALIDINVALIDVALID
  • 13. 9-13 Copyright © 2006, Oracle. All rights reserved. Concepts of Remote Dependencies Remote dependencies are governed by the mode that is chosen by the user: • TIMESTAMP checking • SIGNATURE checking
  • 14. 9-14 Copyright © 2006, Oracle. All rights reserved. REMOTE_DEPENDENCIES_MODE Parameter Setting REMOTE_DEPENDENCIES_MODE: • As an init.ora parameter REMOTE_DEPENDENCIES_MODE = value • At the system level ALTER SYSTEM SET REMOTE_DEPENDENCIES_MODE = value • At the session level ALTER SESSION SET REMOTE_DEPENDENCIES_MODE = value
  • 15. 9-15 Copyright © 2006, Oracle. All rights reserved. Remote Dependencies and Time Stamp Mode xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv Procedure ViewProcedure Table vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv Network Network
  • 16. 9-16 Copyright © 2006, Oracle. All rights reserved. xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv Procedure ViewProcedure Table vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv xxxxxxxxxxxxxx vvvvvvvvvvvvvv Network Network Remote Dependencies and Time Stamp Mode Definition change INVALIDINVALIDVALID
  • 17. 9-17 Copyright © 2006, Oracle. All rights reserved. Remote Procedure B Compiles at 8:00 a.m. Remote procedure B Valid Compiles
  • 18. 9-18 Copyright © 2006, Oracle. All rights reserved. Local Procedure A Compiles at 9:00 a.m. Local procedure A Valid Remote procedure B Time stamp of B Valid Time stamp of A Record time stamp of B
  • 19. 9-19 Copyright © 2006, Oracle. All rights reserved. Execute Procedure A Local procedure A Valid Remote procedure B Time stamp of B Valid Time stamp of A Time stamp of B Time stamp comparison Execute B
  • 20. 9-20 Copyright © 2006, Oracle. All rights reserved. Remote Procedure B Recompiled at 11:00 a.m. Valid Compiles Remote procedure B
  • 21. 9-21 Copyright © 2006, Oracle. All rights reserved. Local procedure A Valid Remote procedure B Time stamp of B Valid Time stamp of A Time stamp of B Time stamp comparison ERROR Invalid Execute Procedure A
  • 22. 9-22 Copyright © 2006, Oracle. All rights reserved. Signature Mode • The signature of a procedure is: – The name of the procedure – The data types of the parameters – The modes of the parameters • The signature of the remote procedure is saved in the local procedure. • When executing a dependent procedure, the signature of the referenced remote procedure is compared.
  • 23. 9-23 Copyright © 2006, Oracle. All rights reserved. Recompiling a PL/SQL Program Unit Recompilation: • Is handled automatically through implicit run-time recompilation • Is handled through explicit recompilation with the ALTER statement ALTER PROCEDURE [SCHEMA.]procedure_name COMPILE; ALTER FUNCTION [SCHEMA.]function_name COMPILE; ALTER PACKAGE [SCHEMA.]package_name COMPILE [PACKAGE | SPECIFICATION | BODY]; ALTER TRIGGER trigger_name [COMPILE[DEBUG]];
  • 24. 9-24 Copyright © 2006, Oracle. All rights reserved. Unsuccessful Recompilation Recompiling dependent procedures and functions is unsuccessful when: • The referenced object is dropped or renamed • The data type of the referenced column is changed • The referenced column is dropped • A referenced view is replaced by a view with different columns • The parameter list of a referenced procedure is modified
  • 25. 9-25 Copyright © 2006, Oracle. All rights reserved. Successful Recompilation Recompiling dependent procedures and functions is successful if: • The referenced table has new columns • The data type of referenced columns has not changed • A private table is dropped, but a public table that has the same name and structure exists • The PL/SQL body of a referenced procedure has been modified and recompiled successfully
  • 26. 9-26 Copyright © 2006, Oracle. All rights reserved. Recompilation of Procedures Minimize dependency failures by: • Declaring records with the %ROWTYPE attribute • Declaring variables with the %TYPE attribute • Querying with the SELECT * notation • Including a column list with INSERT statements
  • 27. 9-27 Copyright © 2006, Oracle. All rights reserved. Packages and Dependencies Package body Procedure A definition Definition changed Procedure A declaration Package specification ValidStand-alone procedure Valid
  • 28. 9-28 Copyright © 2006, Oracle. All rights reserved. Package body Procedure A definition Procedure A declaration Package specification Valid Packages and Dependencies Stand-alone procedure Definition changed Invalid
  • 29. Copyright © 2006, Oracle. All rights reserved. Manipulating Large Objects
  • 30. 9-30 Copyright © 2006, Oracle. All rights reserved. What Is a LOB? LOBs are used to store large unstructured data such as text, graphic images, films, and sound waveforms. Photo (BLOB) “Four score and seven years ago our fathers brought forth upon this continent, a new nation, conceived in LIBERTY, and dedicated to the proposition that all men are created equal.” Text (CLOB) Movie (BFILE)
  • 31. 9-31 Copyright © 2006, Oracle. All rights reserved. Contrasting LONG and LOB Data Types LONG and LONG RAW Single LONG column per table Up to 2 GB SELECT returns data Data stored in-line Sequential access to data LOB Multiple LOB columns per table Up to 4 GB SELECT returns locator Data stored in-line or out-of-line Random access to data
  • 32. 9-32 Copyright © 2006, Oracle. All rights reserved. Anatomy of a LOB The LOB column stores a locator to the LOB’s value. LOB locator LOB column of a table LOB value
  • 33. 9-33 Copyright © 2006, Oracle. All rights reserved. Internal LOBs The LOB value is stored in the database. “Four score and seven years ago our fathers brought forth upon this continent, a new nation, conceived in LIBERTY, and dedicated to the proposition that all men are created equal.” CLOB BLOB
  • 34. 9-34 Copyright © 2006, Oracle. All rights reserved. Managing Internal LOBs • To interact fully with LOB, file-like interfaces are provided in: – PL/SQL package DBMS_LOB – Oracle Call Interface (OCI) – Oracle Objects for object linking and embedding (OLE) – Pro*C/C++ and Pro*COBOL precompilers – JDBC (Java Database Connectivity) • The Oracle server provides some support for LOB management through SQL.
  • 35. 9-35 Copyright © 2006, Oracle. All rights reserved. What Are BFILEs? The BFILE data type supports an external or file-based large object as: • Attributes in an object type • Column values in a table Movie (BFILE)
  • 36. 9-36 Copyright © 2006, Oracle. All rights reserved. Securing BFILEs Access permissions User Movie (BFILE)
  • 37. 9-37 Copyright © 2006, Oracle. All rights reserved. A New Database Object: DIRECTORY DIRECTORY LOB_PATH = '/oracle/lob/' User Movie (BFILE)
  • 38. 9-38 Copyright © 2006, Oracle. All rights reserved. Guidelines for Creating DIRECTORY Objects • Do not create DIRECTORY objects on paths with database files. • Limit the number of people who are given the following system privileges: – CREATE ANY DIRECTORY – DROP ANY DIRECTORY • All DIRECTORY objects are owned by SYS. • Create directory paths and properly set permissions before using the DIRECTORY object so that the Oracle server can read the file.
  • 39. 9-39 Copyright © 2006, Oracle. All rights reserved. Managing BFILEs The DBA or the system administrator: 1. Creates an OS directory and supplies files 2. Creates a DIRECTORY object in the database 3. Grants the READ privilege on the DIRECTORY object to appropriate database users The developer or the user: 4. Creates an Oracle table with a column defined as a BFILE data type 5. Inserts rows into the table using the BFILENAME function to populate the BFILE column 6. Writes a PL/SQL subprogram that declares and initializes a LOB locator, and reads BFILE
  • 40. 9-40 Copyright © 2006, Oracle. All rights reserved. Preparing to Use BFILEs 1. Create an OS directory to store the physical data files. 2. Create a DIRECTORY object by using the CREATE DIRECTORY command. 3. Grant the READ privilege on the DIRECTORY object to appropriate users. mkdir /temp/data_files CREATE DIRECTORY data_files AS '/temp/data_files'; GRANT READ ON DIRECTORY data_files TO SCOTT, MANAGER_ROLE, PUBLIC;
  • 41. 9-41 Copyright © 2006, Oracle. All rights reserved. Populating BFILE Columns with SQL • Use the BFILENAME function to initialize a BFILE column. The function syntax is: • Example: – Add a BFILE column to a table. – Update the column using the BFILENAME function. FUNCTION BFILENAME(directory_alias IN VARCHAR2, filename IN VARCHAR2) RETURN BFILE; UPDATE employees SET video = BFILENAME('DATA_FILES', 'King.avi') WHERE employee_id = 100; ALTER TABLE employees ADD video BFILE;
  • 42. 9-42 Copyright © 2006, Oracle. All rights reserved. CREATE FUNCTION get_filesize(file_ptr BFILE) RETURN NUMBER IS file_exists BOOLEAN; length NUMBER:= -1; BEGIN file_exists := DBMS_LOB.FILEEXISTS(file_ptr)=1; IF file_exists THEN DBMS_LOB.FILEOPEN(file_ptr); length := DBMS_LOB.GETLENGTH(file_ptr); DBMS_LOB.FILECLOSE(file_ptr); END IF; RETURN length; END; / Using DBMS_LOB Routines with BFILEs The DBMS_LOB.FILEEXISTS function can verify if the file exists in the OS. The function: • Returns 0 if the file does not exist • Returns 1 if the file does exist
  • 43. 9-43 Copyright © 2006, Oracle. All rights reserved. Migrating from LONG to LOB Oracle Database 10g enables migration of LONG columns to LOB columns. • Data migration consists of the procedure to move existing tables containing LONG columns to use LOBs: • Application migration consists of changing existing LONG applications for using LOBs. ALTER TABLE [<schema>.] <table_name> MODIFY (<long_col_name> {CLOB | BLOB | NCLOB}
  • 44. 9-44 Copyright © 2006, Oracle. All rights reserved. Migrating from LONG to LOB • Implicit conversion: From LONG (LONG RAW) or a VARCHAR2(RAW) variable to a CLOB (BLOB) variable, and vice versa • Explicit conversion: – TO_CLOB() converts LONG, VARCHAR2, and CHAR to CLOB. – TO_BLOB() converts LONG RAW and RAW to BLOB. • Function and procedure parameter passing: – CLOBs and BLOBs as actual parameters – VARCHAR2, LONG, RAW, and LONG RAW are formal parameters, and vice versa. • LOB data is acceptable in most of the SQL and PL/SQL operators and built-in functions.
  • 45. 9-45 Copyright © 2006, Oracle. All rights reserved. DBMS_LOB Package • Working with LOBs often requires the use of the Oracle-supplied DBMS_LOB package. • DBMS_LOB provides routines to access and manipulate internal and external LOBs. • Oracle Database 10g enables retrieving LOB data directly using SQL without a special LOB API. • In PL/SQL, you can define a VARCHAR2 for a CLOB and a RAW for a BLOB.
  • 46. 9-46 Copyright © 2006, Oracle. All rights reserved. DBMS_LOB Package • Modify LOB values: APPEND, COPY, ERASE, TRIM, WRITE, LOADFROMFILE • Read or examine LOB values: GETLENGTH, INSTR, READ, SUBSTR • Specific to BFILEs: FILECLOSE, FILECLOSEALL, FILEEXISTS, FILEGETNAME, FILEISOPEN, FILEOPEN
  • 47. 9-47 Copyright © 2006, Oracle. All rights reserved. DBMS_LOB Package • NULL parameters get NULL returns. • Offsets: – BLOB, BFILE: Measured in bytes – CLOB, NCLOB: Measured in characters • There are no negative values for parameters.
  • 48. 9-48 Copyright © 2006, Oracle. All rights reserved. SET LINESIZE 50 SERVEROUTPUT ON FORMAT WORD_WRAP DECLARE text VARCHAR2(4001); BEGIN SELECT resume INTO text FROM emp_hiredata WHERE employee_id = 170; DBMS_OUTPUT.PUT_LINE('text is: '|| text); END; / Selecting CLOB Values in PL/SQL text is: Date of Birth: 1 June 1956 Resigned = 30 September 2000 PL/SQL procedure successfully completed.
  • 49. 9-49 Copyright © 2006, Oracle. All rights reserved. Removing LOBs • Delete a row containing LOBs: • Disassociate a LOB value from a row: DELETE FROM emp_hiredata WHERE employee_id = 405; UPDATE emp_hiredata SET resume = EMPTY_CLOB() WHERE employee_id = 170;
  • 50. 9-50 Copyright © 2006, Oracle. All rights reserved. Temporary LOBs • Temporary LOBs: – Provide an interface to support creation of LOBs that act like local variables – Can be BLOBs, CLOBs, or NCLOBs – Are not associated with a specific table – Are created using the DBMS_LOB.CREATETEMPORARY procedure – Use DBMS_LOB routines • The lifetime of a temporary LOB is a session. • Temporary LOBs are useful for transforming data in permanent internal LOBs.
  • 51. 9-51 Copyright © 2006, Oracle. All rights reserved. Creating a Temporary LOB PL/SQL procedure to create and test a temporary LOB: CREATE OR REPLACE PROCEDURE is_templob_open( lob IN OUT BLOB, retval OUT INTEGER) IS BEGIN -- create a temporary LOB DBMS_LOB.CREATETEMPORARY (lob, TRUE); -- see if the LOB is open: returns 1 if open retval := DBMS_LOB.ISOPEN (lob); DBMS_OUTPUT.PUT_LINE ( 'The file returned a value...' || retval); -- free the temporary LOB DBMS_LOB.FREETEMPORARY (lob); END; /
  • 52. 9-52 Copyright © 2006, Oracle. All rights reserved. Practice 8: Overview This practice covers the following topics: • Using DEPTREE_FILL and IDEPTREE to view dependencies • Recompiling procedures, functions, and packages • Creating object types using the CLOB and BLOB data types • Creating a table with LOB data types as columns • Using the DBMS_LOB package to populate and interact with the LOB data