Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Unlock a Row in a Table

5 posts in General Discussion Last posting was on 2006-05-18 13:42:00.0Z
Alan Posted on 2006-05-17 15:26:18.0Z
Sender: 7373.446b3f55.1804289383@sybase.com
From: Alan
Newsgroups: ianywhere.public.general
Subject: Unlock a Row in a Table
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <446b405d.7389.1681692777@sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 17 May 2006 08:25:17 -0700, 10.22.241.42
Lines: 8
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 17 May 2006 08:25:18 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 17 May 2006 08:26:18 -0700
X-Trace: forums-1-dub 1147879578 10.22.108.75 (17 May 2006 08:26:18 -0700)
X-Original-Trace: 17 May 2006 08:26:18 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5346
Article PK: 1398

I am trying to delete a table and I am getting the following
message.

"The table could not be deleted from the database
Serialization Failure: User DBA has the row in tbltest
locked."

How will I unlock the row and delete the table


"Chris Keating(iAnywhere Solutions)" <NoSpamPlease_k_e_a_t_i_n_g Posted on 2006-05-17 16:56:21.0Z
From: "Chris Keating(iAnywhere Solutions)" <NoSpamPlease_k_e_a_t_i_n_g@i_A_n_y_w_h_e_r_e.com>
Organization: iAnywhere Solutions
User-Agent: Thunderbird 1.5.0.2 (Windows/20060308)
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: Unlock a Row in a Table
References: <446b405d.7389.1681692777@sybase.com>
In-Reply-To: <446b405d.7389.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: keating-dm20.sybase.com
X-Original-NNTP-Posting-Host: keating-dm20.sybase.com
Message-ID: <446b55b5$1@forums-1-dub>
Date: 17 May 2006 09:56:21 -0700
X-Trace: forums-1-dub 1147884981 10.25.98.170 (17 May 2006 09:56:21 -0700)
X-Original-Trace: 17 May 2006 09:56:21 -0700, keating-dm20.sybase.com
Lines: 25
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5347
Article PK: 1399

Commit the transaction that is holding the lock. Perhaps you have an
active resultset in Sybase Central, DBISQL or some other source.
--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8

*****************************************************************************
Sign up today for your copy of the SQL Anywhere Studio 9 Developer
Edition =and try out the market-leading database for mobile, embedded
and small to medium sized business environments for free!

http://www.ianywhere.com/promos/deved/index.html

*****************************************************************************

iAnywhere Solutions http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use Case Express to report bugs http://case-express.sybase.com

*****************************************************************************


Alan Posted on 2006-05-17 18:15:55.0Z
Sender: 754a.446b674a.1804289383@sybase.com
From: Alan
Newsgroups: ianywhere.public.general
Subject: Re: Unlock a Row in a Table
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <446b681f.7556.1681692777@sybase.com>
References: <446b55b5$1@forums-1-dub>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 17 May 2006 11:14:55 -0700, 10.22.241.42
Lines: 34
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 17 May 2006 11:14:56 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 17 May 2006 11:15:55 -0700
X-Trace: forums-1-dub 1147889755 10.22.108.75 (17 May 2006 11:15:55 -0700)
X-Original-Trace: 17 May 2006 11:15:55 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5348
Article PK: 1400

Could you explain that further how do I commit the
transaction?
Thanks

> Commit the transaction that is holding the lock. Perhaps
> you have an active resultset in Sybase Central, DBISQL or
> some other source. --
>
> Chris Keating
> Sybase Adaptive Server Anywhere Professional Version 8
>
> **********************************************************
> ******************* Sign up today for your copy of the SQL
> Anywhere Studio 9 Developer Edition =and try out the
> market-leading database for mobile, embedded and small to
> medium sized business environments for free!
>
> http://www.ianywhere.com/promos/deved/index.html
>
> **********************************************************
> *******************
>
> iAnywhere Solutions http://www.iAnywhere.com
>
> ** Please only post to the newsgroup
>
> ** Whitepapers can be found at
> http://www.iAnywhere.com/developer ** EBFs can be found at
> http://downloads.sybase.com/swx/sdmain.stm ** Use Case
> Express to report bugs http://case-express.sybase.com
>
> **********************************************************
> *******************


