RE: how to make a delete statement fail

From: Bobak, Mark <Mark.Bobak_at_proquest.com>
Date: Wed, 26 Aug 2009 21:41:37 -0400
Message-ID: <6AFC12B9BFCDEA45B7274C534738067F1C64ED8C_at_AAPQMAILBX02V.proque.st>



How about:
alter tablespace <tablespace_where_that_table_lives> read only;

Obviously, not good on a production system, but since you mentioned this is to test a code path and (presumably) in a development instance, it should work.

-Mark



From: oracle-l-bounce_at_freelists.org [oracle-l-bounce_at_freelists.org] On Behalf Of Joe Smith [joe_dba_at_hotmail.com] Sent: Wednesday, August 26, 2009 21:20
To: oracle-l_at_freelists.org
Subject: how to make a delete statement fail

How do I make a correct DELETE statement fail? I have a developer that wants to test a code branch and he needs a delete statement to fail.

It can’t be locked ( shared or exclusive ) from a separate session or be an incorrect statement or return “0 rows deleted.”

It has to be “delete from table where col = value”. How can I force that to fail?

 thanks.



Windows Live: Keep your friends up to date with what you do online. Find out more.<http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_online:082009>

--

http://www.freelists.org/webpage/oracle-l Received on Wed Aug 26 2009 - 20:41:37 CDT

Original text of this message