Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • How to find where datafile is created dbf_info.sql Oracle
  • How to specify 2 arch location to avoid any kind of DB hanging. Oracle
  • copying/removing directory with all its subdirectory Linux/Unix
  • Goldengate Tutorial Oracle
  • Database link password in user_db_links Oracle
  • How to collect CPU usage on Linux using Shell script Linux/Unix
  • To find explain plan for a statement that occurred in past. Oracle
  • send email from unix mailx with attachment. Linux/Unix
  • get_vmstat.ksh Linux/Unix
  • cache buffer chain latch Oracle
  • Good Link from metalink 1 Oracle
  • replace alphabets using sed Linux/Unix
  • Rman Notes -1 Oracle
  • column level grant syntax Oracle
  • Wait.sql Oracle

Error Handling in Proc

Posted on 21-Oct-2009 By Admin No Comments on Error Handling in Proc

There is a standard way of trapping any SQL or database errors in

Pro*C.This is done using

EXEC SQL WHENEVER SQLERROR DO ;

just ensure that the above statement goes before any sql

statements

whenever an error is encountered , the control goes to the function

function_name

in the body of the function_name , just add a statement along with

other error handling statements, that is

EXEC SQL WHENEVER SQLERROR CONTINUE;

this would prevent the error handler from going into recursion

and finally an infinite loop.

Oracle, SQL scripts

Post navigation

Previous Post: Proc code
Next Post: Oracle 10g for solaris 10

Related Posts

  • Configure ssh authentications for RAC Oracle
  • run this before doing any dbchange pvm_pre_change.sql Oracle
  • ORA-01220 Oracle
  • Find All internal Parameters Oracle
  • useful dg links Oracle
  • fkwoindex.sql /* Find FK without Index */ 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
  • Find_stale_dr.sql finding stale physical DR.. Oracle
  • tab.sql Oracle
  • How does one SELECT a value from a table into a Unix variable? From SQL to Shell Linux/Unix
  • Adding or Dropping Online Redo Log Files When Physical Standby in place Oracle
  • How to remove blank lines using vi editor command Linux/Unix
  • scripts to take listener.log backup Linux/Unix
  • Find long Running Transaction Linux/Unix
  • Getting started with notebook Python/PySpark

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme