Solved

Using Database connection pooling with ADO

Posted on 2002-06-20
8
355 Views
Last Modified: 2012-06-22
Hi,

I'm using Database connection pooling with ADO, by keeping one instance of a Connection object instantiated for each unique user. I'm writing in VC++ 6.0

How can I configure the max number of connections in the Database connection pooling?
How can I get the pool parameters (number of active connections, disconnected connections, etc.)?

Thanks
0
Comment
Question by:bachar
8 Comments
 
LVL 6

Expert Comment

by:Triskelion
Comment Utility
What database brand?
0
 

Author Comment

by:bachar
Comment Utility
Oracle 8.1.7
0
 
LVL 22

Expert Comment

by:CJ_S
Comment Utility
Don't know about Oracle, but I do know that keeping a connection alive for the session of a unique user is bad design. Open the connection when you need the connection and close it again when you are not sure that any database access can occur again. Keep the connection alive as short as possible!

CJ
0
 
LVL 22

Expert Comment

by:CJ_S
Comment Utility
I assume though that Oracle also supports the Microsoft Distributed Transaction coordinator. That way you can see how many calls are being made, how many connections are open etc.

Not sure though if oracle supports it.

CJ
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 47

Accepted Solution

by:
schwertner earned 200 total points
Comment Utility
To  use Connection Pooling in Oracle 8i you have to congigure Oracle Multithreaded Server. It is easy - some changes in init.ora file.

Enabling Connection Pooling
In order to enable the connection pooling, additional parameters must be configured
for MTS_DISPATCHERS. The ideal scenario for connection pooling is networks on
which many clients run interactive “high idle, high search time” applications, such as
messaging and OLAP, and can afford to wait to get connected to a dispatcher. The
additional attributes to set for MTS_DISPATCHERS are detailed in the following
table.

To enable connection pooling, the init.ora
parameter MTS_DISPATCHERS must be configured.
mts_dispatchers =
“(PRO=TCP)(CON=20)(DIS=2)(POO=ON)(TIC=4)(SESS=35)”



POOL (POO)

This attribute is used to enable connection
pooling.
If a number is specified, then connection pooling is enabled for both
incoming and outgoing
network connections, and the number specified is the time-out in ticks
for both incoming and outgoing network connections.
If ON, YES, TRUE, or BOTH is specified, then “connection pooling”
is enabled for both incoming and outgoing network connections, and
the default time-out (set by Net8) is used for both incoming and
outgoing network connections
If IN is specified, then connection pooling is enabled for incoming
network connections, and the default time-out (set by Net8) is used for
incoming network connections.
If OUT is specified, then connection pooling is enabled for outgoing
network connections and the default time-out (set by Net8) is used for
outgoing network connections.
If NO, OFF, or FALSE is specified, then “connection pooling” is
disabled for both incoming and outgoing network connections. POOL
can also be assigned a name-value string such as: “(IN=10)”,
“(OUT=20)”, or “((IN=10)(OUT=20))”, in which case, if an IN
numeric value is specified, then connection pooling is enabled for
incoming connections, and the number specified is the time-out in
ticks for incoming network connections. If an OUT numeric value is
specified, then connection pooling is enabled for outgoing network
connections and the number specified is the time-out in ticks for
outgoing network connections. If the numeric value of a specified
time-out is 0, then the default value (set by Net8) is used.
The default connection pooling is disabled on both incoming and
outgoing network connections.
0
 
LVL 54

Expert Comment

by:nico5038
Comment Utility

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - Answered by: schwertner
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 

Expert Comment

by:Jgould
Comment Utility
Question has been closed as per recommendation

JGould-EE Moderator
0
 
LVL 47

Expert Comment

by:schwertner
Comment Utility
Thank you very much!

 
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now