Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

I am using SQL Anywhere 11 and have my database running as a service on Windows XP.

The docs only mention connection pooling for the .Net Provider. I am connecting from PowerBuilder using ODBC.

I will have multiple instances of the app connecting at the time using the same exact connection parameters.

Can this be done?

asked 16 Feb '11, 17:22

Roland%20Smith's gravatar image

Roland Smith
accept rate: 0%

Not sure where "connection pooling" comes into play... you can have as many instances of an application connecting that you want, all at the same time, subject to licensing restrictions.

(16 Feb '11, 19:03) Breck Carter

The complete connection string has to be identical. It includes the APPINFO part in which the process id and thread id is mentioned. So in reality connection pooling is only possible if the connection attempt comes from the same thread in the same process.

EDIT: According to this answer by Ian, the above statement is not completely true:

The generated portion of the AppInfo string is ignored when determining if two connection strings are the same for connection pooling. If a user specified AppInfo parameter is specified, that is included in the comparison.

permanent link

answered 17 Feb '11, 09:16

Martin's gravatar image

accept rate: 14%

edited 15 Nov '11, 10:45

Volker%20Barth's gravatar image

Volker Barth

I've been not aware of that important restriction (but haven't used pooling, either). - If so, and given the typical synchronous execution of DB requests - why would one single thread ever use several connections to the same database at the same time (except for differentiating between read-only and read/write access)? - I guess then the built-in pooling is primarily useful for applications that use their own thread pool for database access: Then each thread might re-use its "own" pooled connection when the thread gets re-activated. - Or do I have missed the point?

(17 Feb '11, 10:39) Volker Barth

@Volker: Application servers on the web, that's who... with a zillion web connections sharing a few database connections.

(17 Feb '11, 10:42) Breck Carter

@Breck: Yes, that's my conclusion. - Don't we all wrote those kind of apps:)

(17 Feb '11, 11:00) Volker Barth

Actually my app could be considered a web app server. It is a web server plugin that runs PowerBuilder code. IIS will have a separate thread for each browser request and the PB code will use the same connection string for every request.

(17 Feb '11, 14:01) Roland Smith

I just checked and the default for AppInfo is empty string. Also by default an unused connection is closed if unused for 60 seconds. So a lightly used app would probably not use a pooled connection.

(17 Feb '11, 14:08) Roland Smith

I'm not sure but I guess connection pooling as a general product feature has been introduced with SA 12.

Cf. the new CPOOL connection parameter.

I don't know whether the general ODBC connection pooling (cf. the ODBC Admin's according tab) works with SQL Anywhere (and if so, how well it works).

permanent link

answered 17 Feb '11, 09:01

Volker%20Barth's gravatar image

Volker Barth
accept rate: 34%

I never noticed the Pooling tab in ODBC Admin. Thanks for pointing it out.

(17 Feb '11, 14:10) Roland Smith
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 16 Feb '11, 17:22

question was seen: 3,991 times

last updated: 15 Nov '11, 10:45