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.

Lock table fails without rollback

2 posts in Cluster Last posting was on 2009-01-15 19:13:07.0Z
Charles Posted on 2009-01-15 19:07:40.0Z
Sender: 7651.496f87be.1804289383@sybase.com
From: Charles
Newsgroups: sybase.public.ase.cluster
Subject: Lock table fails without rollback
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <496f897c.76d5.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 15 Jan 2009 11:07:40 -0800
X-Trace: forums-1-dub 1232046460 10.22.241.41 (15 Jan 2009 11:07:40 -0800)
X-Original-Trace: 15 Jan 2009 11:07:40 -0800, 10.22.241.41
Lines: 22
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.cluster:116
Article PK: 48398

Could you tell me what will happen if a table lock couldn't
be obtained when we have a 'rollback' command or haven't a
'rollback' command? If without the 'rollback', will the
'commit transaction' command still be executed?

begin transaction
lock table ace..pre_trade_parm in share mode wait 30

if @@error = 12207
begin
-- rollback
return -100
end

else
begin
....
end
commit transaction


Thanks,


Charles Posted on 2009-01-15 19:13:07.0Z
Sender: 7651.496f87be.1804289383@sybase.com
From: Charles
Newsgroups: sybase.public.ase.cluster
Subject: Re: Lock table fails without rollback
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <496f8ac3.7718.1681692777@sybase.com>
References: <496f897c.76d5.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 15 Jan 2009 11:13:07 -0800
X-Trace: forums-1-dub 1232046787 10.22.241.41 (15 Jan 2009 11:13:07 -0800)
X-Original-Trace: 15 Jan 2009 11:13:07 -0800, 10.22.241.41
Lines: 26
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.cluster:117
Article PK: 48399

Could forum admin please delete this thread? I posted it in
a wrong group. Thank you so much.

> Could you tell me what will happen if a table lock
> couldn't be obtained when we have a 'rollback' command or
> haven't a 'rollback' command? If without the 'rollback',
> will the 'commit transaction' command still be executed?
>
> begin transaction
> lock table ace..pre_trade_parm in share mode wait 30
>
> if @@error = 12207
> begin
> -- rollback
> return -100
> end
>
> else
> begin
> ....
> end
> commit transaction
>
>
> Thanks,