|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hai,
Syuppose I have 2 schemas/Users on a single database(s1 and s2) and s1 executes procedure prc1 in s2 which updates the table t1. Also imagine both s1 and s2 have the table t1(same structure). Which table will be updated ??? My vote is for table t1 in schema s2 I would like to know what are the privilleges that controls this condition ? ie,what are the privilleges thats to be given for executing the procedure and updating the tables in another schema ?? |
|
#2
|
||||
|
||||
|
Privileges are like:
GRANT select, insert ON table TO user; GRANT execute ON procedure_name TO user; Which table gets updated is a matter of how the proc is defined (but you can prepend schema to table and get shure of this), basically you can specify: AUTHID DEFINER (the default) run the procedure with the rights of the procedures owner. AUTHID CURRENT_USER run the procedure with the rights of the owner executing the code. CREATE OR REPLACE PROCEDURE proc_name AUTHID DEFINER IS ... More on this subject at 1 2 3
__________________
My blog about OpenSource Databases PDF tutorials about OSS databases, DBMonster ... Please contribute to Open Source Development, fill bug reports!!! Developer Shed eSupport Commented my.ini/my.cnf (PLEASE ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Which Table Will be Updated |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|