Automating SQLServer2000 DB maintenance in single user mode - TechRepublic
Question
May 6, 2008 at 04:21 PM
paultinnz

Automating SQLServer2000 DB maintenance in single user mode

by paultinnz . Updated 18 years, 1 month ago

We have a job that does the ‘standard DB maintenance’ ie “EXECUTE master.dbo.xp_sqlmaint N’-PlanID E4AB00A1-28E3-4A08-947F-61E6DD75D4B9 -To “Owen Evans” -Rpt “d:\data\MSSQL\LOG\DB Maintenance Plan12.txt” -WriteHistory -CkDBRepair ‘” from within normal Enterprise Manager.

However, I’m getting a message saying I need to do this in single user mode.

Not a problem to do manually! However, I want to modify the Maintenance Job to automate.

for example:
Step1…stop Sqlsrvr
Step2…start Sqlsrvr -m
Step3…start the maintenance job <

This discussion is locked

All Comments