Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

User 'DBA' has the row in table1 locked

820 views
Skip to first unread message

Johnny_Spinner

unread,
Jan 5, 2001, 6:45:06 PM1/5/01
to
Dear All,
I am using sybase central with a visual c front end, occasionlly when I
insert or Update information into tables i get a Message "User 'DBA' has
the row table1 LOCKED".

what are the possible reasons for this, i tried putting a COMMIT after all
the insert or update statements, however the message still appears.

are there any other reasons for this and what can i do to stop this
occuring. the message box does not appear all the time, only occasionally.

any help or suggestions are much appreciated.


thanks in advance

Leo Tohill

unread,
Jan 6, 2001, 10:59:34 AM1/6/01
to
>I am using sybase central with a visual c front end,

I'm not sure what you mean here - Sybase Central is the tool for managing the database.

>occasionlly when I
>insert or Update information into tables i get a Message "User 'DBA' has
>the row table1 LOCKED".

If you are saying that your application sometimes gets this message when Sybase Central is also
open, then I guess it's because Sybase Central is holding a lock. It has an annoying habit of doing
that. You may have to disconnect Sybase Central to release the locks.

Leo Tohill - Team Sybase
>> Please post in newsgroup, not via email <<
Useful links:
Downloads: http://www.sybase.com/developer/mobile/
Submit Bug Reports: http://casexpress.sybase.com/cx/cx.stm?starturl=casemessage.ssc?CASETYPE=Bug

Breck Carter

unread,
Jan 6, 2001, 4:52:56 PM1/6/01
to
Nigel Plowman asked exactly the same question on January 4.

Here's one possibility: You have done a right-mouse "View Data" from
Sybase Central to display a table. That opens a different program
DBISQL which keeps a cursor open on the table it's displaying, and
therefore holds a share lock.

Other programs can update that table OK, but you cannot make any
schema changes in Sybase Central because table definition changes
require absolutely exclusive use of that table.

Please tell us EXACTLY WHAT PROGRAM is getting the error message.
Sybase Central? DBISQL (Interactive SQL)? An application program?

What do you mean "sybase central with a visual c front end"?

Breck

Johnny_Spinner

unread,
Jan 9, 2001, 5:46:00 AM1/9/01
to
The message comes from isql. Sybase Central forms the back-end of a Siemens
SCADA/Control software package called WinCC, the front-end for this package
is written in Visual c. The message arises when we insert information into
tables using Embedded ISQL statements in the c code.

The Messages has an ISQL header, and Says "User Dba has the row in table1
locked".

this error only occurs intermittently and not all the time, i generally
happens when we have no other application running other than WinCC.

Regards,

Johnny

Breck Carter

unread,
Jan 9, 2001, 7:43:09 AM1/9/01
to
Is it possible you have two ISQL sessions running, with blocking set
to 'off', and you have issued different updates to the same row in
both sessions without committing the update in the first session?

Here's how you can demonstrate this with 2 ISQL Windows...

Window 1...

set option blocking = 'off';
update c1 set fld= 1;
select * from c1;

Window 2...

set option blocking = 'off';
update c1 set fld= 2;

-- ASA Error -210: User 'DBA' has the row in 'c1' locked

It might not be two ISQL sessions, it could be ANY other process that
has updated the row and not committed. If you are using SQL Anywhere 7
you can use sa_locks to find out who's locking what.

I don't think the culprit is Sybase Central, though. Try using
different user ids for every connection, that might help as much as
sa_locks.

Breck

0 new messages