Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Creating never expiring DB user accounts in Oracle Oracle
  • Reading parameter file and printing Linux/Unix
  • Clean up Oracle
  • How to connect to Oracle Database with Wallet with Python. Oracle
  • TOP-N Sql to find Nth max or Top N rows Oracle
  • Shuffle an array PHP/MYSQL/Wordpress
  • fkwoindex.sql /* Find FK without Index */ Oracle
  • Windows based Command line mailing program like mailx (Sednmail for windows) PHP/MYSQL/Wordpress
  • Absolute file number and relative file number Oracle
  • find checksum of a file. Linux/Unix
  • To see only files and/or folders using LS command Linux/Unix
  • CPU speed on Linux Linux/Unix
  • To find all disk io ( EMC as well as local) Linux/Unix
  • Database link password in user_db_links Oracle
  • sid_wise_cursor.sql find open cursor basis on username or SID Oracle

EXTPROC

Posted on 23-Jul-2009 By Admin No Comments on EXTPROC

EXTPROC

Scope and Application

A list of the essential components for executing an external procedure is included below, along with a brief description of the role of each.

Database:

Responsible for storing any information required to locate and execute an external procedure (e.g. the location of shared library, number and types of arguments, etc.)

Initiates the call to the procedure via the listener and external procedure agent

Both the library alias and call specification are stored in the database.

Llistener:

Listens for external procedure requests from databases and starts external procedure agent processes (one per session)

External procedure agent:

Accepts information (arguments, shared library location, etc.) from the database, loads the shared library as required, and executes the corresponding function in some other language

Corresponds to the extproc executable which resides in $ORACLE_HOME/bin

User-provided shared library:

Contains the user-written function that implements the desired functionality

Library alias:

Records the location of the shared library within the database

Used in the PL/SQL call specification

External procedure call specification:

Provides a description of the procedure, including its PL/SQL name, arguments and types, and the name of the library alias and the function (written in another language) implementing the procedure, or libunit in the case of a Java class method

External Procedures – Troubleshooting ORA-28575 Errors

A Typical Sequence of Events

The following is a typical sequence of events:

The user invokes the call specification corresponding to an external procedure via PL/SQL or some other programmatic interface.

The database examines the call specification to find the name of the shared library implementing the function, as well as the name of the function and the number and type of the arguments.

The database uses the extproc_connection_data service name in the tnsnames.ora file to contact the external procedure listener.

Note: This step only occurs the first time the external procedure is invoked within a given session. After that, the existing external procedure agent can be contacted directly

The listener starts an external procedure agent process to service the external procedure execution request and returns the address of the new extproc agent to the requesting database.

The database sends the external procedure agent the name of the shared library, the name of the function to invoke, and after performing the required conversions from PL/SQL to another language datatypes, the actual arguments.

The external procedure agent loads the shared library, invokes the appropriate function, converts any returned data from another language datatypes to the corresponding PL/SQL types, and sends the data back to the database.

Oracle, SQL scripts

Post navigation

Previous Post: How to remove blank lines using vi editor command
Next Post: Alter procedure auditing

Related Posts

  • Find execution plan from dba_hist_sql_plan for a specific SQL_ID and PLAN_HASH_VALUE fplan.sql Oracle
  • Test Case for Inserting Multiple (2.3 Million rows in 26 Seconds) Oracle
  • SQL Tracker by SID sqltrackerbysid.sql Oracle
  • On solaris 10, “S” link is not part of $ORACLE_HOME/bin/oracle as default. ( For 9.2.0.8) Oracle
  • Find All internal Parameters Oracle
  • find_open_cur.sql Find open cursorts per session Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Getting started with notebook Python/PySpark
  • cif crons Linux/Unix
  • How to find where datafile is created dbf_info.sql Oracle
  • Rownum with Order by Oracle
  • rm_backup_arch_file.ksh Linux/Unix
  • move_arch_files.ksh /* Good One */ Linux/Unix
  • Find long Running Transaction Linux/Unix
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme