SQL remote start/stop

sql server Belgium
  • 18 years ago

    Hi All,


    I have an SQL 7.0 running.
    With this code I can simply start en stop a SQL Server


    Code:

    Dim SQLServer As New SQLDMO.SQLServer


    Private Sub cmdStart_Click()
       On Error Resume Next
       SQLServer.Start False, "."
       If Err Then
           MsgBox Err.Description, vbCritical
       End If
    End Sub




    But when SQL Server Agent is running I always get an error message that other process are depending in the server, other process is SQL Server Agent.
    Now my question. How can I stop SQL Server Agent first an then the SQL Server. I don't know a way to stop SQL Server Agent. Is there a diferent DLL for that?


    rgds,
    Koen

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Memory is like an orgasm. It's a lot better if you don't have to fake it.” - Seymour Cray