SQL Server as a Service or a Console Application

  • Hello,

    During my self-study of SQL Server I came across a comment in a book.  It said "SQL Server is a process that can run as either a service or a console application."

    How do I know if SQL Server is running as a service or as a console application?

    Why would I chose to run it one way over another?

    Thanks,

    Steve DiDomenico - Nashua, NH

  • I am by no means an expert on services/console apps, but you can see if it is running as a service by opening Control Panel or Administrative Tools and then select Services.  If you see MSSQLSERVER and its started, its running as a service.  To the best of my knowledge, the advantages of a service are, when you log off, it keeps running, allowing others to connect to it. It runs under a specific login account which is not necessarily yours, allowing you to grant it priveleges and/or restrict it.  If you have it installed on a local machine, with no one connecting to it other than you, and you're shutting the machine down when you're not on it, and you don't need to schedule jobs to run when you're not logged on, you probably don't care.  Although, if you are studying for possible career paths, you may want to run it as a service, so that you can experience the environment that you will be faced with in a professional arena.

    Steve

  • As a Console is used for troubleshooting setup problems, rebuild master and other very rare occations

    HTH


    * Noel

  • Hey noeld,

    What if you're running personal edition on a box that doesn't support services, like Win 95 or 98, it would run as a console app, right?  Would that be the same as the mode you are referring to?  (As I said before, I'm no expert on this stuff)

    Steve

  • This is what BOL say:

    How to start the default instance of SQL Server (Command Prompt)

    To start the default instance of SQL Server from a command prompt

    • From a command prompt, enter:

      sqlservr.exe -c

      Note  You must switch to the appropriate directory (for the instance of Microsoft® SQL Server™ you want to start) in the command window before starting sqlservr.exe.

     

    Also see BOL or the commandline with option /? to get more information.

     

  • Thanks hoo-t and noeld. Your answers clear up my questions.

    Thanks Michael Ziese for the information on how to start SQL Server from a Command prompt.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply