Page 1 of 1

Controlling Sybase backup with a method

PostPosted: Mon May 03, 2004 12:02 am
by Riccardino
Sybase central gives the user a quantity of options to mantain and backup databases. It's also possible to set up triggers, so I thought to use this option to control the execution of backups from Servoy.
The procedure is quite simple:
create a field in a table (an integer is fine), let's call it "launcher"
create a trigger with this command
Code: Select all
BEGIN
BACKUP DATABASE DIRECTORY '/Users/test/Servoy/backupfolder/'
END

and set it to activate with data-changes (the trigger wizard is very helpful, and all the steps are easy to follow)
in Servoy, create a method like:
Code: Select all
switch (launcher)
{
case 1:
launcher = 0
break;
case 0:
launcher = 1
break;
default:
break;
}


This way, every time you launch this method, you'll activate the trigger and the trigger will perform an online backup.

Re: Controlling Sybase backup with a method

PostPosted: Thu Feb 10, 2005 5:17 am
by Westy
Riccardino wrote:set it to activate with data-changes.

Can daily automated backup schedules be activated using this approach. If so, how could this be done?