Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: SET SESSION WITH ON_ERROR = ROLLBACK TRANSACTION



Hi Jason,

    According to the manual the answer is a big yes. You can include any set
    statement in any of the startup environment variables or files included by
    by those variables.

    eg. My startsql script is:
    set lockmode session where readlock = nolock, maxlocks=900;
    set maxio 40000;
    set maxrow 60000;
    set session with on_error = rollback transaction;

    Martin Bowes
> 
> Hi.
> 
> Can this statement be set with SQL scripts that are run within Ingres Terminal 
> Monitor?
> 
> Jason
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 27 November 2003 12:25 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: lock configuration
> 
> 
> > Hello all,
> >
> > We have an ABF application with around 200 users.
> >
> > When a user comes across a "duplicate key error" - due to some dodgey
> > data, they're not willing to press return to remove the message off the
> > screen until they speak to a techy.
> >
> > At the moment it seems that the system escalates to a table level lock,
> > which then locks out the 200 users.
> >
> > (I'm current reading the manual on locking)
> >
> > So basically, can anyone point me at the right parameters... I thought
> > that the user would only lock the page or record they're currently on.
> 
> What you want to do is add this to your ABF program:
> 
> SET SESSION WITH ON_ERROR = ROLLBACK TRANSACTION;
> 
> somewhere early on.  You might have to use EXECUTE IMMEDIATE, I forget if
> the set session statement ever made it into 4GL.
> What that will do is tell Ingres to abort the transaction instead of the
> statement when something like a dup key occurs.  That way the ABF program
> won't be holding locks while the user is looking at the black-bar message.
> 
> If the ABF code is set up to *depend* on statement level instead of
> transaction level rollback (e.g. if it attempts inserts before updates,
> say), then you are going to have to play some games with the IIseterr()
> routine.  The idea would be to suppress the Ingres FRS message, get back
> to your ABF code which will check for errors (RIGHT???), rollback on
> error, and only then output a message.
> 
> Karl
> 
> 
> 
> 
> 
> ************************************************************************
> The information in this e-mail together with any attachments is
> intended only for the person or entity to which it is addressed
> and may contain confidential and/or privileged material.
> Any form of review, disclosure, modification, distribution
> and/or publication of this e-mail message is prohibited.  
> If you have received this message in error, you are asked to
> inform the sender as quickly as possible and delete this message
> and any copies of this message from your computer and/or your
> computer system network.  
> ************************************************************************
> 
> 


-- 
Random Titus Quote #24:
Whenever you're pissed off, just remember that it's better than being pissed
on.



<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.