PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Scheduled tasks in the HFSQL Control Center
  • Creating a scheduled task
  • Deleting a scheduled task
  • Modifying a scheduled task
  • Scheduled elements in the HFSQL Control Center
  • Creating a scheduled element
  • Creating a backup
  • Creating a task
  • Creating an optimization
  • Creating a refresh for a materialized view
  • Deleting a scheduled element
  • Modifying a scheduled element
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
HFSQL Control Center: Managing scheduled elements
HFSQL Client/ServerAvailable only with this kind of connection
Overview
You have the ability to define scheduled tasks on the HFSQL server. These scheduled tasks can correspond to:
  • the call to a stored procedure,
  • the backup of the database.
The call to a stored procedure is used to run the code of your choice, for example custom maintenance, editing statistics, ...
The scheduled tasks can be managed:
  • in the HFSQL Control Center. The scheduled tasks can be defined at server level.
  • by programming.
Note: You also have the ability to create a scheduled optimization task. See Scheduled automatic optimizations for more details.
You have the ability to define scheduled elements on the HFSQL server. These scheduled elements can correspond to:
  • a backup (of the server, of one or more databases, of data files, ...).
  • a scheduled task (call to a stored procedure). The call to a stored procedure is used to run the code of your choice, for example custom maintenance, editing statistics, ...
  • an optimization (of one or more databases, of one or more files, ...).
  • Versions 20 and later
    a refresh of one or more materialized views.
    New in version 20
    a refresh of one or more materialized views.
    a refresh of one or more materialized views.
The scheduled elements can be managed:
  • in the HFSQL Control Center. The scheduled elements can be managed at server level.
  • by programming.
Note: the management of scheduled elements is available for the server, for the databases and for the files. The "Scheduled elements" tab is available regardless of the displayed element (server, database or file).
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Scheduled tasks in the HFSQL Control Center

Creating a scheduled task

To create a scheduled task:
  1. Select the HFSQL Client/Server server in the "HFSQL C/S" pane.
  2. Select the "Scheduled elements" tab.
  3. Click the "New" button and select "New scheduled task". The wizard for creating a scheduled task starts.
  4. Enter the information about the scheduling: runtime month, day, hour.
  5. Indicate the content of scheduled task:
    • Stored procedure: specify the name of the database and the name of the set containing the stored procedure, then select the procedure.
      Caution: In order for a stored procedure started from a scheduled task to access the data, you must use HDeclareExternal. This function is used to declare the data sources that will be used in the processes of the stored procedure. Indeed, when a stored procedure is started from the HFSQL Control Center, there is no current analysis and the HFSQL Client/Server data is not immediately accessible.
      If HDeclareExternal is not used in the code of the stored procedure, the procedure will trigger a fatal error, notified in the log of system events.
      Note: when a stored procedure is started from a WINDEV, WEBDEV or WINDEV Mobile application by HExecuteProcedure, it is using the application analysis and therefore it can directly use the HFSQL Client/Server data.
    • A backup:
      • Specify the elements that will be saved: the server content, a specific database or a selection of databases.
      • Specify whether the indexes must be saved.
      • Specify the backup directory and the stored procedures that will be run before and/or after the backup.
      • Specify (if necessary) the maximum number of backups that must be stored on the server. The oldest backups will be automatically erased.
        Note: The backup will not be performed if the server is switched off. The backup will be performed at the next available date when the server is switched on.
  6. Give a description to your scheduled task and validate.
  7. The scheduled task appears in the HFSQL Control Center.

Deleting a scheduled task

To delete a scheduled task:
  1. Select the HFSQL Client/Server server in the "HFSQL C/S" pane.
  2. Select the "Scheduled elements" tab.
  3. Select the scheduled task to delete.
  4. Click the "Delete" button.

Modifying a scheduled task

To modify a scheduled task:
  1. Select the HFSQL Client/Server server in the "HFSQL C/S" pane.
  2. Select the "Scheduled elements" tab.
  3. Select the scheduled task to modify.
  4. Click "Modify". A description window of scheduled task is displayed. All the characteristics typed in the wizard are grouped in several tabs:
    • "General" tab: Defines whether the task is enabled as well as its type (backup or stored procedure).
    • "Schedule" tab: Defines the runtime options of scheduled task (month, day, time and number of executions).
    • "Backup" tabs: These two tabs define the options taken into account if the scheduled task corresponds to a backup.
  5. Validate.
Scheduled elements in the HFSQL Control Center

Creating a scheduled element

To create a scheduled element:
  1. Connect (if necessary) to a HFSQL server.
  2. Double-click the name of HFSQL server in the tree structure.
  3. The right section of Control Center displays a tab with the server name.
  4. Click the "Scheduled elements" tab.
  5. In the ribbon, in the "Scheduled elements" group, expand "New scheduling". You can choose the type of scheduling to create:
  6. Regardless of the option, a wizard allows you to create the selected scheduling.

