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.

locked by dead process

5 posts in General Discussion Last posting was on 2011-06-16 12:32:26.0Z
Pål F Posted on 2011-06-16 07:15:06.0Z
Sender: ade.4df9ac8f.1804289383@sybase.com
From: Pål F
Newsgroups: sybase.public.ase.general
Subject: locked by dead process
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4df9ad7a.af2.1681692777@sybase.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 16 Jun 2011 00:15:06 -0700
X-Trace: forums-1-dub 1308208506 10.22.241.41 (16 Jun 2011 00:15:06 -0700)
X-Original-Trace: 16 Jun 2011 00:15:06 -0700, 10.22.241.41
Lines: 10
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30270
Article PK: 72452

Hi

I have a lock situation where the spid holding the exclucive
lock no longer exists. I guess I can restart the database
to fix this, but is there a better way?

(Sybase ASE 15.02, Linux)

Regards
Pål


Rob V [ Sybase ] Posted on 2011-06-16 10:21:51.0Z
From: "Rob V [ Sybase ]" <rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY>
Reply-To: rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY
Organization: Sypron BV / TeamSybase / Sybase
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: locked by dead process
References: <4df9ad7a.af2.1681692777@sybase.com>
In-Reply-To: <4df9ad7a.af2.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4df9d93f@forums-1-dub>
Date: 16 Jun 2011 03:21:51 -0700
X-Trace: forums-1-dub 1308219711 10.22.241.152 (16 Jun 2011 03:21:51 -0700)
X-Original-Trace: 16 Jun 2011 03:21:51 -0700, vip152.sybase.com
Lines: 34
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30272
Article PK: 72450


On 16-Jun-2011 09:15, PÃ¥l F wrote:
> Hi
>
> I have a lock situation where the spid holding the exclucive
> lock no longer exists. I guess I can restart the database
> to fix this, but is there a better way?
>
> (Sybase ASE 15.02, Linux)
>
> Regards
> PÃ¥l

You could try "dbcc dbreboot('reboot', 'your-db-name')", but there is no
guarantee that this works. If it doesn't, you have no option but to
reboot the ASE server.

HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Sybase Professional DBA for ASE 15.0/12.5/12.0/11.5/11.0
and Replication Server 15.0.1/12.5 // TeamSybase

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks& Recipes for Sybase ASE" (ASE 15 edition)
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------


Pål F Posted on 2011-06-16 12:32:26.0Z
Sender: ade.4df9ac8f.1804289383@sybase.com
From: Pål F
Newsgroups: sybase.public.ase.general
Subject: Re: locked by dead process
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4df9f7da.1a71.1681692777@sybase.com>
References: <4df9d93f@forums-1-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 16 Jun 2011 05:32:26 -0700
X-Trace: forums-1-dub 1308227546 10.22.241.41 (16 Jun 2011 05:32:26 -0700)
X-Original-Trace: 16 Jun 2011 05:32:26 -0700, 10.22.241.41
Lines: 33
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30275
Article PK: 72455


> You could try "dbcc dbreboot('reboot', 'your-db-name')",
> but there is no guarantee that this works. If it doesn't,
> you have no option but to reboot the ASE server.
>
> HTH,
>
> Rob V.

Hi

Thanks for replying.

I tried your suggestion but got this:
-----
Internal error: Insert into page id 93306 of index id 3 of
table '<tabel>' (id = 1031007723) in database
'<db>' tried to replace undeleted RID (92153,0) at slot 1
and ridposn 0. Try dropping and recreating
the index.
Msg 3414, Level 21, State 2
Server 'dione', Line 1
Database '<db>' (dbid 6): Recovery failed. Check the ASE
errorlog for further information as to the
cause.
DBRECOVER failed for dbid 6
---------- Operation on Database '<db>' Failed ----------

Now the database is marked 'suspect'. Is there anything I
have to do before I reboot, or will the dbatabase be checked
and hopefully unmarked when I restart ASE?