Nick Elson Posted on 2006-05-17 21:58:54.0Z
From: "Nick Elson" <no_span_nicelson@sybase.com>
Newsgroups: ianywhere.public.general
References: <446b55b5$1@forums-1-dub> <446b681f.7556.1681692777@sybase.com>
Subject: Re: Unlock a Row in a Table
Lines: 52
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
NNTP-Posting-Host: nicelson-m20.sybase.com
X-Original-NNTP-Posting-Host: nicelson-m20.sybase.com
Message-ID: <446b9c9e$1@forums-1-dub>
Date: 17 May 2006 14:58:54 -0700
X-Trace: forums-1-dub 1147903134 10.25.98.215 (17 May 2006 14:58:54 -0700)
X-Original-Trace: 17 May 2006 14:58:54 -0700, nicelson-m20.sybase.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5349
Article PK: 1401

Look into who has it locked.

These operations can often help

call sa_conn_info();
call sa_conn_properties();
call sa_locks( )

and once you find out who that may be, walk over,
tap them on the should and ask them politely.

Disconnecting them works to.

[by the by: the phenomena's proper name is a schema lock]

<Alan> wrote in message news:446b681f.7556.1681692777@sybase.com...
> Could you explain that further how do I commit the
> transaction?
> Thanks
>
>
>> Commit the transaction that is holding the lock. Perhaps
>> you have an active resultset in Sybase Central, DBISQL or
>> some other source. --
>>
>> Chris Keating
>> Sybase Adaptive Server Anywhere Professional Version 8
>>
>> **********************************************************
>> ******************* Sign up today for your copy of the SQL
>> Anywhere Studio 9 Developer Edition =and try out the
>> market-leading database for mobile, embedded and small to
>> medium sized business environments for free!
>>
>> http://www.ianywhere.com/promos/deved/index.html
>>
>> **********************************************************
>> *******************
>>
>> iAnywhere Solutions http://www.iAnywhere.com
>>
>> ** Please only post to the newsgroup
>>
>> ** Whitepapers can be found at
>> http://www.iAnywhere.com/developer ** EBFs can be found at
>> http://downloads.sybase.com/swx/sdmain.stm ** Use Case
>> Express to report bugs http://case-express.sybase.com
>>
>> **********************************************************
>> *******************


Greg Fenton Posted on 2006-05-18 13:42:00.0Z
From: Greg Fenton <greg.fenton_NOSPAM_@ianywhere.com>
Organization: iAnywhere Solutions Inc.
User-Agent: Thunderbird 1.5.0.2 (Windows/20060308)
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: Unlock a Row in a Table
References: <446b55b5$1@forums-1-dub> <446b681f.7556.1681692777@sybase.com>
In-Reply-To: <446b681f.7556.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 10.18.242.44
X-Original-NNTP-Posting-Host: 10.18.242.44
Message-ID: <446c79a8$1@forums-1-dub>
Date: 18 May 2006 06:42:00 -0700
X-Trace: forums-1-dub 1147959720 10.18.242.44 (18 May 2006 06:42:00 -0700)
X-Original-Trace: 18 May 2006 06:42:00 -0700, 10.18.242.44
Lines: 29
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5352
Article PK: 1403


Alan wrote:
> Could you explain that further how do I commit the
> transaction?

Sybase Central and DBISQL sometimes hold locks on the database if you
have used these tools to query the table(s) in question.

With DBISQL, you can simply execute either a COMMIT or a ROLLBACK
statement to end the current transaction which would close any locks
being held. I often use ROLLBACK in dbisql if all I have been doing is
SELECTs (other people tend to use COMMIT, but I'd hate to be committing
a change that I had inadvertently made...)

With Sybase Central it is not always obvious how to "close the
transaction". So I often just disconnect from the database (though
rarely do I find this issue with SC these days).

For any other type of client application, you'll have to determine how
it works. As Nick suggested, the use of sa_locks() and sa_conn_info()
will help you narrow down the "locking culprit".

greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/