Controlling Sybase backup with a method

Find out how to get things done with Servoy. Post how YOU get things done with Servoy

Controlling Sybase backup with a method

Postby Riccardino » 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
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.
ciao, ric
User avatar
Riccardino
 
Posts: 911
Joined: Thu Apr 24, 2003 11:42 am
Location: Ferrara, Italy

Re: Controlling Sybase backup with a method

Postby Westy » Thu Feb 10, 2005 5:17 am

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?
Westy
 
Posts: 852
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA


Return to How To

Who is online

Users browsing this forum: No registered users and 4 guests