Creating a backup

  1. Specify:
    • the elements to save: the server content, a specific database or a selection of databases.
    • whether the result of the backup must be compressed in zip format.
    • whether the indexes must be saved (NDX index files and FTX full-text index files). If the index files are not saved, the size of the backup will be reduced but the restore time will be longer. Note: if the index files are not saved, the passwords of the files must be specified during the restore operation to allow their reindexing.
  2. Specify the requested backup scenario:
    • Full monthly backup with or without weekly differential backup,
    • Full monthly backup with or without daily differential backup.
    • Full weekly backup with or without daily differential backup.
    • Full daily backup.
    • Define the frequency of backups manually. If this option is selected, the wizard allows you to choose the type of backup to perform and its frequency.
  3. Specify the backup directory.
    If this name corresponds to a relative path, the backup will be performed in the "Backup" sub-directory of the HFSQL server. The wizard is used to define a "backup" sub-directory ("Backups" by default). The date and the time (in "Year\Month\Day\Time-Minute" format) can be added to the name of the directory in order to easily identify the backup.
    Note: The backups are performed in a numbered sub-directory ("backup\Backups\1" for example). Therefore, if several backups are performed, the corresponding files will not be overwritten by a new backup.
  4. Specify the stored procedures that will be run before and/or after the backup.
  5. Specify (if necessary) the maximum number of backups that must be stored on the server. The oldest backups will be automatically erased.
    Note: The backup will not be performed if the server is switched off. The backup will be performed at the next available date when the server is switched on.
  6. Give a description to your backup and validate.
  7. The scheduled backup appears in the HFSQL Control Center.

Creating a task

  1. Versions 23 and later
    Select the runtime mode of the task: the task can be run:
    • Periodically. Then wizard allows you to define the runtime frequency of the task.
    • and/or whenever starting the HFSQL server. If this option is selected, you must specify whether:
      • the task is locking: in this case, the HFSQL server will not be accessible during the task execution.
      • the task must be run in background task. In this case, the HFSQL server can be used as soon a it is started.
    New in version 23
    Select the runtime mode of the task: the task can be run:
    • Periodically. Then wizard allows you to define the runtime frequency of the task.
    • and/or whenever starting the HFSQL server. If this option is selected, you must specify whether:
      • the task is locking: in this case, the HFSQL server will not be accessible during the task execution.
      • the task must be run in background task. In this case, the HFSQL server can be used as soon a it is started.
    Select the runtime mode of the task: the task can be run:
    • Periodically. Then wizard allows you to define the runtime frequency of the task.
    • and/or whenever starting the HFSQL server. If this option is selected, you must specify whether:
      • the task is locking: in this case, the HFSQL server will not be accessible during the task execution.
      • the task must be run in background task. In this case, the HFSQL server can be used as soon a it is started.
  2. Select:
    • the database containing the stored procedure to run.
    • the set containing the stored procedure to run.
    • the stored procedure to run.
      Caution: In order for a stored procedure started from a scheduled task to access the data, you must use HDeclareExternal. This function is used to declare the data sources that will be used in the processes of the stored procedure. Indeed, when a stored procedure is started from the HFSQL Control Center, there is no current analysis and the HFSQL Client/Server data is not immediately accessible.
      If HDeclareExternal is not used in the code of stored procedure, the procedure will trigger a fatal error, notified in the log of system events.
      Note: when a stored procedure is started from a WINDEV, WEBDEV or WINDEV Mobile application by HExecuteProcedure, it is using the application analysis and therefore it can directly use HFSQL Client/Server data.
  3. Define the frequency of the task: month, day, hour.
  4. Give a description to your scheduled task and validate.
  5. The scheduled task appears in the HFSQL Control Center.

Creating an optimization

  1. Select the files to optimize: the server content, a specific database or a selection of databases.
  2. Define the frequency of optimization: month, day, hour.
  3. Define the action to perform:
    • Reindex the files.
    • Recalculate the statistics on the keys of files.
  4. Specify (if necessary) the password of the files to reindex.
  5. Give a description to your optimization task and validate.
  6. The scheduled task appears in the HFSQL Control Center.

Creating a refresh for a materialized view

  1. Select the views to process: all the views found in a database, a selection of databases and views.
  2. Define the frequency of refresh: month, day, hour.
  3. Give a description to your refresh task and validate.
  4. The refresh task appears in the HFSQL Control Center.

Deleting a scheduled element

To delete a scheduled element:
  1. Connect (if necessary) to a HFSQL server.
  2. Double-click the name of HFSQL server in the tree structure.
  3. The right section of Control Center displays a tab with the server name.
  4. Click the "Scheduled elements" tab.
  5. Select the scheduled task to delete.
  6. In the ribbon, in the "Scheduled elements" group, click "Delete".
    You also have the ability to use the popup menu of the scheduled element ("Delete" option).

Modifying a scheduled element

To modify a scheduled element:
  1. Connect (if necessary) to a HFSQL server.
  2. Double-click the name of HFSQL server in the tree structure.
  3. The right section of Control Center displays a tab with the server name.
  4. Click the "Scheduled elements" tab.
  5. Select the scheduled task to modify.
  6. In the ribbon, in the "Scheduled elements" group, click "Edit".
    You also have the ability to use the popup menu of the scheduled element ("Edit" option).
  7. A description window of the scheduled element is displayed. All the characteristics entered in the wizard are grouped in several tabs.
  8. Modify the requested information and validate.
Minimum required version
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment