SQL Server Performance

SQL Server as a service

Discussion in 'General DBA Questions' started by daidaluus, Dec 4, 2002.

  1. daidaluus New Member

    when we say that SQL Server or SQL Server Agent runs as a service,
    what does it mean and what are the advantages and disadvantages they run as services?
  2. Chappy New Member

    Control Panel -> Settings -> Taskbar and Start Menu -> Advanced
    Tick the box which says Display Administrative Tools.

    Then go to Start Menu -> Administrative Tools -> Services.
    Here you'll see your machine already has lots of services running. Servgices are background tasks (like daemons in unix).

    I cant comment on whether implementing something as a service increases performance in any way, but one of the benefits of services is that theres no main window (ie, closing a window will not stop the process running, it must be stopped manually).

    The biggest advantage I can think of, is that unlike applications, most services start running as soon as windows has initialised, even before any user has logged in.
    This is great if your machine suddenly reboots itself because of a nasty error, because the service will start again automatically and helps ensure downtime is minimal. Also, all background tasks can be managed in the same way from the same place in Windows. If they were applications youd have some starting in registry, some in Startup menu etc, very messy.

  3. daidaluus New Member

    SQL Agent cannot be run as an "auto-start service when OS starts".
    and although they need to be registered, i accept running something like as SQL Server as a servive makes it easier to deal with. we know that if we run microsoft search service we gain a much better search on full-text searches. all that i want to know is that from where the boost in performance come from? can i make such a server side service like that? and is there any possible disadvantage to have task like a service?
  4. bradmcgehee New Member

    Generally speaking, a service is just a process that runs in the background, not in the foreground (although it is a little more complicated than that). I am not aware of any specific performance benefits of running a process as a service, other than it does not have to directly interact with the screen, which can save a little overhead, although I doubt that this would amount to much. Of course, I am not an operating systems programmer, so there may be performance benefits of a service that I am not aware of. Most of the benefits I see of running a service is from an administrative perspective. When it comes down to it, how a program is designed and written is more importance to performance that if it is a service or not.

    I am not sure what you mean that "SQL Agent cannot be run as an "auto-start service when OS starts." I do this all the time on my non-cluster SQL Servers. My servers are setup to auto-start both the SQL Server Service (mssqlserver) and the SQL Agent (sqlserveragent). Perhaps I don't understand this part of the question.

    SQL Server is designed to run as a service (although it can be started and run from the command line).

    If you like, you can write your own applications to run as a service instead of foreground task, although which development language you choose will determine how easy this is. I don't know of any disadvantages to running an application as a service.

    Brad M. McGehee

Share This Page