Access denied when starting SQL Server Express from command line

sql-server-2008windows 7

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?

Best Answer

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.

Related Topic