- Total Members: 220,025
- Threads: 525,387
- Posts: 976,997
-
January 17th, 2013, 12:07 AM
#1
Restarting remote SQL server using classic asp
Hi Friends,
I need to restart SQL server service using my classic asp website, for that I have created batch file on the windows server which got installed sql server.
Command in batch file :
NET STOP SQLSERVERAGENT
NET STOP MSSQLSERVER
NET START MSSQLSERVER
NET START SQLSERVERAGENT
If I run the batch file manually by using remote desttop, its working fine. I'm calling this in asp page using ,
set wshell = CreateObject("WScript.Shell")
wshell.run "\\ServerName\SharedFolder\sql.bat"
set wshell = nothing
this is not working. Can anyone guide me how to achive this.
Thanks in Advance,
Regards,
Rajkumar M.
-
January 17th, 2013, 07:20 AM
#2
it is looks like permissions problem. when you run batch from command line system used permissions of your windows account, when you run from asp it is from internet user account which does not have permissions to stop and start services
GK
__________________________________________________ _____
if you found this post is useful click scale

(right side on this reply ) and agree
Similar Threads
-
By carlsdad in forum Microsoft IIS
Replies: 5
Last Post: December 10th, 2009, 05:29 PM
-
By dj__nj in forum Code Bank
Replies: 0
Last Post: January 30th, 2007, 03:01 AM
-
By vikasbhandari in forum ASP Development
Replies: 8
Last Post: January 16th, 2006, 10:56 AM
-
By melroseguy in forum ASP Development
Replies: 0
Last Post: November 30th, 2003, 02:12 AM
-
By Steve Schofield in forum SQL Development
Replies: 1
Last Post: July 16th, 2001, 08:30 PM