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
Semijoin and Composition - SQL For semijoin, the dyadic relational operator MATCHING, defined thus: r1 MATCHING r2, where r1 and r2 are relations such that r1 JOIN r2 is de

Overview of control structures According to the structure theorem, any computer program can be written by using the basic control structures as shown in figure below. They can b

Implicit Cursor Attributes The Implicit cursor attributes returns the information about the execution of an INSERT, DELETE, UPDATE, or SELECT INTO statement. The cursor attribu

Expressions   An expression is a randomly complex combination of the constants, variables, literals, operators, & function calls. The simplest expression is the single variabl

What Are Cursor Variables  ? The Cursor variables are like C or Pascal pointers that hold the memory location (address) of some item rather of the item itself. Therefore, decl

Operators on Tables and Rows Row Extraction TUPLE FROM r, SQL has row subqueries. These are just like scalar subqueries except that they may specify more than one column.

Organi c Evolution Evolution is a slow continuous, irreversible and natural process of change to give rise to advance and diverse forms of life i.e. formation of new specie

LIKE Operator You use the LIKE operator to compare the character value to a pattern. The Case is significant. LIKE returns the Boolean value TRUE when the character patterns mat

Overriding Default Locking By default, the Oracle locks the data structures for you automatically. Though, you can request exact data locks on rows or tables when it is to you

Controlling Autonomous Transactions The first SQL statement in an autonomous routine starts a transaction. Whenever one transaction ends, the next SQL statement starts the oth