Surefire Method to Determine that SQL is running programmatically.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Louis Frolio

    Surefire Method to Determine that SQL is running programmatically.

    All, if I were to write an app that has one task, determine whether or
    not an SQL Instance is running, what would be the easist method for
    this? I personally think that a query against the masterdb would do
    the trick. I would appreciate any feedback you can provide.

    L
  • Simon Hayes

    #2
    Re: Surefire Method to Determine that SQL is running programmaticall y.


    "Louis Frolio" <froliol@yahoo. com> wrote in message
    news:94c28610.0 404081048.7cbed a4b@posting.goo gle.com...[color=blue]
    > All, if I were to write an app that has one task, determine whether or
    > not an SQL Instance is running, what would be the easist method for
    > this? I personally think that a query against the masterdb would do
    > the trick. I would appreciate any feedback you can provide.
    >
    > L[/color]

    If you want to know if the SQL Server service is running, then you can use
    any tool which can tell you the state of a Windows service - WMI is one way,
    or the SQLDMO SQLServer2 object has a Status property.

    Simon


    Comment

    • Louis Frolio

      #3
      Re: Surefire Method to Determine that SQL is running programmaticall y.

      "Simon Hayes" <sql@hayes.ch > wrote in message news:<407af257_ 2@news.bluewin. ch>...[color=blue]
      > "Louis Frolio" <froliol@yahoo. com> wrote in message
      > news:94c28610.0 404081048.7cbed a4b@posting.goo gle.com...[color=green]
      > > All, if I were to write an app that has one task, determine whether or
      > > not an SQL Instance is running, what would be the easist method for
      > > this? I personally think that a query against the masterdb would do
      > > the trick. I would appreciate any feedback you can provide.
      > >
      > > L[/color]
      >
      > If you want to know if the SQL Server service is running, then you can use
      > any tool which can tell you the state of a Windows service - WMI is one way,
      > or the SQLDMO SQLServer2 object has a Status property.
      >
      > Simon[/color]

      Thank You Simon. I had a hunch that SQLDMO was the way to go.

      L

      Comment

      • Louis Frolio

        #4
        Re: Surefire Method to Determine that SQL is running programmaticall y.

        "Simon Hayes" <sql@hayes.ch > wrote in message news:<407af257_ 2@news.bluewin. ch>...[color=blue]
        > "Louis Frolio" <froliol@yahoo. com> wrote in message
        > news:94c28610.0 404081048.7cbed a4b@posting.goo gle.com...[color=green]
        > > All, if I were to write an app that has one task, determine whether or
        > > not an SQL Instance is running, what would be the easist method for
        > > this? I personally think that a query against the masterdb would do
        > > the trick. I would appreciate any feedback you can provide.
        > >
        > > L[/color]
        >
        > If you want to know if the SQL Server service is running, then you can use
        > any tool which can tell you the state of a Windows service - WMI is one way,
        > or the SQLDMO SQLServer2 object has a Status property.
        >
        > Simon[/color]

        Thank You Simon. I had a hunch that SQLDMO was the way to go.

        L

        Comment

        Working...