UBQ ID Number: UBQ000021
Last Modified: 2000-06-01 at 10:43:06
SUMMARY:
How to stop and start SQL services on local or remote servers. Used to create batch files that would be used in the Before/After commands of UltraBac.
DETAILS:
UltraBac provides "Before" and "After" batch command line interface opportunities as detailed in the "Before/After Programs & Client Passwords" section found in the "Creating Backup Sets" chapter. Some SQL specific "Before/After" commands follow:
To close SQL on a local machine, create a batch file with the following:
NET STOP SQLEXECUTIVE
NET STOP MSSQLSERVER
To open SQL on a local machine, create a batch file with the following:
NET START MSSQLSERVER
NET START SQLEXECUTIVE
To stop and start SQL on a remote machine, you must have the Windows NT/2000 Resource Kit installed on the computer running UltraBac. The commands necessary are contained within that Resource Kit. Wait.exe is available as sleep.exe in the Windows NT/2000 Resource Kit. (Do not use or overwrite sleep.exe in the UltraBac directory, as it is not the same command.)
To stop SQL on a remote machine, create a batch file with the following:
NETSVC MSSQLSERVER \\MACHINENAME /STOP
WAIT.EXE 10
To start SQL on a remote machine, create a batch file with the following:
NETSVC MSSQLSERVER \\MACHINENAME /START
WAIT.EXE 10
NOTE: The optional BEI SQL Agent module is active for evaluation copies of the software but requires purchase for permanent licensing.
MORE INFORMATION:
See UBQ: UBQ000015 – Backup Group Format
See UBQ: UBQ000016 – Before/After Backup Option Syntax
See UBQ: UBQ000018 – Backup Set Format
See UBQ: UBQ000020 – Static Exchange & SQL Backups
See UBQ: UBQ000035 – Before/After Job Macros for Sets and Groups
CATEGORIES:
Before/After Commands, Setup, SQL
VERSION:
2.x to 6.x
Copyright UltraBac.com 1999-2001