Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393

    Question Unanswered: MSSQLServer autostart

    How can I start the MSSLServer service from a VB program

    I know I can use a shell on "scm.exe"
    but I'm looking for a solution that with automatically run
    the MSSQLServer service
    if the user shut it down by mistake and a connection to the database
    is needed by the program

  2. #2
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401

    Re: MSSQLServer autostart

    Originally posted by Karolyn
    How can I start the MSSLServer service from a VB program

    I know I can use a shell on "scm.exe"
    but I'm looking for a solution that with automatically run
    the MSSQLServer service
    if the user shut it down by mistake and a connection to the database
    is needed by the program

    Command prompt

    Start an instance of SQL Server or the SQL Server Agent service from a command prompt by typing:
    net start mssqlserver or sqlservr, or net start SQLServerAgent or by running SQLSERVR.EXE. If you are referring to a named instance of SQL Server, you must specify mssql$instancename or SQLAgent$instancename
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  3. #3
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393

    Re: MSSQLServer autostart

    that works but
    it's still a command line that must be runned by a shell from my program.

    Is there an another way that would for example
    launch MSSLServer (and the Agent)
    if you connect to your db in your program


    With Sybase we could configure the DSN to autostart
    the engine if closed at connection to the DB.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •