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
Mixed Notation The fourth procedure call shows that you can mix the positional and named notation. In this situation, the first parameter uses the positional notation, & the s

Using FIRST and LAST FIRST and LAST return the first and last (minimum and maximum) index numbers in a collection. When the collection is empty, the FIRST and LAST return NULL

Project Description: I want a small relational database to be built. I want the database to have the subsequent information tables: Employee Information Document storage

THEORY OF SPONTANEOUS GENERATION - ABIOGENESIS OR AUTOGENESIS - According to this theory, the existing living communities have originated from non-living organic matter with

Creating a Table Syantax: CREATE TABLE ENROLMENT (StudentId SID, Name   VARCHAR (30) NOT NULL, CourseId CID, PRIMARY KEY (StudentId, CourseId)) ; Explan

Using Operator REF: You can retrieve refs by using the operator REF that, like VALUE, takes as its argument a correlation variable. In the illustration below, you retrieve one

1. Create a procedure called TAX_COST_SP to accomplish the tax calculation task. Keep in mind that the state and subtotal values are inputs into the procedure and the procedure is

Accessing Attributes: You can refer to an attribute only by its name not by its position in the object type. To access or modify the value of an attribute, you can use the dot

Using PRIOR and NEXT The PRIOR(n) returns the index number that precede index n in a collection. The NEXT(n) returns the index number which succeed the index n. If n has no pr

Using Aliases The Select-list items fetched from a cursor related with the %ROWTYPE should have simple names or, if they are expressions, should have aliases. In the example bel