Regards
Pål F


Matthew Posted on 2011-06-16 10:59:15.0Z
From: Matthew <matt.malthusian@gmail.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: locked by dead process
References: <4df9ad7a.af2.1681692777@sybase.com>
In-Reply-To: <4df9ad7a.af2.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4df9e203$1@forums-1-dub>
Date: 16 Jun 2011 03:59:15 -0700
X-Trace: forums-1-dub 1308221955 10.22.241.152 (16 Jun 2011 03:59:15 -0700)
X-Original-Trace: 16 Jun 2011 03:59:15 -0700, vip152.sybase.com
Lines: 30
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30273
Article PK: 72451


On 2011-06-16 09:15, PÃ¥l F wrote:
> Hi
>
> I have a lock situation where the spid holding the exclucive
> lock no longer exists. I guess I can restart the database
> to fix this, but is there a better way?
>
> (Sybase ASE 15.02, Linux)
>
> Regards
> PÃ¥l

You could also try the _unsupported_ dbcc_lockrelease:


dbcc traceon(3604)
go
dbcc lock_release*
go
--Usage: lock_release( spid, { "table", "page", "row" }, locktype = {
--"ex_tab", "sh_page", "up_row", etc. }, dbid, objid [, pageno [, rowno
--] ] [, "force" ] )
--Attempts to release the lock held by the given spid that was badly
--terminated.


*introduced in ASE 12.5.4 ESD #1 / ASE 15.0.2 IR.

/Matthew


Rob V [ Sybase ] Posted on 2011-06-16 11:15:56.0Z
From: "Rob V [ Sybase ]" <rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY>
Reply-To: rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY
Organization: Sypron BV / TeamSybase / Sybase
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: locked by dead process
References: <4df9ad7a.af2.1681692777@sybase.com> <4df9e203$1@forums-1-dub>
In-Reply-To: <4df9e203$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4df9e5ec$1@forums-1-dub>
Date: 16 Jun 2011 04:15:56 -0700
X-Trace: forums-1-dub 1308222956 10.22.241.152 (16 Jun 2011 04:15:56 -0700)
X-Original-Trace: 16 Jun 2011 04:15:56 -0700, vip152.sybase.com
Lines: 58
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30274
Article PK: 72453


On 16-Jun-2011 12:59, Matthew wrote:
> On 2011-06-16 09:15, PÃ¥l F wrote:
>> Hi
>>
>> I have a lock situation where the spid holding the exclucive
>> lock no longer exists. I guess I can restart the database
>> to fix this, but is there a better way?
>>
>> (Sybase ASE 15.02, Linux)
>>
>> Regards
>> PÃ¥l
>
>
> You could also try the _unsupported_ dbcc_lockrelease:
>
>
> dbcc traceon(3604)
> go
> dbcc lock_release*
> go
> --Usage: lock_release( spid, { "table", "page", "row" }, locktype = {
> --"ex_tab", "sh_page", "up_row", etc. }, dbid, objid [, pageno [,
> rowno --] ] [, "force" ] )
> --Attempts to release the lock held by the given spid that was badly
> --terminated.
>
>
> *introduced in ASE 12.5.4 ESD #1 / ASE 15.0.2 IR.
>
> /Matthew

I would not recommend that, since this might cause corruptions to your
database. dbcc lock_release is a diagnostic/testing tool that was never
intended to be used in actual systems. Unfortunately, as these things
go, the information spreads around and the name of the command wrongly
suggests it could be a solution. Formally almost all dbcc commands are
unsupproted, but some are really dangerous, like dbcc lock_release.
For the record, dbcc dbreboot does not have a risk of corruptions.

HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Sybase Professional DBA for ASE 15.0/12.5/12.0/11.5/11.0
and Replication Server 15.0.1/12.5 // TeamSybase

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks& Recipes for Sybase ASE" (ASE 15 edition)
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------