Windows 7 computer running SQL Server Express 2008 (sp1).

When I try to run net start mssql$sqlexpress I receive an error:

System error 5 has occurred.
Access is denied

The SQL service is running under "Network Service" account

The service starts fine if I use the services window. Could somebody help me figure out why I am receiving this error?


Are you using an elevated command prompt if UAC is enabled?

To elevate a command prompt type CMD into the search box and hit ctrl+shift+enter

If you wish to elevate batch files, right click on them and use Run As Administrator, or launch them from inside an elevated command prompt.

The other option is disabling UAC.

  • No, I am not using an elevated command prompt, just using cmd. Didn't think that would be require; didn't even consider UAC. I have recently moved from Windows 7 from XP. What is the recommend way for me to do this? My goal is to have a be able to start and stop SQL services from a command line, and have a command file on the desktop to batch start them. – Brettski Apr 4 '10 at 0:14
  • I have edited my answer to show how to elevate. In win 7 and vista, even if you are an admin, you do not run with admin privs. You just have the ability to elevate actions. A command prompt opened without elevation is the same as having a command prompt as a limited user, which is why you can't start a service from it. – MDMarra Apr 4 '10 at 0:31
  • 1
    And as added information, if you want to be able to click a cmd file and run as Administrator (not having to right click it first) create a shortcut to it and set "run as Administrator" under advanced properties. Seems a little silly, but at least it works. – Brettski Apr 4 '10 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.