Showing posts with label asking. Show all posts
Showing posts with label asking. Show all posts

Sunday, March 25, 2012

Connection Pooling Question

Hi,
I was asking in one Technical Test, the question is not exactly like,but i want post the outline of that(because i don't remember the exactone)
Suppose u have connection with Sql Server database, and let say some 30users are already connected (through some aspx page), if one more newrequest is coming, is it created new path or it will reallocate ordestroy existing connection poll and assign??
Can anybody tell me?
if possible please post some of Basic and Adavanced questions regarding Sql Server (with aspx)
Thanks
Jen

It will reallocate the connection depending on how many connections your web server is allowing. If it only allows 30 connections, and they are all being used, the 31st connection will error out. If you are using datasets, those connections are closed so they wont hold the connection open. If you are using a datareader, they are active connections, and will stay open until either you close them yourself (dr.close and oconn.close) or the garbage collector finally collects them.
Let me know if you have any other questions or this didnt help.
Nick

|||Hi
Thanks for help Nick.. Thats enough and i will try to fine some links to explore more about it.
Thanks

Monday, March 19, 2012

Connection issues

Hi all
how about for SQL 2000 Enterprise?
what are the concurrent connections?
the reason I am asking is because I had an issue where we
were getting asp errors/access denied during heavy traffic
to our web servers/db servers.
Our web server and db server are on 2 sep. machines.
Pbviously, the web server connects to the db server.
The web server is on wind.2003.
anyways, that specific day, we got heavy traffic and some
of the connections were timing out. I looked at the SQL
processes in Enterprise Manager and saw that lots of
proccesses were sleeping, so i am not sure what to make of
this. I looked at perfmon and saw that the hardware was up
to spec with no issues...
any ideas? is this a app/coding issue?
thanks
Hi
If a process is sleeping, a connection is established, but no commands have
been sent for execution. This is normal.
During heavy usage, you can check that there is no blocking by running
SP_who2 on the SQL server. Gernerally, a web box will be the limitatzion,
long before a SQL box runs out of power, unless you have an application that
is really badly designed and developed.
Regards
Mike
"Jeff" wrote:

> Hi all
> how about for SQL 2000 Enterprise?
> what are the concurrent connections?
> the reason I am asking is because I had an issue where we
> were getting asp errors/access denied during heavy traffic
> to our web servers/db servers.
> Our web server and db server are on 2 sep. machines.
> Pbviously, the web server connects to the db server.
> The web server is on wind.2003.
> anyways, that specific day, we got heavy traffic and some
> of the connections were timing out. I looked at the SQL
> processes in Enterprise Manager and saw that lots of
> proccesses were sleeping, so i am not sure what to make of
> this. I looked at perfmon and saw that the hardware was up
> to spec with no issues...
> any ideas? is this a app/coding issue?
> thanks
>
>