.batch file to restart SQL server


  1. tys
    Posts : 38
    Windows 7 Professional x64
       #1

    .batch file to restart SQL server


    Hi all,

    I have a simple but effective way of restarting our SQL server from .bat file. this works from my computer. But from other Windows 7 it doesn't.

    It comes up with .<5> access if denied.

    I'm guessing it is something to with permissions. I've tried adding the users as administrators, but still not working.Even given them same permissions I have on my laptop and still no luck.

    Please,
    any help?!

    thanks!
      My Computer


  2. tys
    Posts : 38
    Windows 7 Professional x64
    Thread Starter
       #2

    For users for future reference. You need to enable the users that are going to be using the batch file to have access to the computer you're going to be shutting down and for them to have administrative rights on that computer aswell.
      My Computer


  3. Posts : 2,468
    Windows 7 Ultimate x64
       #3

    Most likely it's due to UAC, as it "converts" admins to non-admins under the hood (and restarting services require administrator privileges).
    Try running the file with right click => run as administrator.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 15:55.
Find Us