Ok, here's the problem. I have CA's Unicenter ServiceIT Enterprise Edition 5.0 running on a production box that has NT4 (SP6) and SQL server 2000 running on it.
Just before we continue, this is about backing up the database that ServiceIT connects to.
I know that you can schedule EM to make backup's of a specific database over a certain time, but this is part of the problem. What i have since discovered is that ServiceIT will not run on a database backed up and restored by EM.
It will however run on the restored backup created through the dos command pdm_backup (comes with ServiceIT).
What i am trying to figure out is to try a find a way that i can run a dos prompt command to do the following tasks at a specific time of day:
Stop the Paradigm Server Daemons (service)
Run a DBCC CHECKDB on the database AHDTEST50.
If there are no errors, create a verbose backup using the dos command pdm_backup -v -fC:\backup\[todaysdate]
If there are errors run a script to correct them, then run a backup
Only generating filenames with today's date (yyyymmdd) is usually a pain in batch (regional settings stuff like that) so I have a tendency to use a parameter instead. Next, I don't know how to check for errors the verbose backup might give; is there a log-file, would it suffice to do a find on it? I should think there's a way to cover that, so, other than that: I'd give it a go.