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.

.Net connector & multithreading

2 posts in General Discussion Last posting was on 2010-02-19 17:16:12.0Z
Igor Karpekin Posted on 2010-02-11 15:46:12.0Z
Sender: 2eae.4b712a07.1804289383@sybase.com
From: Igor Karpekin
Newsgroups: ianywhere.public.general
Subject: .Net connector & multithreading
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4b742644.1c5b.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 11 Feb 2010 07:46:12 -0800
X-Trace: forums-1-dub 1265903172 10.22.241.41 (11 Feb 2010 07:46:12 -0800)
X-Original-Trace: 11 Feb 2010 07:46:12 -0800, 10.22.241.41
Lines: 25
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7893
Article PK: 6922

Hello,
Can you advise - is there any restriction on the
multithreaded calls to SACommand.ExecuteNonQuery() within
the same SAConnection object?

I'll try to descibe the problem:
Application is designed to write relatively large amount of
data to the database. It writes this data to four separate
tables. On aplication initialization, we create four
threads(one per table) with a SACommand object in each &
call Prepare(). Then the threads start gathering data and
saving it to the table, using the prepared saCommand object,
via method ExecuteNonQuery(). We use implicit transaction
mechanism.

Is such design of the database writers acceptable from the
DB point of view? We are experiencing some problems from
time to time with that - hangs, handle leaks - that are
pointing to the ExecuteNonQuery() statement. It starts to
behave better if we disable one of the threads.

We are using SQLAnywhere 11.0.0

Thank you,
Igor.


Jeff Albion [Sybase iAnywhere] Posted on 2010-02-19 17:16:12.0Z
From: "Jeff Albion [Sybase iAnywhere]" <firstname.lastname@ianywhere.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: .Net connector & multithreading
References: <4b742644.1c5b.1681692777@sybase.com>
In-Reply-To: <4b742644.1c5b.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b7ec75c$1@forums-1-dub>
Date: 19 Feb 2010 09:16:12 -0800
X-Trace: forums-1-dub 1266599772 10.22.241.152 (19 Feb 2010 09:16:12 -0800)
X-Original-Trace: 19 Feb 2010 09:16:12 -0800, vip152.sybase.com
Lines: 47
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7903
Article PK: 6932

Hi Igor,

On 2/11/2010 10:46 AM, Igor Karpekin wrote:
> Can you advise - is there any restriction on the
> multithreaded calls to SACommand.ExecuteNonQuery() within
> the same SAConnection object?

I'm not aware of such a limitation.

> I'll try to descibe the problem:
> Application is designed to write relatively large amount of
> data to the database. It writes this data to four separate
> tables. On aplication initialization, we create four
> threads(one per table) with a SACommand object in each&
> call Prepare(). Then the threads start gathering data and
> saving it to the table, using the prepared saCommand object,
> via method ExecuteNonQuery(). We use implicit transaction
> mechanism.

Question: If you have four threads and you create a separate connection
for each thread, do your concurrency issues suddenly "go away"?

> We are experiencing some problems from
> time to time with that - hangs, handle leaks - that are
> pointing to the ExecuteNonQuery() statement. It starts to
> behave better if we disable one of the threads.

Can you be more specific - are you seeing exceptions being thrown in
your application, or are you noticing that the application just "doesn't
respond" sometimes, or...?

> We are using SQLAnywhere 11.0.0

Which exact build? Have you tried 11.0.1.2376 ? Is it the same build
version for both the client and the server?

Regards,

--
Jeff Albion, Sybase iAnywhere

iAnywhere Developer Community :
http://www.sybase.com/developer/library/sql-anywhere-techcorner
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
SQL Anywhere Patches and EBFs :
http://downloads.sybase.com/swd/summary.do?baseprod=144&client=ianywhere&timeframe=0
Report a Bug/Open a Case : http://case-express.sybase.com/cx/