Pragma restrict_references in pl sql, PL-SQL Programming

Assignment Help:

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;

 


Related Discussions:- Pragma restrict_references in pl sql

Prepare a slq project, Project Description: I want to write some SQL st...

Project Description: I want to write some SQL statements. The things I need are between pages 5-7. The only problem is that i want it till tomorrow. Skills required is SQL

Example of cast operator - sql, Example of Cast Operator So long as C...

Example of Cast Operator So long as CAST is used as shown, we could obtain the total marks for each exam in similar fashion, using SUM (Mark) AS TotalMarks. However, this giv

Authorisations - privileges, Authorisations - Privileges As relational...

Authorisations - Privileges As relational theory is silent on the issue of authorisation, it offers nothing with which SQL's vast edifice in support of what it calls privilege

Oracle development , Write a stored procedure that accepts the post code in...

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

Creating Views, Create a view named CustomerAddresses that shows the shippi...

Create a view named CustomerAddresses that shows the shipping and billing addresses for each customer in the MyGuitarShop database. This view should return these columns from the

Parameter default values, Parameter Default Values As the illustration ...

Parameter Default Values As the illustration below shows, you can initialize the IN parameters to the default values. In that way, you can pass various numbers of actual par

Database values-assignments in pl/sql, Database Values You can use the S...

Database Values You can use the SELECT statement to have the Oracle assign values to a variable. For Each and every item in the select list, there must be a matching, type-compa

Deleting objects in pl sql, Deleting Objects You can use the DELETE st...

Deleting Objects You can use the DELETE statement to eradicate objects from an object table. To eradicate objects selectively, you use the WHERE clause, as shown below: BEG

Use native dynamic sql - improve performance of application, Use Native Dyn...

Use Native Dynamic SQL A few programs (a normal-purpose report writer for illustration) should build and process a variety of SQL statements at run time. Therefore, their full

Union all - sql, UNION ALL - SQL Further varieties of UNION arise when...

UNION ALL - SQL Further varieties of UNION arise when we replace the key word DISTINCT by ALL in any of the foregoing examples, as in Example. ALL specifies that if row r appe

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd