What are advantages of Stored Procedures?

Answer Posted / p.rajasekar

Procedures provide advantages in the following
areas:
1•security
Stored procedures can help enforce data security.
You can restrict the database operations that users can
perform by allowing them to access data only through
procedures and functions.
For example, you can grant users access to a
procedure that updates a table, but not grant them access
to the table itself. When a user invokes the procedure, the
procedure executes with the privileges of the procedure's
owner. Because users only have the privilege to execute the
procedure and not the privileges to query, update, or
delete from the underlying tables, users can invoke the
procedure, but they cannot arbitrarily manipulate table
data in any other way.

2•performance
Reduces network traffic as compared to no. of
individual SQL sent
Since procedure’s complied form is available in the
database, no compliation step required to execute the code.
If procedure is present in SGA then retrieval from
disk is not required and execution can begin immediately.

3•Memory allocation
Since stored procedures take advantage of shared
memory capabilities of ORACLE, only a single copy of the
procedure needs to be loaded into memory for execution by
multiple users.
4•productivity
Stored procedures increase development
productivity. By designing applications around a common set
of procedures, you can avoid redundant coding and increase
your productivity.

5•Integrity
By developing all of your applications around a
common group of procedures, you can reduce the likelihood
of committing coding errors.

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention what does plv msg allows you to do?

662


How to add new employee details in an employee_details table with the following details

643


What is the usage of when clause in trigger?

565


What are the different types of triggers?

589


What are the 3 types of behavioral triggers?

657






Inline the values in PL/SQL, what does it mean.?

625


What is the difference between inner join and natural join?

508


What are functions in sql?

505


What are the 3 modes of parameter?

675


What is difference between left and right outer join?

517


Why select is used in sql?

514


what is an index? : Sql dba

520


What is dcl in sql?

524


what are the different index configurations a table can have? : Sql dba

566


how to fetch alternate records from a table? : Sql dba

590