Showing posts with label servers. Show all posts
Showing posts with label servers. Show all posts

Wednesday, March 28, 2012

MDAC Hot patch

With regards to MS04-003 that just came out a few days ago,does one need to
install this MDAC update on SQL Servers servers and on
clients ? Can I just go ahead and apply it on our production systems without
testing ? If i install it only on the server, does it still leave me
vulnerable if I dont apply it on the clients ? Does this require a server
reboot ?> Can I just go ahead and apply it on our production systems without
quote:

> testing ?

LOL !!!!! Famous last words, if I've ever heard any.
Ideally, you would install the patch on clients and servers in your test
environment, run a battery of sanity tests just to make sure you don't miss
anything. I've witnessed many problems where the client and server had
provider versions out of sync, so you would be best off making sure both the
server and all of its clients have the same version / patch level applied.
NOTHING in your environment should change, ever, without testing first!
You're begging for disaster. Just because it worked for someone else,
doesn't mean it will work for you, unless they have the exact same
network/hardware/software config and are using the exact same applications
and the same users.
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/|||Thanks Aaron... That got me laughing too.. I guess I was serious when I
issued the post and really would have thought about applying without testing
it if I just got a reply from somone stating that its safe..
"Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in message
news:ul1BZ$F3DHA.556@.TK2MSFTNGP11.phx.gbl...
quote:

> LOL !!!!! Famous last words, if I've ever heard any.
> Ideally, you would install the patch on clients and servers in your test
> environment, run a battery of sanity tests just to make sure you don't

miss
quote:

> anything. I've witnessed many problems where the client and server had
> provider versions out of sync, so you would be best off making sure both

the
quote:

> server and all of its clients have the same version / patch level applied.
> NOTHING in your environment should change, ever, without testing first!
> You're begging for disaster. Just because it worked for someone else,
> doesn't mean it will work for you, unless they have the exact same
> network/hardware/software config and are using the exact same applications
> and the same users.
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
>

MDAC Hot patch

With regards to MS04-003 that just came out a few days ago,does one need to
install this MDAC update on SQL Servers servers and on
clients ? Can I just go ahead and apply it on our production systems without
testing ? If i install it only on the server, does it still leave me
vulnerable if I dont apply it on the clients ? Does this require a server
reboot ?> Can I just go ahead and apply it on our production systems without
> testing ?
LOL !!!!! Famous last words, if I've ever heard any.
Ideally, you would install the patch on clients and servers in your test
environment, run a battery of sanity tests just to make sure you don't miss
anything. I've witnessed many problems where the client and server had
provider versions out of sync, so you would be best off making sure both the
server and all of its clients have the same version / patch level applied.
NOTHING in your environment should change, ever, without testing first!
You're begging for disaster. Just because it worked for someone else,
doesn't mean it will work for you, unless they have the exact same
network/hardware/software config and are using the exact same applications
and the same users.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/|||Thanks Aaron... That got me laughing too.. I guess I was serious when I
issued the post and really would have thought about applying without testing
it if I just got a reply from somone stating that its safe..
"Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in message
news:ul1BZ$F3DHA.556@.TK2MSFTNGP11.phx.gbl...
> > Can I just go ahead and apply it on our production systems without
> > testing ?
> LOL !!!!! Famous last words, if I've ever heard any.
> Ideally, you would install the patch on clients and servers in your test
> environment, run a battery of sanity tests just to make sure you don't
miss
> anything. I've witnessed many problems where the client and server had
> provider versions out of sync, so you would be best off making sure both
the
> server and all of its clients have the same version / patch level applied.
> NOTHING in your environment should change, ever, without testing first!
> You're begging for disaster. Just because it worked for someone else,
> doesn't mean it will work for you, unless they have the exact same
> network/hardware/software config and are using the exact same applications
> and the same users.
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
>

MDAC 3.7

I need to install MDAC 3.7 on two of my front end servers. One is Server 2000 with MDAC 2.7, the other is Server 2003 with MDAC 2.8. From my understanding I ned SQL SP3 to get this version of MDAC. The two front end only 1 or 2 components of SQL server on
them, should I stil get the SP for these servers?
Thanks for your time!
I'm not real sure which version of MDAC you are looking for.
There is no MDAC 3.7. The latest version is 2.8. You can
download the latest MDAC version from:
http://msdn.microsoft.com/data/Default.aspx
Having clients and servers in synch with their SP versions
can make troubleshooting easier. It's not a bad idea to have
the clients running with the latest service pack.
-Sue
On Fri, 2 Jul 2004 09:07:02 -0700, "j-me712"
<j-me712@.discussions.microsoft.com> wrote:

>I need to install MDAC 3.7 on two of my front end servers. One is Server 2000 with MDAC 2.7, the other is Server 2003 with MDAC 2.8. From my understanding I ned SQL SP3 to get this version of MDAC. The two front end only 1 or 2 components of SQL server o
n them, should I stil get the SP for these servers?
>Thanks for your time!

MDAC 3.7

I need to install MDAC 3.7 on two of my front end servers. One is Server 200
0 with MDAC 2.7, the other is Server 2003 with MDAC 2.8. From my understandi
ng I ned SQL SP3 to get this version of MDAC. The two front end only 1 or 2
components of SQL server on
them, should I stil get the SP for these servers?
Thanks for your time!I'm not real sure which version of MDAC you are looking for.
There is no MDAC 3.7. The latest version is 2.8. You can
download the latest MDAC version from:
http://msdn.microsoft.com/data/Default.aspx
Having clients and servers in synch with their SP versions
can make troubleshooting easier. It's not a bad idea to have
the clients running with the latest service pack.
-Sue
On Fri, 2 Jul 2004 09:07:02 -0700, "j-me712"
<j-me712@.discussions.microsoft.com> wrote:

>I need to install MDAC 3.7 on two of my front end servers. One is Server 2000 with
MDAC 2.7, the other is Server 2003 with MDAC 2.8. From my understanding I ned SQL SP
3 to get this version of MDAC. The two front end only 1 or 2 components of SQL serve
r o
n them, should I stil get the SP for these servers?
>Thanks for your time!

MDAC 2.8 Install - any issues?

Hi all,
About to start a project to upgrade to MDAC 2.8 from MDAC 2.6 on a number of servers. Has anyone encountered any issues with this? Also, if we do NOT upgrade several client workstations, might we expect problems as a result?

We are aware that we need to patch MDAC for the vulnerability issues, but we are trying to comine this with a server upgrade for servers at risk. Has anyone had experience on a similar project?
Cheers,
DunNot so far, but you should be better off if you can carry the implementation on test environment.

