I have defined a Mainenance Plan using the wizard in Sybase Central (SQLA 12) to execute a daily full image online backup (while de db is running).
Now, in a case of a failure during the execution of the plan, will that leave the db engine in an unusable state (meaning no client can connect to it anymore because of having both previously mentioned checks on)?
In such a case, will the engine have to be restarted in order to become operational?
I know this is more than one question but please bear with me since I really need some help here. Thank you.
asked 05 Mar '14, 04:32
Ok, following the general consensus here, I have decided to ditch the Wizard in favor of my own script (actually Breck's) to backup an validate.
I have also created a scheduled task (running Windows Server 2008 here) to run the batch and send me a status email.
The most interesting part by far is the script. Here are the main steps (disregarding the boilerplate work to create working directories and send results to a log file):
First make the backup (while DB is running):
dbbackup -c "connstring" -o "log" C:\backup
Then, copy the backup file to another folder. Then, apply the tran log because while backing up, stuff might have happened to the DB:
dbeng12 -o "log" C:\PathToDBFile -ad "C:\PathToOriginalTranLog"
(So -ad "Path" specifies where to go get the tran logs to be applied to the DB)
Then, start a read-only copy of the DB backup because we want to validate it:
dbspawn -f dbeng12 -n readonlycopy -o "log" -r -gf "C:\PathToCopyOfDBFile"
( -f force start of DB even if one is already running, how cool is that? -r means open DB in readonly, -gf means to disable firing of triggers, if you need it)
dbvalid -c "connstring-to-readonlycopy" -o "log" -q
(-q don't log to client output, 'cause we already do that to a log file)
Then stop the read-only copy
dbstop -c "connstring-to-readonlycopy" -y
(-y stop even with active connections to the server)