# 11. Data Replication, Synchronization and Transformation Services

Chapter Contents | Prev | Next
Keyword Search:
www.openlinksw.com
docs.openlinksw.com
Book Home
Contents
Preface
Data Replication, Synchronization and Transformation Services
Introduction
Snapshot Replication
Transactional Replication
Virtuoso scheduler
SYS_SCHEDULED_EVENT
Transactional Replication Example
Replication Logger Sample

## 11.4. Virtuoso scheduler

Virtuoso scheduler allows an arbitrary SQL command to be run at certain intervals.

The scheduler process wakes up every n minutes, scans the SYS_SCHEDULED_EVENT table and executes each command which applies to the current time. Note that overdue commands are executed only once.

There is a virtuoso.ini parameter "Scheduler interval" under "Parameters" section which defines the scheduler wake-up interval. Set this to 0 (the default) to disable the scheduler.

### 11.4.1. SYS_SCHEDULED_EVENT

    CREATE TABLE SYS_SCHEDULED_EVENT(
        SE_NAME		varchar,
        SE_START		datetime,
        SE_SQL		varchar,
        SE_LAST_COMPLETED	datetime,
        SE_INTERVAL		integer,
        PRIMARY KEY(SE_NAME));

This table describes each scheduled SQL command. SE_NAME is the name of the scheduled event. SE_START is the first schedule execution time. SE_SQL is the text of the SQL command to be executed. SE_LAST_COMPLETED is the last time when the SQL command was executed successfully. SE_INTERVAL is the interval between the runs of the SQL command in minutes.

Defining a new scheduled event means adding a row to the SYS_SCHEDULED_EVENT with an insert statement like this:

    INSERT INTO SYS_SCHEDULED_EVENT (SE_NAME, SE_SQL, SE_START, SE_INTERVAL)
    		VALUES (.....)

Previous Transactional Replication | Chapter Contents | Next Transactional Replication Example