By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,586 Members | 2,347 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,586 IT Pros & Developers. It's quick & easy.

Max Connections

P: n/a
Hi Gurus
I came across a small doubt.
Suppose I have Max Connections parameter set to 200.
There are now 200 connections to the database.
Out of these 200 connections 50 are idle.
What will happen if a new user tries to connect to the database?
Whether he will receive error about MAXCONNECTIONS exceeded or he will be
allotted a connection as 50 agents are idle now?

Regards
Praveen

Mar 3 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Praveen_db2 wrote:
Hi Gurus
I came across a small doubt.
Suppose I have Max Connections parameter set to 200.
There are now 200 connections to the database.
Out of these 200 connections 50 are idle.
Are the connections idle, i.e. still opened but not being used at the time
to process SQL statements, or are the agents idle, i.e. not associated with
an application? (agent != connection)
What will happen if a new user tries to connect to the database?
Whether he will receive error about MAXCONNECTIONS exceeded or he will be
allotted a connection as 50 agents are idle now?


If you have 50 agents idle, then the next connect gets one of these agents
and can happily go ahead with its work.

If you have 200 open connections from which 50 are not used at the time (no
SQL processing), then you will get naturally a max-connection-reached
error.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Mar 3 '06 #2

P: n/a
Hi Knut
sorry for not reading this thread earlier.There was some problem in the
message posting and I was not sure that my message ws posted hence same
message got posted 2-3 times.
I am talking about the second situation.In case I have 200 open
connections and 50 are not used for ,say 6 hrs, then what happens in new
connection request.I also thik that it will give an error.I wished to know
about any method which can kill connections which are idle for a
particular no. of hrs. I found a governor utility which seems to do this
work.I am getting through it currently.

Regards
Praveen

Mar 4 '06 #3

P: n/a
Praveen_db2 wrote:
Hi Knut
sorry for not reading this thread earlier.There was some problem in the
message posting and I was not sure that my message ws posted hence same
message got posted 2-3 times.
I am talking about the second situation.In case I have 200 open
connections and 50 are not used for ,say 6 hrs, then what happens in new
connection request.


It depends...

If you have connection concentrator (CC) an agent is assigned to your
connection onle when a transaction (unit of work) is currently in process.

If you don't have CC enabled, it does not matter if a connection is "used"
or not. If the connection is established, it is "in use". So you will get
a max-connections-error in your case. In order to avoid these situations,
you should ensure that unused connections are properly closed.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Mar 6 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.