To Start the MSDE Service

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Solution Seeker

    #1

    To Start the MSDE Service

    Hi,

    we are using MSDE as our Database

    Now we have a Validation to check the MSDE availability

    If Database Connectivity fails, I need to check the MSDE availability

    If MSDE is not available(i.e., Service is stopped), then i have to Start the
    Service thro' VB.Net Code

    I need a Solution for it

    Any Help will be appreciated

    Thanks
    Solution Seeker
  • Ken Tucker [MVP]

    #2
    Re: To Start the MSDE Service

    Hi,

    Maybe this will help.

    Dim s As System.ServiceP rocess.ServiceC ontroller

    For Each s In System.ServiceP rocess.ServiceC ontroller.GetSe rvices

    If s.ServiceName = "MSSQLSERVE R" Then

    If s.Status = ServiceProcess. ServiceControll erStatus.Stoppe d Then s.Start()

    End If



    Ken

    -------------------------

    "Solution Seeker" <SolutionSeeker @discussions.mi crosoft.com> wrote in
    message news:EE8DD8D0-E47B-4316-825E-670B0964AE4C@mi crosoft.com...
    Hi,

    we are using MSDE as our Database

    Now we have a Validation to check the MSDE availability

    If Database Connectivity fails, I need to check the MSDE availability

    If MSDE is not available(i.e., Service is stopped), then i have to Start the
    Service thro' VB.Net Code

    I need a Solution for it

    Any Help will be appreciated

    Thanks
    Solution Seeker


    Comment

    Working...