Pragma restrict_references in pl sql, PL-SQL Programming

Using Pragma RESTRICT_REFERENCES:

The function called from the SQL statements should obey certain rules meant to control the side effects. To check for violation of the rules, you can use the RESTRICT_REFERENCES pragma that instructs the compiler to report reads and/or writes to database tables and/or package variables.

Avoiding Deadlocks

In some situations when executing a SQL data definition statement, the outcome is a deadlock.

For illustration, the procedure below causes a deadlock as it attempts to drop itself. To avoid the deadlocks, never try to ALTER or DROP a subprogram or package while you are still using it.

CREATE PROCEDURE calc_bonus (emp_id NUMBER) AS

BEGIN

...

EXECUTE IMMEDIATE 'DROP PROCEDURE calc_bonus';

-- causes "timeout occur while waiting to the lock object" error

END;

 

Posted Date: 10/6/2012 8:37:36 AM | Location : United States







Related Discussions:- Pragma restrict_references in pl sql, Assignment Help, Ask Question on Pragma restrict_references in pl sql, Get Answer, Expert's Help, Pragma restrict_references in pl sql Discussions

Write discussion on Pragma restrict_references in pl sql
Your posts are moderated
Related Questions
Forward Declarations The PL/SQL needs that you declare an identifier before using it. And hence, you should declare a subprogram before calling it. For illustration, the decla

What Is a Package? The package is a schema object that group logically related PL/SQL items, types, and subprograms. The Packages usually have 2 parts, a specification & a bo

Components of an Object Type: An object type encapsulates the operations and data. Therefore, you can declare the methods and attributes in an object type specification, but no

THEO R Y OF ETERNITY OF LIFE (PRAYER - 1880) - The theory of eternity of life, also called the steady-state theory , states that life has ever been in existence as at presen

Example of ADD CONSTRAINT in SQL Example: Alternative formulation for MAX_ENROLMENTS ALTER TABLE IS_ENROLLED_ON ADD CONSTRAINT MAX_ENROLMENTS CHECK ((SELECT COUNT (*)

ORIGIN OF EARTH - BIG-BAN G HYPOTHESIS - Origin of life is linked to origin of earth. Cosmos, the Universe originated 10-20 billion years ago by Big Bang (thermonu

Example of Shorthand for a row constraint Example: Shorthand for a row constraint ALTER TABLE EXAM_MARK ADD CONSTRAINT Mark_in_range CHECK (Mark BETWEEN 0 AND 100);

Predefined Exceptions The internal exception is raised implicitly whenever your PL/SQL program exceeds a system-dependent limit or violates an Oracle rule. Each & every Oracle

What is Cursors how to use it in Real time application ?

Use the MASCOT tables CREDITRS, PORDS and PAYMENTS to write SQL queries to solve the following business problems. These tables / data are available to you via the USQ Oracle server