O'Reilly logo

Guru's Guide to SQL Server™ Stored Procedures, XML, and HTML, The by Ken Henderson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

xp_setpriority

In closing out this chapter, I'll leave you with an extended procedure that I think could change the way you work, especially if you manage a SQL Server installation in which long-running batch jobs and shorter, time-critical jobs regularly compete for system resources. Earlier, I mentioned that extended procedures run in the SQL Server process space. They also run in the context of the calling thread. That is, unless fiber mode has been enabled on the server, each connection gets its own Win32 thread. This thread is taken from the pool of worker threads that SQL Server creates on start-up and can change from query to query on the same connection. When an extended procedure runs, it runs within the context of this thread. This ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required