views:

72

answers:

2

I have already created the program to restart a SQL database but it only works if the client has the rights. This is going to be done on a local network from a client computer when they can't get a person that has the password on the phone. Any thoughts I'm currently using the servicecontroller to start and stop database. When I don't have the rights I get a access denied error, or This operation might require other privileges. Not sure if impersonation would work since I don't have the userid and password.

A: 

Setup a service on an account with enough rights to do the restart and write another application that will communicate with that service and tell it to do the restart.

Michał Piaskowski
If we could get connected to the server we wouldn't need to run this program. The problem happens when the user that has the login and password to the server are unreachable. They need the database started now or they are forced to wait until the person gets back.
Jason
So put a username / password into a sealed envelope. Start thinking about what you ask for - in terms of security.
TomTom
A: 

You said in a comment "If we could get connected to the server we wouldn't need to run this program."

There is no solution without some rights on the SQL Server box, be it using a web page, WMI, a local service, whatever.

gbn