Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie: How to prevent a commit

Re: Newbie: How to prevent a commit

From: <yclip_at_my-deja.com>
Date: Wed, 08 Mar 2000 16:09:25 GMT
Message-ID: <8a5tvf$nsp$1@nnrp1.deja.com>


have you tried to set connnection.autocommit==false (syntax?) and check connection.getWarnings < 0
and the con.commit() issued to finally commit?

In article <38B3FE9D.109CE07A_at_edcmail.cr.usgs.gov>,   Brian Peasland <peasland_at_edcmail.cr.usgs.gov> wrote:
> > I am using java (JDBC) to query and update an oracle database. I
would
> > like to revoke myself the privilege, or denying myself the
possibility
> > of executing the sql statements COMMIT or UPDATE.
> >
> > If is sounds a bit strange, the reason why I want to do that, is
> > testing. I want to make sure that I am handling exceptions in my
> > program. If for any reason the user cannot commit, I want to make
sure
> > that the exception is handled.
> >
> > The problem that I have is that I cannot revoke/grant privileges to
> > myself. Moreover, the database is located in an account which
belongs to
> > me. My program is accessing the database, using my username and
> > password. I cannot access it using someone else's password.
Therefore, I
> > don't really know how to handle this.
>
> Why don't you set up a test user? Revoke/grant privileges to the test
> user and test your application that way. If you application is coded
in
> such a way that you can't change the userid/password, how about moving
> the tables to a the test user, creating synonyms, and granting to your
> userid? It's a long way to go, but it can be done.
>
> HTH,
> Brian
>
> --
> ========================================
> Brian Peasland
> Raytheons Systems at
> USGS EROS Data Center
> These opinions are my own and do not
> necessarily reflect the opinions of my
> company!
> ========================================
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Mar 08 2000 - 10:09:25 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US