SQL Server hoch und runter fahren
Hallo zusammen,
ich benötige für eine Backupsoftware die auf Server 1 liegt eine Batchdatei, die auf einen anderem Server 2 den mysql Dienst beendet und nach dem Backup wieder startet.
Meine Batchdatei die ich mir geschrieben habe, die auch auf dem Server 2 liegt, wird vor der Sicherung ausgeführt, jedoch auf dem Server 1 und dort ist keine Datenbank installiert. Ich muss also in die Batchdatei reinschreiben:
net stop mysql auf server 2
Könnt ihr mir helfen?
ich benötige für eine Backupsoftware die auf Server 1 liegt eine Batchdatei, die auf einen anderem Server 2 den mysql Dienst beendet und nach dem Backup wieder startet.
Meine Batchdatei die ich mir geschrieben habe, die auch auf dem Server 2 liegt, wird vor der Sicherung ausgeführt, jedoch auf dem Server 1 und dort ist keine Datenbank installiert. Ich muss also in die Batchdatei reinschreiben:
net stop mysql auf server 2
Könnt ihr mir helfen?
Please also mark the comments that contributed to the solution of the article
Content-Key: 94959
Url: https://administrator.de/contentid/94959
Printed on: April 18, 2024 at 07:04 o'clock
2 Comments
Latest comment
Schau in der Windows Hilfe mal nach dem Befehl SC
Syntax
sc [ServerName] start ServiceName [ServiceArguments]
Parameters
ServerName
Specifies the name of the remote server on which the service is located. The name must use the UNC format ("\\myserver"). To run SC.exe locally, ignore this parameter.
ServiceName
Specifies the service name returned by the getkeyname operation.
ServiceArguments
Specifies service arguments to pass to the service to be started.
/?
Displays help at the command prompt.
Stop funktioniert genauso.
Syntax
sc [ServerName] start ServiceName [ServiceArguments]
Parameters
ServerName
Specifies the name of the remote server on which the service is located. The name must use the UNC format ("\\myserver"). To run SC.exe locally, ignore this parameter.
ServiceName
Specifies the service name returned by the getkeyname operation.
ServiceArguments
Specifies service arguments to pass to the service to be started.
/?
Displays help at the command prompt.
Stop funktioniert genauso.