Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Using Database connection pooling with ADO

Posted on 2002-06-20
8
365 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
ID: 7096638
What database brand?
0
 

Author Comment

by:bachar
ID: 7096651
Oracle 8.1.7
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7103211
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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 22

Expert Comment

by:CJ_S
ID: 7103212
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
 
LVL 48

Accepted Solution

by:
schwertner earned 200 total points
ID: 7304130
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
ID: 7515216

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
ID: 7548206
Question has been closed as per recommendation

JGould-EE Moderator
0
 
LVL 48

Expert Comment

by:schwertner
ID: 7553032
Thank you very much!

 
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.

790 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