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
Keyword &Parameter Description: index_name: This is an undeclared identifier which can be referenced only within the FORALL statement and only as the collection subscript

Deriving Predicates from Predicates in SQL The corresponding section in the theory book describes how predicates can be derived from predicates using (a) the logical connectiv

FETCH Statement The FETCH statement retrieve rows of data one at a time from the result set of the multi-row query. The data is stored in fields or variables which correspond t

At times, customers make mistakes in submitting their orders and call to cancel the order. Brewbean's wants to create a trigger that automatically updates the stock level of all pr

a. Create a table odetails_new. It has all the attributes of odetails and an additional column called cost, whose values are the product of the quantity and price of the part bein

Write a stored procedure that accepts the post code in which the customer resides as the input parameter. The procedure should then use an explicit cursor to display comprehensive

Using research notes and Oracle documentation plan and execute an upgrade of an installation of Oracle 10g to Oracle 11g release 1. To do this you must show in screen shots and wri

Second Step at defining type SID in SQL CREATE TYPE SID AS VARCHAR(5) ; Explanation: TYPE SID announces that a type named SID is being defined to the system.

Blocks: The fundamental program unit in the PL/SQL is the block. The PL/SQL block is defined by the keywords BEGIN, DECLARE, EXCEPTION, and END. These keywords partition the b

Initializing Objects: Till you initialize an object by calling the constructor for its object type, the object is automatically null. That is, the object itself is null, not me