You could use VPD (virtual private database, AKA fine-grained access control AKA row-level security) to control exactly which rows a given user can delete based on a function using the business rule which determines which rows they are authorized to delete. This works from 8i onward, but there are some nasty 'gotchas', so it shouldn't be done casually (example: use of VPD on a table without authorizing SYSTEM to select from all rows can result in the rows of the table not getting exported).
Regards, Chris Gait On 15 Oct 2002, at 1:10, Charu Joshi wrote: Date sent: Tue, 15 Oct 2002 01:10:50 -0800 To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]> Send reply to: [EMAIL PROTECTED] Organization: Fat City Network Services, San Diego, California > It is meant to be a 'selective' deletion i.e. some rows should be allowed to > delete where as others shouldn't be. Thanks for your replies. > > Regards, > Charu. > > -----Original Message----- > Sent: Monday, October 14, 2002 8:30 PM > To: Multiple recipients of list ORACLE-L > > Why not just remove delete authority from anyone not authorized to delete > from it ?? > > -----Original Message----- > Sent: Monday, October 14, 2002 2:34 PM > To: Multiple recipients of list ORACLE-L > > CREATE OR REPLACE TRIGGER temp_trig BEFORE DELETE ON temp_tab FOR EACH ROW > BEGIN > RAISE_APPLICATION_ERROR(-20000,'Do not delete ...'); > END; > / > > Bala. > -----Original Message----- > Sent: Monday, October 14, 2002 1:14 PM > To: Multiple recipients of list ORACLE-L > > Dear Listers, > > I hope you won't mind a question that (I think) looks unfit for this list: > > "Can we prevent a delete trigger from deleting a row?" > > To make it clear, here's the code for a trigger: > > CREATE OR REPLACE TRIGGER temp_trig BEFORE DELETE ON temp_tab FOR EACH ROW > > ??? > > END; > > What statement should I write in the PL/SQL block, that will prevent the > deletion of the row. > > Thanks & regards, > Charu. > > ********************************************************* > Disclaimer > > This message (including any attachments) contains > confidential information intended for a specific > individual and purpose, and is protected by law. > If you are not the intended recipient, you should > delete this message and are hereby notified that > any disclosure, copying, or distribution of this > message, or the taking of any action based on it, > is strictly prohibited. > > ********************************************************* > Visit us at http://www.mahindrabt.com > > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.com > -- > Author: Charu Joshi > INET: [EMAIL PROTECTED] > > Fat City Network Services -- 858-538-5051 http://www.fatcity.com > San Diego, California -- Mailing list and web hosting services > --------------------------------------------------------------------- > To REMOVE yourself from this mailing list, send an E-Mail message > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in > the message BODY, include a line containing: UNSUB ORACLE-L > (or the name of mailing list you want to be removed from). You may > also send the HELP command for other information (like subscribing). > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.com > -- > Author: Balakrishnan Subramanian > INET: [EMAIL PROTECTED] > > Fat City Network Services -- 858-538-5051 http://www.fatcity.com > San Diego, California -- Mailing list and web hosting services > --------------------------------------------------------------------- > To REMOVE yourself from this mailing list, send an E-Mail message > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in > the message BODY, include a line containing: UNSUB ORACLE-L > (or the name of mailing list you want to be removed from). You may > also send the HELP command for other information (like subscribing). > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.com > -- > Author: Kevin Lange > INET: [EMAIL PROTECTED] > > Fat City Network Services -- 858-538-5051 http://www.fatcity.com > San Diego, California -- Mailing list and web hosting services > --------------------------------------------------------------------- > To REMOVE yourself from this mailing list, send an E-Mail message > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in > the message BODY, include a line containing: UNSUB ORACLE-L > (or the name of mailing list you want to be removed from). You may > also send the HELP command for other information (like subscribing). > > ********************************************************* > Disclaimer > > This message (including any attachments) contains > confidential information intended for a specific > individual and purpose, and is protected by law. > If you are not the intended recipient, you should > delete this message and are hereby notified that > any disclosure, copying, or distribution of this > message, or the taking of any action based on it, > is strictly prohibited. > > ********************************************************* > Visit us at http://www.mahindrabt.com > > > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.com > -- > Author: Charu Joshi > INET: [EMAIL PROTECTED] > > Fat City Network Services -- 858-538-5051 http://www.fatcity.com > San Diego, California -- Mailing list and web hosting services > --------------------------------------------------------------------- > To REMOVE yourself from this mailing list, send an E-Mail message > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in > the message BODY, include a line containing: UNSUB ORACLE-L > (or the name of mailing list you want to be removed from). You may > also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
