Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: .batch file to restart SQL server

25 Mar 2013   #1

Windows 7 Professional x64
.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.

any help?!


My System SpecsSystem Spec
27 Mar 2013   #2

Windows 7 Professional x64

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 System SpecsSystem Spec
29 Mar 2013   #3

Windows 7 Ultimate x64

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 System SpecsSystem Spec


 .batch file to restart SQL server

Thread Tools

Similar help and support threads
Thread Forum
Batch File .bat to copy file from File Sharing & FTP Hosting
Hi all, Any idea how to write Batch File .bat to copy file from File Sharing & FTP Hosting to local directory. Current the File Sharing & FTP Hosting is SMARTFILE. I don't want to use WINSCP as the connector. Thanks
General Discussion
How to run a batch file at logoff & some batch scripting help please
Hiya, I'd just like to run a simple batch file at logoff to backup some settings. I plan to use Robocopy, which is what i use to more thorough backups. Two questions: 1. How make it run by clicking Start > Shutdown? (i realise i could make a shutdown batch file and run it instead, but i'd...
Backup and Restore
Batch File that grabs file names from folder to insert into batch file
Ok I'm totally at a loss on how to word this so I'm just going to write it out the best that I can... :confused: First I have a batch file that I'm writing that will convert mp4 files to mp3 files (I have a lot) for a buddies band using ffmpeg. Here's the code that I'm using: ffmpeg -i...
General Discussion
batch file open file for program in the startup folder
I have a computer that is a drone specifically for an outside LED sign. This computer is designed to never shut off and doesn't have any other program on it besides Operating System and the sign software. I need to create a batch file that I can place in the "start-up" folder that will open the...
General Discussion
How to create a batch file that will move files based on the file type
How to create a batch file that will move files based on the file type? My Requirement : I need a batch file to copy all .doc files in all my HardDisk to a removable disk say (Z: drive) . Can anyone make it possible using a batch file?Please...Its urgent...
General Discussion

Our Sites

Site Links

About Us

Find 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 14:35.
Twitter Facebook Google+