Avatar of m3housing

asked on 

SQL restart using Shell

Using VBA shell how do I perform a SQL restart? I already have the code
x = Shell("net stop mssqlserver")

x = Shell("net start msqlserver")

The problem is that the two commands start two different sessions and the stop hasnt completed before the start  - what I need to do is tell the command line to run net start msqlserver after the stop command. Any idea?
Microsoft SQL Server

Avatar of undefined
Last Comment

8/22/2022 - Mon