Solved

Using Database connection pooling with ADO

Posted on 2002-06-20
8
358 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 47

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 47

Expert Comment

by:schwertner
ID: 7553032
Thank you very much!

 
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Report events not being triggered 8 113
groupSum6 challenge 6 77
groovy example issue 10 90
How to remove numeric and alpha from an alphanumeric field? 5 72
This is an explanation of a simple data model to help parse a JSON feed
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

920 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

12 Experts available now in Live!

Get 1:1 Help Now