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 programOriginally 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|||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.
No comments:
Post a Comment