Take a note from this KBA (http://support.microsoft.com/?kbid=828396) about MDAC 2.8.

HTH

Wednesday, March 21, 2012

May not be a SQL question but you may have the answer..

Every once in a while our SQL Servers hiccup or take a blip in the form of
blocking,etc.. and when this happens our Web and Application servers begin
to misbehave and our system engineers begin to reboot these servers to
resolve the issue. They do not have a solid answer, but I think these
servers try to open up more connections and probably consume all threads and
memory( not too sure, just speculating)..
Have you seen this kind of behavior and if so, why is it per your
environment and what have you done to avoid those reboots by making the Web
and app servers smart to know what to do when there are SQL failures? Its
one thing to have SQL conk off which is costly, but then we spend another
good portion of our time rebooting every other non SQL Server too. Sounds
like some bad way of programming but I want to take your inputs to my
programmers/architects.
Thank you
>From your question, i assume that you will never restart SQL Server
services, and only webserver and app's, and if thats the case i have a
strong feeling that SQL Server is not causing the issue. I had seen in
very rare scenerios where SQL will use all the 255 (Default) worker
threads, and if its with memory, by restarting other services, SQL
will not release its memory. Since you are speculating, this info is
just for your understanding.
Also you might want to collect more symptoms as to what is happening
on SQL when you are seeing the issue, like CPU spike, from
sysprocesses check and see if any extensive blocking (though these
might not be related, but getting all symptoms will always give you
answers )
|||Dinu. thanks for the response.
I do know whats happening to SQL, but the problem exacerbates to where the
web and app servers suffer and need to be restarted and want to know how can
we make the app servers smart
<dinu_babu@.hotmail.com> wrote in message
news:1185077813.592904.45890@.e9g2000prf.googlegrou ps.com...
> services, and only webserver and app's, and if thats the case i have a
> strong feeling that SQL Server is not causing the issue. I had seen in
> very rare scenerios where SQL will use all the 255 (Default) worker
> threads, and if its with memory, by restarting other services, SQL
> will not release its memory. Since you are speculating, this info is
> just for your understanding.
> Also you might want to collect more symptoms as to what is happening
> on SQL when you are seeing the issue, like CPU spike, from
> sysprocesses check and see if any extensive blocking (though these
> might not be related, but getting all symptoms will always give you
> answers )
>
|||You are probably on the right track with your speculation. Connections and
commands take longer when there's a network or SQL problem. Without a
governor mechanism in place, client requests can accumulate to the point of
resource starvation and an application restart or server reboot is often the
easiest and fastest way to get things running again.
The effect of network/SQL issues can be mitigated by setting a limit on
concurrent application requests. This assumes applications are coded in
such a way as to be resilient following a problem. For example, a
middle-tier app with a persistent database connections will need to be smart
enough to gracefully retry database connections instead of requiring a
restart. Exception handling needs to be especially thorough and tested
accordingly.
Hope this helps.
Dan Guzman
SQL Server MVP
"Hassan" <hassan@.hotmail.com> wrote in message
news:e77sQu$yHHA.4476@.TK2MSFTNGP06.phx.gbl...
> Every once in a while our SQL Servers hiccup or take a blip in the form of
> blocking,etc.. and when this happens our Web and Application servers begin
> to misbehave and our system engineers begin to reboot these servers to
> resolve the issue. They do not have a solid answer, but I think these
> servers try to open up more connections and probably consume all threads
> and memory( not too sure, just speculating)..
> Have you seen this kind of behavior and if so, why is it per your
> environment and what have you done to avoid those reboots by making the
> Web and app servers smart to know what to do when there are SQL failures?
> Its one thing to have SQL conk off which is costly, but then we spend
> another good portion of our time rebooting every other non SQL Server too.
> Sounds like some bad way of programming but I want to take your inputs to
> my programmers/architects.
> Thank you
>
|||This is what I was looking for to hear and the more I can obtain knowledge
on this area, the better.
Is there any whitepaper or anything on this subject that I can forward to
the devs. Basically they need to know how to make the apps more resilient
and have the right exception handling.
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:C973F7EA-C997-4169-98F5-5ABA025D7772@.microsoft.com...
> You are probably on the right track with your speculation. Connections
> and commands take longer when there's a network or SQL problem. Without a
> governor mechanism in place, client requests can accumulate to the point
> of resource starvation and an application restart or server reboot is
> often the easiest and fastest way to get things running again.
> The effect of network/SQL issues can be mitigated by setting a limit on
> concurrent application requests. This assumes applications are coded in
> such a way as to be resilient following a problem. For example, a
> middle-tier app with a persistent database connections will need to be
> smart enough to gracefully retry database connections instead of requiring
> a restart. Exception handling needs to be especially thorough and tested
> accordingly.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Hassan" <hassan@.hotmail.com> wrote in message
> news:e77sQu$yHHA.4476@.TK2MSFTNGP06.phx.gbl...
>
|||> Is there any whitepaper or anything on this subject that I can forward to
> the devs. Basically they need to know how to make the apps more resilient
> and have the right exception handling.
Here's an article that discusses database mirroring failover retry but the
same retry pattern can be used in general:
http://www.microsoft.com/technet/prodtechnol/sql/bestpractice/implappfailover.mspx
There are many articles on exception handling best practices. Here are a
couple recent ones for .Net.
http://www.ftponline.com/vsm/2007_06/magazine/columns/csharp/default.aspx
http://www.codeproject.com/dotnet/exceptionbestpractices.asp
Hope this helps.
Dan Guzman
SQL Server MVP
"Hassan" <hassan@.hotmail.com> wrote in message
news:uUA94ZJzHHA.748@.TK2MSFTNGP04.phx.gbl...
> This is what I was looking for to hear and the more I can obtain knowledge
> on this area, the better.
> Is there any whitepaper or anything on this subject that I can forward to
> the devs. Basically they need to know how to make the apps more resilient
> and have the right exception handling.
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:C973F7EA-C997-4169-98F5-5ABA025D7772@.microsoft.com...
>
|||On Sat, 21 Jul 2007 17:59:31 -0700, "Hassan" <hassan@.hotmail.com>
wrote:

>Every once in a while our SQL Servers hiccup or take a blip in the form of
>blocking,etc.. and when this happens our Web and Application servers begin
>to misbehave and our system engineers begin to reboot these servers to
>resolve the issue.
If SQL Server connections are being blocked, as shown by EXEC sp_who,
rebooting is an extreme response. The first thing to check for is a
long running task that is holding locks. If there is one connection
doing the blocking then KILL is quicker and more selective than a
reboot. Of course it is best to figure out what that connection is
doing before KILLing it, DBCC INPUTBUFFER can be a start for that.
Roy Harvey
Beacon Falls, CT
|||Roy,
I meant we reboot our web and application servers and not out SQL Servers.
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:hr89a3drmd47bfsvqhn0kkhf13ar92dvto@.4ax.com...
> On Sat, 21 Jul 2007 17:59:31 -0700, "Hassan" <hassan@.hotmail.com>
> wrote:
>
> If SQL Server connections are being blocked, as shown by EXEC sp_who,
> rebooting is an extreme response. The first thing to check for is a
> long running task that is holding locks. If there is one connection
> doing the blocking then KILL is quicker and more selective than a
> reboot. Of course it is best to figure out what that connection is
> doing before KILLing it, DBCC INPUTBUFFER can be a start for that.
> Roy Harvey
> Beacon Falls, CT
|||On Mon, 23 Jul 2007 09:37:11 -0700, "Hassan" <hassan@.hotmail.com>
wrote:

>Roy,
>I meant we reboot our web and application servers and not out SQL Servers.
So that drops all the connections from the client side. It still
seems like it would be worth looking at KILLing a specific connection
rather than taking the application off line long enough for a reboot.
Of course it requires much more knowledge.
Roy Harvey
Beacon Falls, CT
|||Our web and app servers go bonkers and thats what I am trying to figure..
why they do so when there is a small blip on the SQL server ?
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:iop9a3hb9ca2ql3a6hgh3dasp20p33duqf@.4ax.com...
> On Mon, 23 Jul 2007 09:37:11 -0700, "Hassan" <hassan@.hotmail.com>
> wrote:
>
> So that drops all the connections from the client side. It still
> seems like it would be worth looking at KILLing a specific connection
> rather than taking the application off line long enough for a reboot.
> Of course it requires much more knowledge.
> Roy Harvey
> Beacon Falls, CT

May not be a SQL question but you may have the answer..

Every once in a while our SQL Servers hiccup or take a blip in the form of
blocking,etc.. and when this happens our Web and Application servers begin
to misbehave and our system engineers begin to reboot these servers to
resolve the issue. They do not have a solid answer, but I think these
servers try to open up more connections and probably consume all threads and
memory( not too sure, just speculating)..
Have you seen this kind of behavior and if so, why is it per your
environment and what have you done to avoid those reboots by making the Web
and app servers smart to know what to do when there are SQL failures? Its
one thing to have SQL conk off which is costly, but then we spend another
good portion of our time rebooting every other non SQL Server too. Sounds
like some bad way of programming but I want to take your inputs to my
programmers/architects.
Thank you>From your question, i assume that you will never restart SQL Server
services, and only webserver and app's, and if thats the case i have a
strong feeling that SQL Server is not causing the issue. I had seen in
very rare scenerios where SQL will use all the 255 (Default) worker
threads, and if its with memory, by restarting other services, SQL
will not release its memory. Since you are speculating, this info is
just for your understanding.
Also you might want to collect more symptoms as to what is happening
on SQL when you are seeing the issue, like CPU spike, from
sysprocesses check and see if any extensive blocking (though these
might not be related, but getting all symptoms will always give you
answers )|||Dinu. thanks for the response.
I do know whats happening to SQL, but the problem exacerbates to where the
web and app servers suffer and need to be restarted and want to know how can
we make the app servers smart
<dinu_babu@.hotmail.com> wrote in message
news:1185077813.592904.45890@.e9g2000prf.googlegroups.com...
> services, and only webserver and app's, and if thats the case i have a
> strong feeling that SQL Server is not causing the issue. I had seen in
> very rare scenerios where SQL will use all the 255 (Default) worker
> threads, and if its with memory, by restarting other services, SQL
> will not release its memory. Since you are speculating, this info is
> just for your understanding.
> Also you might want to collect more symptoms as to what is happening
> on SQL when you are seeing the issue, like CPU spike, from
> sysprocesses check and see if any extensive blocking (though these
> might not be related, but getting all symptoms will always give you
> answers )
>|||You are probably on the right track with your speculation. Connections and
commands take longer when there's a network or SQL problem. Without a
governor mechanism in place, client requests can accumulate to the point of
resource starvation and an application restart or server reboot is often the
easiest and fastest way to get things running again.
The effect of network/SQL issues can be mitigated by setting a limit on
concurrent application requests. This assumes applications are coded in
such a way as to be resilient following a problem. For example, a
middle-tier app with a persistent database connections will need to be smart
enough to gracefully retry database connections instead of requiring a
restart. Exception handling needs to be especially thorough and tested
accordingly.
Hope this helps.
Dan Guzman
SQL Server MVP
"Hassan" <hassan@.hotmail.com> wrote in message
news:e77sQu$yHHA.4476@.TK2MSFTNGP06.phx.gbl...
> Every once in a while our SQL Servers hiccup or take a blip in the form of
> blocking,etc.. and when this happens our Web and Application servers begin
> to misbehave and our system engineers begin to reboot these servers to
> resolve the issue. They do not have a solid answer, but I think these
> servers try to open up more connections and probably consume all threads
> and memory( not too sure, just speculating)..
> Have you seen this kind of behavior and if so, why is it per your
> environment and what have you done to avoid those reboots by making the
> Web and app servers smart to know what to do when there are SQL failures?
> Its one thing to have SQL conk off which is costly, but then we spend
> another good portion of our time rebooting every other non SQL Server too.
> Sounds like some bad way of programming but I want to take your inputs to
> my programmers/architects.
> Thank you
>|||This is what I was looking for to hear and the more I can obtain knowledge
on this area, the better.
Is there any whitepaper or anything on this subject that I can forward to
the devs. Basically they need to know how to make the apps more resilient
and have the right exception handling.
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:C973F7EA-C997-4169-98F5-5ABA025D7772@.microsoft.com...
> You are probably on the right track with your speculation. Connections
> and commands take longer when there's a network or SQL problem. Without a
> governor mechanism in place, client requests can accumulate to the point
> of resource starvation and an application restart or server reboot is
> often the easiest and fastest way to get things running again.
> The effect of network/SQL issues can be mitigated by setting a limit on
> concurrent application requests. This assumes applications are coded in
> such a way as to be resilient following a problem. For example, a
> middle-tier app with a persistent database connections will need to be
> smart enough to gracefully retry database connections instead of requiring
> a restart. Exception handling needs to be especially thorough and tested
> accordingly.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Hassan" <hassan@.hotmail.com> wrote in message
> news:e77sQu$yHHA.4476@.TK2MSFTNGP06.phx.gbl...
>|||> Is there any whitepaper or anything on this subject that I can forward to
> the devs. Basically they need to know how to make the apps more resilient
> and have the right exception handling.
Here's an article that discusses database mirroring failover retry but the
same retry pattern can be used in general:
http://www.microsoft.com/technet/pr...er.mspx

There are many articles on exception handling best practices. Here are a
couple recent ones for .Net.
http://www.ftponline.com/vsm/2007_0...rp/default.aspx
http://www.codeproject.com/dotnet/e...stpractices.asp
Hope this helps.
Dan Guzman
SQL Server MVP
"Hassan" <hassan@.hotmail.com> wrote in message
news:uUA94ZJzHHA.748@.TK2MSFTNGP04.phx.gbl...
> This is what I was looking for to hear and the more I can obtain knowledge
> on this area, the better.
> Is there any whitepaper or anything on this subject that I can forward to
> the devs. Basically they need to know how to make the apps more resilient
> and have the right exception handling.
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:C973F7EA-C997-4169-98F5-5ABA025D7772@.microsoft.com...
>|||On Sat, 21 Jul 2007 17:59:31 -0700, "Hassan" <hassan@.hotmail.com>
wrote:

>Every once in a while our SQL Servers hiccup or take a blip in the form of
>blocking,etc.. and when this happens our Web and Application servers begin
>to misbehave and our system engineers begin to reboot these servers to
>resolve the issue.
If SQL Server connections are being blocked, as shown by EXEC sp_who,
rebooting is an extreme response. The first thing to check for is a
long running task that is holding locks. If there is one connection
doing the blocking then KILL is quicker and more selective than a
reboot. Of course it is best to figure out what that connection is
doing before KILLing it, DBCC INPUTBUFFER can be a start for that.
Roy Harvey
Beacon Falls, CT|||Roy,
I meant we reboot our web and application servers and not out SQL Servers.
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:hr89a3drmd47bfsvqhn0kkhf13ar92dvto@.
4ax.com...
> On Sat, 21 Jul 2007 17:59:31 -0700, "Hassan" <hassan@.hotmail.com>
> wrote:
>
> If SQL Server connections are being blocked, as shown by EXEC sp_who,
> rebooting is an extreme response. The first thing to check for is a
> long running task that is holding locks. If there is one connection
> doing the blocking then KILL is quicker and more selective than a
> reboot. Of course it is best to figure out what that connection is
> doing before KILLing it, DBCC INPUTBUFFER can be a start for that.
> Roy Harvey
> Beacon Falls, CT|||On Mon, 23 Jul 2007 09:37:11 -0700, "Hassan" <hassan@.hotmail.com>
wrote:

>Roy,
>I meant we reboot our web and application servers and not out SQL Servers.
So that drops all the connections from the client side. It still
seems like it would be worth looking at KILLing a specific connection
rather than taking the application off line long enough for a reboot.
Of course it requires much more knowledge.
Roy Harvey
Beacon Falls, CT|||Our web and app servers go bonkers and thats what I am trying to figure..
why they do so when there is a small blip on the SQL server ?
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:iop9a3hb9ca2ql3a6hgh3dasp20p33duqf@.
4ax.com...
> On Mon, 23 Jul 2007 09:37:11 -0700, "Hassan" <hassan@.hotmail.com>
> wrote:
>
> So that drops all the connections from the client side. It still
> seems like it would be worth looking at KILLing a specific connection
> rather than taking the application off line long enough for a reboot.
> Of course it requires much more knowledge.
> Roy Harvey
> Beacon Falls, CT

May not be a SQL question but you may have the answer..

Every once in a while our SQL Servers hiccup or take a blip in the form of
blocking,etc.. and when this happens our Web and Application servers begin
to misbehave and our system engineers begin to reboot these servers to
resolve the issue. They do not have a solid answer, but I think these
servers try to open up more connections and probably consume all threads and
memory( not too sure, just speculating)..
Have you seen this kind of behavior and if so, why is it per your
environment and what have you done to avoid those reboots by making the Web
and app servers smart to know what to do when there are SQL failures? Its
one thing to have SQL conk off which is costly, but then we spend another
good portion of our time rebooting every other non SQL Server too. Sounds
like some bad way of programming but I want to take your inputs to my
programmers/architects.
Thank you>From your question, i assume that you will never restart SQL Server
services, and only webserver and app's, and if thats the case i have a
strong feeling that SQL Server is not causing the issue. I had seen in
very rare scenerios where SQL will use all the 255 (Default) worker
threads, and if its with memory, by restarting other services, SQL
will not release its memory. Since you are speculating, this info is
just for your understanding.
Also you might want to collect more symptoms as to what is happening
on SQL when you are seeing the issue, like CPU spike, from
sysprocesses check and see if any extensive blocking (though these
might not be related, but getting all symptoms will always give you
answers )|||Dinu. thanks for the response.
I do know whats happening to SQL, but the problem exacerbates to where the
web and app servers suffer and need to be restarted and want to know how can
we make the app servers smart
<dinu_babu@.hotmail.com> wrote in message
news:1185077813.592904.45890@.e9g2000prf.googlegroups.com...
> >From your question, i assume that you will never restart SQL Server
> services, and only webserver and app's, and if thats the case i have a
> strong feeling that SQL Server is not causing the issue. I had seen in
> very rare scenerios where SQL will use all the 255 (Default) worker
> threads, and if its with memory, by restarting other services, SQL
> will not release its memory. Since you are speculating, this info is
> just for your understanding.
> Also you might want to collect more symptoms as to what is happening
> on SQL when you are seeing the issue, like CPU spike, from
> sysprocesses check and see if any extensive blocking (though these
> might not be related, but getting all symptoms will always give you
> answers )
>|||You are probably on the right track with your speculation. Connections and
commands take longer when there's a network or SQL problem. Without a
governor mechanism in place, client requests can accumulate to the point of
resource starvation and an application restart or server reboot is often the
easiest and fastest way to get things running again.
The effect of network/SQL issues can be mitigated by setting a limit on
concurrent application requests. This assumes applications are coded in
such a way as to be resilient following a problem. For example, a
middle-tier app with a persistent database connections will need to be smart
enough to gracefully retry database connections instead of requiring a
restart. Exception handling needs to be especially thorough and tested
accordingly.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Hassan" <hassan@.hotmail.com> wrote in message
news:e77sQu$yHHA.4476@.TK2MSFTNGP06.phx.gbl...
> Every once in a while our SQL Servers hiccup or take a blip in the form of
> blocking,etc.. and when this happens our Web and Application servers begin
> to misbehave and our system engineers begin to reboot these servers to
> resolve the issue. They do not have a solid answer, but I think these
> servers try to open up more connections and probably consume all threads
> and memory( not too sure, just speculating)..
> Have you seen this kind of behavior and if so, why is it per your
> environment and what have you done to avoid those reboots by making the
> Web and app servers smart to know what to do when there are SQL failures?
> Its one thing to have SQL conk off which is costly, but then we spend
> another good portion of our time rebooting every other non SQL Server too.
> Sounds like some bad way of programming but I want to take your inputs to
> my programmers/architects.
> Thank you
>|||This is what I was looking for to hear and the more I can obtain knowledge
on this area, the better.
Is there any whitepaper or anything on this subject that I can forward to
the devs. Basically they need to know how to make the apps more resilient
and have the right exception handling.
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:C973F7EA-C997-4169-98F5-5ABA025D7772@.microsoft.com...
> You are probably on the right track with your speculation. Connections
> and commands take longer when there's a network or SQL problem. Without a
> governor mechanism in place, client requests can accumulate to the point
> of resource starvation and an application restart or server reboot is
> often the easiest and fastest way to get things running again.
> The effect of network/SQL issues can be mitigated by setting a limit on
> concurrent application requests. This assumes applications are coded in
> such a way as to be resilient following a problem. For example, a
> middle-tier app with a persistent database connections will need to be
> smart enough to gracefully retry database connections instead of requiring
> a restart. Exception handling needs to be especially thorough and tested
> accordingly.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Hassan" <hassan@.hotmail.com> wrote in message
> news:e77sQu$yHHA.4476@.TK2MSFTNGP06.phx.gbl...
>> Every once in a while our SQL Servers hiccup or take a blip in the form
>> of blocking,etc.. and when this happens our Web and Application servers
>> begin to misbehave and our system engineers begin to reboot these servers
>> to resolve the issue. They do not have a solid answer, but I think these
>> servers try to open up more connections and probably consume all threads
>> and memory( not too sure, just speculating)..
>> Have you seen this kind of behavior and if so, why is it per your
>> environment and what have you done to avoid those reboots by making the
>> Web and app servers smart to know what to do when there are SQL failures?
>> Its one thing to have SQL conk off which is costly, but then we spend
>> another good portion of our time rebooting every other non SQL Server
>> too. Sounds like some bad way of programming but I want to take your
>> inputs to my programmers/architects.
>> Thank you
>|||> Is there any whitepaper or anything on this subject that I can forward to
> the devs. Basically they need to know how to make the apps more resilient
> and have the right exception handling.
Here's an article that discusses database mirroring failover retry but the
same retry pattern can be used in general:
http://www.microsoft.com/technet/prodtechnol/sql/bestpractice/implappfailover.mspx
There are many articles on exception handling best practices. Here are a
couple recent ones for .Net.
http://www.ftponline.com/vsm/2007_06/magazine/columns/csharp/default.aspx
http://www.codeproject.com/dotnet/exceptionbestpractices.asp
Hope this helps.
Dan Guzman
SQL Server MVP
"Hassan" <hassan@.hotmail.com> wrote in message
news:uUA94ZJzHHA.748@.TK2MSFTNGP04.phx.gbl...
> This is what I was looking for to hear and the more I can obtain knowledge
> on this area, the better.
> Is there any whitepaper or anything on this subject that I can forward to
> the devs. Basically they need to know how to make the apps more resilient
> and have the right exception handling.
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:C973F7EA-C997-4169-98F5-5ABA025D7772@.microsoft.com...
>> You are probably on the right track with your speculation. Connections
>> and commands take longer when there's a network or SQL problem. Without
>> a governor mechanism in place, client requests can accumulate to the
>> point of resource starvation and an application restart or server reboot
>> is often the easiest and fastest way to get things running again.
>> The effect of network/SQL issues can be mitigated by setting a limit on
>> concurrent application requests. This assumes applications are coded in
>> such a way as to be resilient following a problem. For example, a
>> middle-tier app with a persistent database connections will need to be
>> smart enough to gracefully retry database connections instead of
>> requiring a restart. Exception handling needs to be especially thorough
>> and tested accordingly.
>> --
>> Hope this helps.
>> Dan Guzman
>> SQL Server MVP
>> "Hassan" <hassan@.hotmail.com> wrote in message
>> news:e77sQu$yHHA.4476@.TK2MSFTNGP06.phx.gbl...
>> Every once in a while our SQL Servers hiccup or take a blip in the form
>> of blocking,etc.. and when this happens our Web and Application servers
>> begin to misbehave and our system engineers begin to reboot these
>> servers to resolve the issue. They do not have a solid answer, but I
>> think these servers try to open up more connections and probably consume
>> all threads and memory( not too sure, just speculating)..
>> Have you seen this kind of behavior and if so, why is it per your
>> environment and what have you done to avoid those reboots by making the
>> Web and app servers smart to know what to do when there are SQL
>> failures? Its one thing to have SQL conk off which is costly, but then
>> we spend another good portion of our time rebooting every other non SQL
>> Server too. Sounds like some bad way of programming but I want to take
>> your inputs to my programmers/architects.
>> Thank you
>>
>|||On Sat, 21 Jul 2007 17:59:31 -0700, "Hassan" <hassan@.hotmail.com>
wrote:
>Every once in a while our SQL Servers hiccup or take a blip in the form of
>blocking,etc.. and when this happens our Web and Application servers begin
>to misbehave and our system engineers begin to reboot these servers to
>resolve the issue.
If SQL Server connections are being blocked, as shown by EXEC sp_who,
rebooting is an extreme response. The first thing to check for is a
long running task that is holding locks. If there is one connection
doing the blocking then KILL is quicker and more selective than a
reboot. Of course it is best to figure out what that connection is
doing before KILLing it, DBCC INPUTBUFFER can be a start for that.
Roy Harvey
Beacon Falls, CT|||Roy,
I meant we reboot our web and application servers and not out SQL Servers.
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:hr89a3drmd47bfsvqhn0kkhf13ar92dvto@.4ax.com...
> On Sat, 21 Jul 2007 17:59:31 -0700, "Hassan" <hassan@.hotmail.com>
> wrote:
>>Every once in a while our SQL Servers hiccup or take a blip in the form of
>>blocking,etc.. and when this happens our Web and Application servers begin
>>to misbehave and our system engineers begin to reboot these servers to
>>resolve the issue.
> If SQL Server connections are being blocked, as shown by EXEC sp_who,
> rebooting is an extreme response. The first thing to check for is a
> long running task that is holding locks. If there is one connection
> doing the blocking then KILL is quicker and more selective than a
> reboot. Of course it is best to figure out what that connection is
> doing before KILLing it, DBCC INPUTBUFFER can be a start for that.
> Roy Harvey
> Beacon Falls, CT|||On Mon, 23 Jul 2007 09:37:11 -0700, "Hassan" <hassan@.hotmail.com>
wrote:
>Roy,
>I meant we reboot our web and application servers and not out SQL Servers.
So that drops all the connections from the client side. It still
seems like it would be worth looking at KILLing a specific connection
rather than taking the application off line long enough for a reboot.
Of course it requires much more knowledge.
Roy Harvey
Beacon Falls, CT|||Our web and app servers go bonkers and thats what I am trying to figure..
why they do so when there is a small blip on the SQL server ?
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:iop9a3hb9ca2ql3a6hgh3dasp20p33duqf@.4ax.com...
> On Mon, 23 Jul 2007 09:37:11 -0700, "Hassan" <hassan@.hotmail.com>
> wrote:
>>Roy,
>>I meant we reboot our web and application servers and not out SQL Servers.
> So that drops all the connections from the client side. It still
> seems like it would be worth looking at KILLing a specific connection
> rather than taking the application off line long enough for a reboot.
> Of course it requires much more knowledge.
> Roy Harvey
> Beacon Falls, CT

Wednesday, March 7, 2012

Maximum Articles for Transaction Replication SQL 2000 and SQl 2005

Hello,
We are planing to implement transaction replication for 800 DB on SQL 2000
custer (as a publisher) and have seperate servers for Distribution and
Subscriber.
What is the maximum nnumber of articles I can have per DB.
What are the capacity limitations for this type of setup other than hardware
What other areas i need to make sure are in place before this is implemented.
Appreciate any comments
Please advise...
Thanks
Is that 800 databases or 1 db with 800 articles?
800 articles is no problem, I am replicating 850 with no problems, however
all in 1 db.
The problem you will have is on the distributor, you will define 800
publications, and 800 subscriptions - if only replicating to 1 server.
On distributor you will see a seperate exe for each replication agent. And
with trans you will have 1 Log Reader, 1 Snapshot, and 1 Distribution Agent
for each pub. Each exe will try to capture anywhere from 2 to 5Mb of RAM. You
do the math.
Best to test solution before implementation. And only replicate what you
absolutely need...
Good luck - post results if you implement in prod.
ChrisB MCDBA
MSSQLConsulting.com
"KetanB" wrote:

> Hello,
> We are planing to implement transaction replication for 800 DB on SQL 2000
> custer (as a publisher) and have seperate servers for Distribution and
> Subscriber.
> What is the maximum nnumber of articles I can have per DB.
> What are the capacity limitations for this type of setup other than hardware
> What other areas i need to make sure are in place before this is implemented.
> Appreciate any comments
> Please advise...
> Thanks

Monday, February 20, 2012

max worker threads

We have some SQL Servers that receive high number of connections and stored
procedure calls.
Every once in a while, we may have a bad query plan and then one stored proc
blocks the other stored procs and in no time, we are out of worker threads
and no one can connect
Have you come across such situations ? If so, how did you handle it ? Is it
safe to increase the max worker threads ? What are the consequences ?
The default setting for the 'max worker threads' option is 255,But if the
number of user connections surpasses this value the thread pooling will be
used. For example, if the maximum number of the user connections to your SQL
Server box is equal to 255, you can set the 'max worker threads' options to
255, this frees up resources for SQL Server to use elsewhere. If the maximum
number of the user connections to your SQL Server box is equal to 500, you
can set the 'max worker threads' options to 500, this can improve SQL Server
performance because thread pooling will not be used.
In your case , it sounds like it's worth investigating the query plan
problem , as increasing the worker threads will take up extra resources on
your server
Jack Vamvas
"Hassan" <hassan@.hotmail.com> wrote in message
news:OJXF8Sk8FHA.2192@.TK2MSFTNGP14.phx.gbl...
> We have some SQL Servers that receive high number of connections and
stored
> procedure calls.
> Every once in a while, we may have a bad query plan and then one stored
proc
> blocks the other stored procs and in no time, we are out of worker threads
> and no one can connect
> Have you come across such situations ? If so, how did you handle it ? Is
it
> safe to increase the max worker threads ? What are the consequences ?
>
|||Hi Jack
The number of connections is not related to the number of worker threads
quite as simply as you've described.
Connetions only use threads while they're actually executing. When
connections are in idle state (usually a majority of the time in typical
OLTP apps), there are no threads associated with the connection. This
asynchronous design allows any given number of threads to service a far
larger number of connections.
The way to tell if SQL Server is running short on threads is to use the
Windows Perfmon.exe & monitor the process object sqlservr instance's thread
count counter. If the process SQL Server is running has close to 255
threads, it might be worth increasing Max Worker Threads.
In my experience, this is typically when an OLTP application has thousands
of user connections running, as statistically, this translates to ~255
connections executing concurrently therefore requiring at least 255
threads..
As for the original question, it may help to increase the number of workers,
but keep in mind that this means that SQL Server will be able to schedule
that many more threads to perform concurrent work & you need to take into
account your server resources when making this decision. This is a gross
simplification, but in my experience increasing Max Worker Threads past 255
on systems with fewer than 4 CPUs has rarely helped much as these servers
usually don't have the capacity to process in increased concurrent workload
for example. It should hurt much to increase this setting & see for yourself
whether this helps SQL Server get its work done more effieciently or whether
it contributes further to the problem by increasing context switching etc.
HTH
Regards,
Greg Linwood
SQL Server MVP
"Jack Vamvas" <info@.nospam.com> wrote in message
news:dm9qf9$o1r$1@.nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
>
> The default setting for the 'max worker threads' option is 255,But if the
> number of user connections surpasses this value the thread pooling will be
> used. For example, if the maximum number of the user connections to your
> SQL
> Server box is equal to 255, you can set the 'max worker threads' options
> to
> 255, this frees up resources for SQL Server to use elsewhere. If the
> maximum
> number of the user connections to your SQL Server box is equal to 500, you
> can set the 'max worker threads' options to 500, this can improve SQL
> Server
> performance because thread pooling will not be used.
> In your case , it sounds like it's worth investigating the query plan
> problem , as increasing the worker threads will take up extra resources on
> your server
> Jack Vamvas
> "Hassan" <hassan@.hotmail.com> wrote in message
> news:OJXF8Sk8FHA.2192@.TK2MSFTNGP14.phx.gbl...
> stored
> proc
> it
>
|||I looked at the thread counter for sqlservr process and it states around
180.
What does that mean ?
Are there 180 threads running concurrently ?
If so, would that mean that when i run sp_who2 active, i should see a high
number of connections atleast around 180 or so..
Thats not the case.
Can you tell me more ?
"Greg Linwood" <g_linwood@.hotmail.com> wrote in message
news:OwBcDBt8FHA.2576@.TK2MSFTNGP12.phx.gbl...
> Hi Jack
> The number of connections is not related to the number of worker threads
> quite as simply as you've described.
> Connetions only use threads while they're actually executing. When
> connections are in idle state (usually a majority of the time in typical
> OLTP apps), there are no threads associated with the connection. This
> asynchronous design allows any given number of threads to service a far
> larger number of connections.
> The way to tell if SQL Server is running short on threads is to use the
> Windows Perfmon.exe & monitor the process object sqlservr instance's
> thread count counter. If the process SQL Server is running has close to
> 255 threads, it might be worth increasing Max Worker Threads.
> In my experience, this is typically when an OLTP application has thousands
> of user connections running, as statistically, this translates to ~255
> connections executing concurrently therefore requiring at least 255
> threads..
> As for the original question, it may help to increase the number of
> workers, but keep in mind that this means that SQL Server will be able to
> schedule that many more threads to perform concurrent work & you need to
> take into account your server resources when making this decision. This is
> a gross simplification, but in my experience increasing Max Worker Threads
> past 255 on systems with fewer than 4 CPUs has rarely helped much as these
> servers usually don't have the capacity to process in increased concurrent
> workload for example. It should hurt much to increase this setting & see
> for yourself whether this helps SQL Server get its work done more
> effieciently or whether it contributes further to the problem by
> increasing context switching etc.
> HTH
> Regards,
> Greg Linwood
> SQL Server MVP
> "Jack Vamvas" <info@.nospam.com> wrote in message
> news:dm9qf9$o1r$1@.nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
>
|||And after 5 mins, I looked at it and it was 247. But I did sp_who2 active
and saw just 2 user processes running.
Yes its a busy system with 4000 connections but did not appear i was running
under pressure or am I and dont know about it
"Hassan" <hassan@.hotmail.com> wrote in message
news:%23djxvyt8FHA.1140@.tk2msftngp13.phx.gbl...
>I looked at the thread counter for sqlservr process and it states around
>180.
> What does that mean ?
> Are there 180 threads running concurrently ?
> If so, would that mean that when i run sp_who2 active, i should see a high
> number of connections atleast around 180 or so..
> Thats not the case.
> Can you tell me more ?
> "Greg Linwood" <g_linwood@.hotmail.com> wrote in message
> news:OwBcDBt8FHA.2576@.TK2MSFTNGP12.phx.gbl...
>
|||Hi Hassan
180 threads, means exactly that - there are 180 worker threads in SQL Server
windows process. Most would be worker threads (rather than dedicated system
threads), waiting for queries or i/o work to service. Having 180 threads
doesn't imply any system pressure on its own. It does suggest that, of your
~ 4000 connections, you might typically see peaks of ~ 180 queries actually
running concurrently.
It's possible for the # of threads to exceed connections and vice versa due
to the thread pooling model SQL Server uses in its work scheduling engine
(UMS). There's no directl correlation you can draw to assume that the number
of threads is either higher or lower than the number of connections at any
time. It's perfectly reasonable to see more threads than connections for
example where many connections may have been in use but close. The threads
will hang around in the pool for a while before SQL Server decides to trim
the worker pool. I don't have any info on exactly how or when it does this
trimming, but this is a fairly common design in multi-threaded server
programming..
It's certainly far more common to see the # of threads far lower than the #
of connections though, so if you see the # of threads > connections for
extended periods, there's possibly something wrong.
Regards,
Greg Linwood
SQL Server MVP
"Hassan" <hassan@.hotmail.com> wrote in message
news:uqs1e7t8FHA.3880@.TK2MSFTNGP12.phx.gbl...
> And after 5 mins, I looked at it and it was 247. But I did sp_who2 active
> and saw just 2 user processes running.
> Yes its a busy system with 4000 connections but did not appear i was
> running under pressure or am I and dont know about it
>
> "Hassan" <hassan@.hotmail.com> wrote in message
> news:%23djxvyt8FHA.1140@.tk2msftngp13.phx.gbl...
>

max worker threads

We have some SQL Servers that receive high number of connections and stored
procedure calls.
Every once in a while, we may have a bad query plan and then one stored proc
blocks the other stored procs and in no time, we are out of worker threads
and no one can connect
Have you come across such situations ? If so, how did you handle it ? Is it
safe to increase the max worker threads ? What are the consequences ?The default setting for the 'max worker threads' option is 255,But if the
number of user connections surpasses this value the thread pooling will be
used. For example, if the maximum number of the user connections to your SQL
Server box is equal to 255, you can set the 'max worker threads' options to
255, this frees up resources for SQL Server to use elsewhere. If the maximum
number of the user connections to your SQL Server box is equal to 500, you
can set the 'max worker threads' options to 500, this can improve SQL Server
performance because thread pooling will not be used.
In your case , it sounds like it's worth investigating the query plan
problem , as increasing the worker threads will take up extra resources on
your server
Jack Vamvas
"Hassan" <hassan@.hotmail.com> wrote in message
news:OJXF8Sk8FHA.2192@.TK2MSFTNGP14.phx.gbl...
> We have some SQL Servers that receive high number of connections and
stored
> procedure calls.
> Every once in a while, we may have a bad query plan and then one stored
proc
> blocks the other stored procs and in no time, we are out of worker threads
> and no one can connect
> Have you come across such situations ? If so, how did you handle it ? Is
it
> safe to increase the max worker threads ? What are the consequences ?
>|||Hi Jack
The number of connections is not related to the number of worker threads
quite as simply as you've described.
Connetions only use threads while they're actually executing. When
connections are in idle state (usually a majority of the time in typical
OLTP apps), there are no threads associated with the connection. This
asynchronous design allows any given number of threads to service a far
larger number of connections.
The way to tell if SQL Server is running short on threads is to use the
Windows Perfmon.exe & monitor the process object sqlservr instance's thread
count counter. If the process SQL Server is running has close to 255
threads, it might be worth increasing Max Worker Threads.
In my experience, this is typically when an OLTP application has thousands
of user connections running, as statistically, this translates to ~255
connections executing concurrently therefore requiring at least 255
threads..
As for the original question, it may help to increase the number of workers,
but keep in mind that this means that SQL Server will be able to schedule
that many more threads to perform concurrent work & you need to take into
account your server resources when making this decision. This is a gross
simplification, but in my experience increasing Max Worker Threads past 255
on systems with fewer than 4 CPUs has rarely helped much as these servers
usually don't have the capacity to process in increased concurrent workload
for example. It should hurt much to increase this setting & see for yourself
whether this helps SQL Server get its work done more effieciently or whether
it contributes further to the problem by increasing context switching etc.
HTH
Regards,
Greg Linwood
SQL Server MVP
"Jack Vamvas" <info@.nospam.com> wrote in message
news:dm9qf9$o1r$1@.nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
>
> The default setting for the 'max worker threads' option is 255,But if the
> number of user connections surpasses this value the thread pooling will be
> used. For example, if the maximum number of the user connections to your
> SQL
> Server box is equal to 255, you can set the 'max worker threads' options
> to
> 255, this frees up resources for SQL Server to use elsewhere. If the
> maximum
> number of the user connections to your SQL Server box is equal to 500, you
> can set the 'max worker threads' options to 500, this can improve SQL
> Server
> performance because thread pooling will not be used.
> In your case , it sounds like it's worth investigating the query plan
> problem , as increasing the worker threads will take up extra resources on
> your server
> Jack Vamvas
> "Hassan" <hassan@.hotmail.com> wrote in message
> news:OJXF8Sk8FHA.2192@.TK2MSFTNGP14.phx.gbl...
> stored
> proc
> it
>|||I looked at the thread counter for sqlservr process and it states around
180.
What does that mean ?
Are there 180 threads running concurrently ?
If so, would that mean that when i run sp_who2 active, i should see a high
number of connections atleast around 180 or so..
Thats not the case.
Can you tell me more ?
"Greg Linwood" <g_linwood@.hotmail.com> wrote in message
news:OwBcDBt8FHA.2576@.TK2MSFTNGP12.phx.gbl...
> Hi Jack
> The number of connections is not related to the number of worker threads
> quite as simply as you've described.
> Connetions only use threads while they're actually executing. When
> connections are in idle state (usually a majority of the time in typical
> OLTP apps), there are no threads associated with the connection. This
> asynchronous design allows any given number of threads to service a far
> larger number of connections.
> The way to tell if SQL Server is running short on threads is to use the
> Windows Perfmon.exe & monitor the process object sqlservr instance's
> thread count counter. If the process SQL Server is running has close to
> 255 threads, it might be worth increasing Max Worker Threads.
> In my experience, this is typically when an OLTP application has thousands
> of user connections running, as statistically, this translates to ~255
> connections executing concurrently therefore requiring at least 255
> threads..
> As for the original question, it may help to increase the number of
> workers, but keep in mind that this means that SQL Server will be able to
> schedule that many more threads to perform concurrent work & you need to
> take into account your server resources when making this decision. This is
> a gross simplification, but in my experience increasing Max Worker Threads
> past 255 on systems with fewer than 4 CPUs has rarely helped much as these
> servers usually don't have the capacity to process in increased concurrent
> workload for example. It should hurt much to increase this setting & see
> for yourself whether this helps SQL Server get its work done more
> effieciently or whether it contributes further to the problem by
> increasing context switching etc.
> HTH
> Regards,
> Greg Linwood
> SQL Server MVP
> "Jack Vamvas" <info@.nospam.com> wrote in message
> news:dm9qf9$o1r$1@.nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
>|||And after 5 mins, I looked at it and it was 247. But I did sp_who2 active
and saw just 2 user processes running.
Yes its a busy system with 4000 connections but did not appear i was running
under pressure or am I and dont know about it
"Hassan" <hassan@.hotmail.com> wrote in message
news:%23djxvyt8FHA.1140@.tk2msftngp13.phx.gbl...
>I looked at the thread counter for sqlservr process and it states around
>180.
> What does that mean ?
> Are there 180 threads running concurrently ?
> If so, would that mean that when i run sp_who2 active, i should see a high
> number of connections atleast around 180 or so..
> Thats not the case.
> Can you tell me more ?
> "Greg Linwood" <g_linwood@.hotmail.com> wrote in message
> news:OwBcDBt8FHA.2576@.TK2MSFTNGP12.phx.gbl...
>|||Hi Hassan
180 threads, means exactly that - there are 180 worker threads in SQL Server
windows process. Most would be worker threads (rather than dedicated system
threads), waiting for queries or i/o work to service. Having 180 threads
doesn't imply any system pressure on its own. It does suggest that, of your
~ 4000 connections, you might typically see peaks of ~ 180 queries actually
running concurrently.
It's possible for the # of threads to exceed connections and vice versa due
to the thread pooling model SQL Server uses in its work scheduling engine
(UMS). There's no directl correlation you can draw to assume that the number
of threads is either higher or lower than the number of connections at any
time. It's perfectly reasonable to see more threads than connections for
example where many connections may have been in use but close. The threads
will hang around in the pool for a while before SQL Server decides to trim
the worker pool. I don't have any info on exactly how or when it does this
trimming, but this is a fairly common design in multi-threaded server
programming..
It's certainly far more common to see the # of threads far lower than the #
of connections though, so if you see the # of threads > connections for
extended periods, there's possibly something wrong.
Regards,
Greg Linwood
SQL Server MVP
"Hassan" <hassan@.hotmail.com> wrote in message
news:uqs1e7t8FHA.3880@.TK2MSFTNGP12.phx.gbl...
> And after 5 mins, I looked at it and it was 247. But I did sp_who2 active
> and saw just 2 user processes running.
> Yes its a busy system with 4000 connections but did not appear i was
> running under pressure or am I and dont know about it
>
> "Hassan" <hassan@.hotmail.com> wrote in message
> news:%23djxvyt8FHA.1140@.tk2msftngp13.phx.gbl...
>

max worker threads

We have some SQL Servers that receive high number of connections and stored
procedure calls.
Every once in a while, we may have a bad query plan and then one stored proc
blocks the other stored procs and in no time, we are out of worker threads
and no one can connect
Have you come across such situations ? If so, how did you handle it ? Is it
safe to increase the max worker threads ? What are the consequences ?The default setting for the 'max worker threads' option is 255,But if the
number of user connections surpasses this value the thread pooling will be
used. For example, if the maximum number of the user connections to your SQL
Server box is equal to 255, you can set the 'max worker threads' options to
255, this frees up resources for SQL Server to use elsewhere. If the maximum
number of the user connections to your SQL Server box is equal to 500, you
can set the 'max worker threads' options to 500, this can improve SQL Server
performance because thread pooling will not be used.
In your case , it sounds like it's worth investigating the query plan
problem , as increasing the worker threads will take up extra resources on
your server
Jack Vamvas
"Hassan" <hassan@.hotmail.com> wrote in message
news:OJXF8Sk8FHA.2192@.TK2MSFTNGP14.phx.gbl...
> We have some SQL Servers that receive high number of connections and
stored
> procedure calls.
> Every once in a while, we may have a bad query plan and then one stored
proc
> blocks the other stored procs and in no time, we are out of worker threads
> and no one can connect
> Have you come across such situations ? If so, how did you handle it ? Is
it
> safe to increase the max worker threads ? What are the consequences ?
>|||Hi Jack
The number of connections is not related to the number of worker threads
quite as simply as you've described.
Connetions only use threads while they're actually executing. When
connections are in idle state (usually a majority of the time in typical
OLTP apps), there are no threads associated with the connection. This
asynchronous design allows any given number of threads to service a far
larger number of connections.
The way to tell if SQL Server is running short on threads is to use the
Windows Perfmon.exe & monitor the process object sqlservr instance's thread
count counter. If the process SQL Server is running has close to 255
threads, it might be worth increasing Max Worker Threads.
In my experience, this is typically when an OLTP application has thousands
of user connections running, as statistically, this translates to ~255
connections executing concurrently therefore requiring at least 255
threads..
As for the original question, it may help to increase the number of workers,
but keep in mind that this means that SQL Server will be able to schedule
that many more threads to perform concurrent work & you need to take into
account your server resources when making this decision. This is a gross
simplification, but in my experience increasing Max Worker Threads past 255
on systems with fewer than 4 CPUs has rarely helped much as these servers
usually don't have the capacity to process in increased concurrent workload
for example. It should hurt much to increase this setting & see for yourself
whether this helps SQL Server get its work done more effieciently or whether
it contributes further to the problem by increasing context switching etc.
HTH
Regards,
Greg Linwood
SQL Server MVP
"Jack Vamvas" <info@.nospam.com> wrote in message
news:dm9qf9$o1r$1@.nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
>
> The default setting for the 'max worker threads' option is 255,But if the
> number of user connections surpasses this value the thread pooling will be
> used. For example, if the maximum number of the user connections to your
> SQL
> Server box is equal to 255, you can set the 'max worker threads' options
> to
> 255, this frees up resources for SQL Server to use elsewhere. If the
> maximum
> number of the user connections to your SQL Server box is equal to 500, you
> can set the 'max worker threads' options to 500, this can improve SQL
> Server
> performance because thread pooling will not be used.
> In your case , it sounds like it's worth investigating the query plan
> problem , as increasing the worker threads will take up extra resources on
> your server
> Jack Vamvas
> "Hassan" <hassan@.hotmail.com> wrote in message
> news:OJXF8Sk8FHA.2192@.TK2MSFTNGP14.phx.gbl...
>> We have some SQL Servers that receive high number of connections and
> stored
>> procedure calls.
>> Every once in a while, we may have a bad query plan and then one stored
> proc
>> blocks the other stored procs and in no time, we are out of worker
>> threads
>> and no one can connect
>> Have you come across such situations ? If so, how did you handle it ? Is
> it
>> safe to increase the max worker threads ? What are the consequences ?
>>
>|||I looked at the thread counter for sqlservr process and it states around
180.
What does that mean ?
Are there 180 threads running concurrently ?
If so, would that mean that when i run sp_who2 active, i should see a high
number of connections atleast around 180 or so..
Thats not the case.
Can you tell me more ?
"Greg Linwood" <g_linwood@.hotmail.com> wrote in message
news:OwBcDBt8FHA.2576@.TK2MSFTNGP12.phx.gbl...
> Hi Jack
> The number of connections is not related to the number of worker threads
> quite as simply as you've described.
> Connetions only use threads while they're actually executing. When
> connections are in idle state (usually a majority of the time in typical
> OLTP apps), there are no threads associated with the connection. This
> asynchronous design allows any given number of threads to service a far
> larger number of connections.
> The way to tell if SQL Server is running short on threads is to use the
> Windows Perfmon.exe & monitor the process object sqlservr instance's
> thread count counter. If the process SQL Server is running has close to
> 255 threads, it might be worth increasing Max Worker Threads.
> In my experience, this is typically when an OLTP application has thousands
> of user connections running, as statistically, this translates to ~255
> connections executing concurrently therefore requiring at least 255
> threads..
> As for the original question, it may help to increase the number of
> workers, but keep in mind that this means that SQL Server will be able to
> schedule that many more threads to perform concurrent work & you need to
> take into account your server resources when making this decision. This is
> a gross simplification, but in my experience increasing Max Worker Threads
> past 255 on systems with fewer than 4 CPUs has rarely helped much as these
> servers usually don't have the capacity to process in increased concurrent
> workload for example. It should hurt much to increase this setting & see
> for yourself whether this helps SQL Server get its work done more
> effieciently or whether it contributes further to the problem by
> increasing context switching etc.
> HTH
> Regards,
> Greg Linwood
> SQL Server MVP
> "Jack Vamvas" <info@.nospam.com> wrote in message
> news:dm9qf9$o1r$1@.nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
>>
>> The default setting for the 'max worker threads' option is 255,But if the
>> number of user connections surpasses this value the thread pooling will
>> be
>> used. For example, if the maximum number of the user connections to your
>> SQL
>> Server box is equal to 255, you can set the 'max worker threads' options
>> to
>> 255, this frees up resources for SQL Server to use elsewhere. If the
>> maximum
>> number of the user connections to your SQL Server box is equal to 500,
>> you
>> can set the 'max worker threads' options to 500, this can improve SQL
>> Server
>> performance because thread pooling will not be used.
>> In your case , it sounds like it's worth investigating the query plan
>> problem , as increasing the worker threads will take up extra resources
>> on
>> your server
>> Jack Vamvas
>> "Hassan" <hassan@.hotmail.com> wrote in message
>> news:OJXF8Sk8FHA.2192@.TK2MSFTNGP14.phx.gbl...
>> We have some SQL Servers that receive high number of connections and
>> stored
>> procedure calls.
>> Every once in a while, we may have a bad query plan and then one stored
>> proc
>> blocks the other stored procs and in no time, we are out of worker
>> threads
>> and no one can connect
>> Have you come across such situations ? If so, how did you handle it ? Is
>> it
>> safe to increase the max worker threads ? What are the consequences ?
>>
>>
>|||And after 5 mins, I looked at it and it was 247. But I did sp_who2 active
and saw just 2 user processes running.
Yes its a busy system with 4000 connections but did not appear i was running
under pressure or am I and dont know about it
"Hassan" <hassan@.hotmail.com> wrote in message
news:%23djxvyt8FHA.1140@.tk2msftngp13.phx.gbl...
>I looked at the thread counter for sqlservr process and it states around
>180.
> What does that mean ?
> Are there 180 threads running concurrently ?
> If so, would that mean that when i run sp_who2 active, i should see a high
> number of connections atleast around 180 or so..
> Thats not the case.
> Can you tell me more ?
> "Greg Linwood" <g_linwood@.hotmail.com> wrote in message
> news:OwBcDBt8FHA.2576@.TK2MSFTNGP12.phx.gbl...
>> Hi Jack
>> The number of connections is not related to the number of worker threads
>> quite as simply as you've described.
>> Connetions only use threads while they're actually executing. When
>> connections are in idle state (usually a majority of the time in typical
>> OLTP apps), there are no threads associated with the connection. This
>> asynchronous design allows any given number of threads to service a far
>> larger number of connections.
>> The way to tell if SQL Server is running short on threads is to use the
>> Windows Perfmon.exe & monitor the process object sqlservr instance's
>> thread count counter. If the process SQL Server is running has close to
>> 255 threads, it might be worth increasing Max Worker Threads.
>> In my experience, this is typically when an OLTP application has
>> thousands of user connections running, as statistically, this translates
>> to ~255 connections executing concurrently therefore requiring at least
>> 255 threads..
>> As for the original question, it may help to increase the number of
>> workers, but keep in mind that this means that SQL Server will be able to
>> schedule that many more threads to perform concurrent work & you need to
>> take into account your server resources when making this decision. This
>> is a gross simplification, but in my experience increasing Max Worker
>> Threads past 255 on systems with fewer than 4 CPUs has rarely helped much
>> as these servers usually don't have the capacity to process in increased
>> concurrent workload for example. It should hurt much to increase this
>> setting & see for yourself whether this helps SQL Server get its work
>> done more effieciently or whether it contributes further to the problem
>> by increasing context switching etc.
>> HTH
>> Regards,
>> Greg Linwood
>> SQL Server MVP
>> "Jack Vamvas" <info@.nospam.com> wrote in message
>> news:dm9qf9$o1r$1@.nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
>>
>> The default setting for the 'max worker threads' option is 255,But if
>> the
>> number of user connections surpasses this value the thread pooling will
>> be
>> used. For example, if the maximum number of the user connections to your
>> SQL
>> Server box is equal to 255, you can set the 'max worker threads' options
>> to
>> 255, this frees up resources for SQL Server to use elsewhere. If the
>> maximum
>> number of the user connections to your SQL Server box is equal to 500,
>> you
>> can set the 'max worker threads' options to 500, this can improve SQL
>> Server
>> performance because thread pooling will not be used.
>> In your case , it sounds like it's worth investigating the query plan
>> problem , as increasing the worker threads will take up extra resources
>> on
>> your server
>> Jack Vamvas
>> "Hassan" <hassan@.hotmail.com> wrote in message
>> news:OJXF8Sk8FHA.2192@.TK2MSFTNGP14.phx.gbl...
>> We have some SQL Servers that receive high number of connections and
>> stored
>> procedure calls.
>> Every once in a while, we may have a bad query plan and then one stored
>> proc
>> blocks the other stored procs and in no time, we are out of worker
>> threads
>> and no one can connect
>> Have you come across such situations ? If so, how did you handle it ?
>> Is
>> it
>> safe to increase the max worker threads ? What are the consequences ?
>>
>>
>>
>|||Hi Hassan
180 threads, means exactly that - there are 180 worker threads in SQL Server
windows process. Most would be worker threads (rather than dedicated system
threads), waiting for queries or i/o work to service. Having 180 threads
doesn't imply any system pressure on its own. It does suggest that, of your
~ 4000 connections, you might typically see peaks of ~ 180 queries actually
running concurrently.
It's possible for the # of threads to exceed connections and vice versa due
to the thread pooling model SQL Server uses in its work scheduling engine
(UMS). There's no directl correlation you can draw to assume that the number
of threads is either higher or lower than the number of connections at any
time. It's perfectly reasonable to see more threads than connections for
example where many connections may have been in use but close. The threads
will hang around in the pool for a while before SQL Server decides to trim
the worker pool. I don't have any info on exactly how or when it does this
trimming, but this is a fairly common design in multi-threaded server
programming..
It's certainly far more common to see the # of threads far lower than the #
of connections though, so if you see the # of threads > connections for
extended periods, there's possibly something wrong.
Regards,
Greg Linwood
SQL Server MVP
"Hassan" <hassan@.hotmail.com> wrote in message
news:uqs1e7t8FHA.3880@.TK2MSFTNGP12.phx.gbl...
> And after 5 mins, I looked at it and it was 247. But I did sp_who2 active
> and saw just 2 user processes running.
> Yes its a busy system with 4000 connections but did not appear i was
> running under pressure or am I and dont know about it
>
> "Hassan" <hassan@.hotmail.com> wrote in message
> news:%23djxvyt8FHA.1140@.tk2msftngp13.phx.gbl...
>>I looked at the thread counter for sqlservr process and it states around
>>180.
>> What does that mean ?
>> Are there 180 threads running concurrently ?
>> If so, would that mean that when i run sp_who2 active, i should see a
>> high number of connections atleast around 180 or so..
>> Thats not the case.
>> Can you tell me more ?
>> "Greg Linwood" <g_linwood@.hotmail.com> wrote in message
>> news:OwBcDBt8FHA.2576@.TK2MSFTNGP12.phx.gbl...
>> Hi Jack
>> The number of connections is not related to the number of worker threads
>> quite as simply as you've described.
>> Connetions only use threads while they're actually executing. When
>> connections are in idle state (usually a majority of the time in typical
>> OLTP apps), there are no threads associated with the connection. This
>> asynchronous design allows any given number of threads to service a far
>> larger number of connections.
>> The way to tell if SQL Server is running short on threads is to use the
>> Windows Perfmon.exe & monitor the process object sqlservr instance's
>> thread count counter. If the process SQL Server is running has close to
>> 255 threads, it might be worth increasing Max Worker Threads.
>> In my experience, this is typically when an OLTP application has
>> thousands of user connections running, as statistically, this translates
>> to ~255 connections executing concurrently therefore requiring at least
>> 255 threads..
>> As for the original question, it may help to increase the number of
>> workers, but keep in mind that this means that SQL Server will be able
>> to schedule that many more threads to perform concurrent work & you need
>> to take into account your server resources when making this decision.
>> This is a gross simplification, but in my experience increasing Max
>> Worker Threads past 255 on systems with fewer than 4 CPUs has rarely
>> helped much as these servers usually don't have the capacity to process
>> in increased concurrent workload for example. It should hurt much to
>> increase this setting & see for yourself whether this helps SQL Server
>> get its work done more effieciently or whether it contributes further to
>> the problem by increasing context switching etc.
>> HTH
>> Regards,
>> Greg Linwood
>> SQL Server MVP
>> "Jack Vamvas" <info@.nospam.com> wrote in message
>> news:dm9qf9$o1r$1@.nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
>>
>> The default setting for the 'max worker threads' option is 255,But if
>> the
>> number of user connections surpasses this value the thread pooling will
>> be
>> used. For example, if the maximum number of the user connections to
>> your SQL
>> Server box is equal to 255, you can set the 'max worker threads'
>> options to
>> 255, this frees up resources for SQL Server to use elsewhere. If the
>> maximum
>> number of the user connections to your SQL Server box is equal to 500,
>> you
>> can set the 'max worker threads' options to 500, this can improve SQL
>> Server
>> performance because thread pooling will not be used.
>> In your case , it sounds like it's worth investigating the query plan
>> problem , as increasing the worker threads will take up extra resources
>> on
>> your server
>> Jack Vamvas
>> "Hassan" <hassan@.hotmail.com> wrote in message
>> news:OJXF8Sk8FHA.2192@.TK2MSFTNGP14.phx.gbl...
>> We have some SQL Servers that receive high number of connections and
>> stored
>> procedure calls.
>> Every once in a while, we may have a bad query plan and then one
>> stored
>> proc
>> blocks the other stored procs and in no time, we are out of worker
>> threads
>> and no one can connect
>> Have you come across such situations ? If so, how did you handle it ?
>> Is
>> it
>> safe to increase the max worker threads ? What are the consequences ?
>>
>>
>>
>>
>