Powerhouse/AIX- MS-SQL Server locking issues - try a flat file/record lock envelope

Joe Boyle atla38 at dsl.pipex.com
Sun Dec 4 13:46:12 CST 2005


you could create a disam/cisam record or UNIX flat file record and do all of
your read/writes to the table concerned after this record/file has first
been locked by Quick.  

So long as all access read/write access to this table is preceded by first
locking the lock record/file, there should be no conflict; in my experience
locks of this kind are always reliable but you mustn't do any IO before the
record is formally unlocked, as this usually breaks the lock.

When using qtp you would access the lock record/file first, then linking to
the target table/row. As locking is standard in the consistency qtp by
default, a lock will be placed on the lock record/file blocking the attempts
of others looking to update the table row.  
It might be worth updating the lock record/file in addition to the table,
this is because some documentation states that read only files are not
locked. 

I seem to recall that one of the problems with RDB locks is that the second
reader/updater to the table, has to wait to see if the first reader/updater
rolls back their TX, thereby allowing the second reader/updater to proceed;
if there is no rollback the second user usually gets a 'record has
changed...' error.


Regards, Joe.


-----Original Message-----
From: powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com
[mailto:powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com] On Behalf Of
Robert Edis
Sent: 03 December 2005 05:37
To: PowerHouse List
Subject: RE: Powerhouse/AIX- MS-SQL Server locking issues

This sounds like a typical usage of the OpenVMS
mailbox file type.  As this is on MS-DOS/Windows no
such file type is availabl.  Have you thought about
using a semaphore file that is created/deleted by the
respective PH form as required?

Blue

--- "Goparaju, Vidyasagar"
<VGoparaju at tradepointsystems.com> wrote:

> Hi Peter,
>  
> Here is the example that I have been working on. 
>  
> I was able to get thru the 'DEADLOCK' issue with the
> following transaction model. I have tried various
> models. But the following does not result in
> DEADLOCK. But is not complete as per my requirement.
>  
> screen test transaction model dual
> transaction myupdate READ WRITE 
> file shipment_dates in tpsdb designer transaction
> myupdate
>  
> procedure initialize
> begin
>    start transaction myupdate
>    get shipment_dates via file_no,tracing_Date_no
> using 1,1
>    if accessok
>    then begin
>           info message=ascii(file_no) + "  " +
> ascii(time_updated) now resp
>           let time_updated = time_updated + 1
>           put shipment_dates
>           commit
>         end
> end
> build 
>  
> My requirement is when I run the same screen from
> two different sessions
> simultaneously, second session should wait on the
> GET as it should be locked
> by the first one. First one should release the
> record after the commit and
> then second one grabs the record and increments the
> counter. We have this
> type of processing everywhere in the application and
> LOCK before read and
> Unlock/COMMIT after PUT was the only way to do it.
> As we don't have these
> options on SQL Server it is a real pain.
>  
>  
> Thanks for all the input and suggestions.
>  
> Sagar
> TradePoint Systems 
>  
> -----Original Message-----
> From:
>
powerh-l-bounces+vgoparaju=tradepointsystems.com at lists.sowder.com
>
[mailto:powerh-l-bounces+vgoparaju=tradepointsystems.com at lists.sowder.com]On
> Behalf Of Peter Bateman
> Sent: Thursday, December 01, 2005 8:14 PM
> To: powerh-l at lists.sowder.com
> Subject: RE: Powerhouse/AIX- MS-SQL Server locking
> issues
>  
>                    Hi Sagar:
>                  1)   SQL Server needs to have its
> log truncated frequently. 
>                      When it is full SQL Server
> waits for some process to truncate it.
>                      So what looks like a lock wait
> situation may in fact be a log wait
>                      situation.
>        2)                   Try to the place puts to
>  the tables in the same order in each 
>                               screen of a  group of
> related  QUICK screens.
>         3)                   Use AUTOCOMMIT on your
> lookups.
>                       Good luck,
>                       Peter
>  
>  
>  
>  
> Hi 
> Listers,
>  
> We have successfully migrated our application from
> VMS/RMS environment to AIX/Oracle. Except some
> performance issues in some areas we look good there.
>  
> Now we are on to AIX/MS-SQL Server environment under
> the same version of Powerhouse PH.8.43.D1 and
> running the same code with minor changes to fix some
> compilation errors. 
> 
> We are having major problems with locking and
> deadlocks in this environment.
>  
> I have experimented with some transactions within
> Quick, but nothing really works. Not sure whether we
> need any changes on the ODBC connection, database
> end or Powerhouse.
>  
> Any suggestions would be greatly appreciated.
>  
> Thanks
> Sagar
> TradePoint Systems
>  
> 
>  
> 
> 
>   _____  
> 
> Free yourself from those irritating pop-up ads with
> MSN Premium: 
> <http://g.msn.com/8HMAENCA/2734??PS=47575> Join now
> and get the first two months FREE*
> 
> STATEMENT OF CONFIDENTIALITY:
> The information contained in this electronic message
> is intended for the exclusive use of the
> addressee(s) and may contain confidential
> information.  If you are not the intended recipient
> of this email, be advised you have received this
> message in error and that any use, dissemination,
> forwarding, printing, or copying is strictly
> prohibited.  Please notify TradePoint Systems LLC
> immediately at (603) 889-3200 and destroy all copies
> of this message and any attachments.
> 
> > -- 
> = = = = = = = = = = = = = = = = = = = = = = = = = =
> = =
> Mailing list: powerh-l at lists.sowder.com
> Subscribe: "subscribe" in message body to
> powerh-l-request at lists.sowder.com
> Unsubscribe: "unsubscribe &lt;password&gt;" in
> message body to powerh-l-request at lists.sowder.com
> http://lists.sowder.com/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you
> must be a subscriber.
> 

-- 
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l at lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request at lists.sowder.com
Unsubscribe: "unsubscribe &lt;password&gt;" in message body to
powerh-l-request at lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.



More information about the powerh-l mailing list