Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 7th, 2005, 02:16 AM
rajavu1 rajavu1 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 1 rajavu1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 51 sec
Reputation Power: 0
Arrow Which Table Will be Updated

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 ??

Reply With Quote
  #2  
Old June 7th, 2005, 06:14 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,826 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 1 Day 11 h 35 m 33 sec
Reputation Power: 278
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Which Table Will be Updated


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway