Controlling Sybase backup with a method
Posted: Mon May 03, 2004 12:02 am
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
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:
This way, every time you launch this method, you'll activate the trigger and the trigger will perform an online backup.
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.