P. 1
Plsql

Plsql

|Views: 203|Likes:

More info:

Published by: Priyanka Bhadang Palsodkar on Aug 29, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

08/29/2011

pdf

text

original

System privileges are required to Create, Alter, Drop or Execute subprograms.
The keyword PROCEDURE is used to assign such rights on Stored Procedures,
Functions and Packages. System privileges are granted by the user SYSTEM or
SYS

Grant Create (any) PROCEDURE to user_name;
Grant Alter any PROCEDURE to user_name;
Grant Drop any PROCEDURE to user_name;
Grant Execute any PROCEDURE to user_name;

The keyword ANY means that you ca create, alter, drop, or excute your own
subprograms and those in another schema. The keyword ANY is optional for
CREATE.

If a PL SQL subprogram refers to any objects that are not in the same schema,
then you must be granted access to those objects explicitly, not through a role

If you are not the owner of a subprogram, then you must have EXECUTE
privilege on that subprogram.

Providing INDIRECT ACCESS to Data
Suppose EMPLOYEES table in Scheme(user) HEMANT. There is another user
MANOJ and a third USER SALONI. Suppose we need to ensure that SALONI
can access the table EMPLOYEES in the schema HEMANT, but only through a
procedure manoj__proc which is created by the user MANOJ.

DIRECT ACCESS

From Hemant schema grant object –level privilge on the table employees
to user Manoj
Manoj has created the procedure manoj_proc that queries the Employees
table in the schema Hemant

INDIRECT ACCESS

Manoj grants execute privilge to Saloni on his procedure manoj_proc
This Saloni can access

By default subprograms execute under security domain of the owner,
which is called DEFINER’s-RIGHTS.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->