[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

No Subject



Hi,

It seems that you got a kind of deadlock. I will try to explain my thinking.
every time you update the table sybase locks the corresponding page of data,
and after a while it is possible that the page you want to read in the
select statement is locked by sybase.
So you can try to begin transaction and commit it every time you update the
table in order to release the locks. if this is not acceptable you can try
to commit the transaction every 50 (or another number) lines.
Note that with Oracle you can't do this kind of select and update on the
same table.

Hope this will help you

Paul Villemagne

-----Message d'origine-----
De : Julie Lawton [mailto:lawton_julie@HOTMAIL.COM]
Envoyé : mardi 28 mars 2000 16:22
À : SQR-USERS@list.iex.net
Objet :


Hi,

I would appreciate any help which anyone can offer me.  I am running SQR
scripts against a Sybase database.

I originally had a problem with an SQR script which produces flat files for
exporting, whereby there were occasions where records were being updated as
being sent when they had not been selected.  This was due to the fact that
the select and update in the SQR file were separate Sybase transactions.
This allowed other Sybase transactions (i.e. record insert) to be done
between the two hence the possibility of records being updated but not
selected.  I have attached a copy of the original SQR file.

I modified the file to call the update script from with the select.  I also
included a begin tran and commit tran and also specified a connection number
on the various begin-selects.  I have attached a copy of the modified SQR
file.

My problem is when trying to run the modified script which selects a large
number of records (around 4000).  The file gets to 106496 bytes and hangs.
I have a large amount (88) of ex_page locks  (when I do sp_Lock).  When I
run the original script, it works, in the sense that it completes, with this
volume of data.

Does anyone have any ideas what could be the cause of my problem?  I would
appreciate any advice.

Thanks

Julie
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com