ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Control Centers / HFSQL Control Center / HFSQL Client/Server
  • Overview
  • 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/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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 elements on the HFSQL server. These scheduled elements can correspond to:
  • a backup (of the server, of one or more databases, of data files, etc.).
  • a scheduled task (call to a stored procedure). By calling a stored procedure, you can execute the code of your choice, e.g. custom maintenance, editing statistics, etc.
  • an optimization (of one or more databases, of one or more files, etc.).
  • 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.
  • through programming.
Remark: 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).
Scheduled elements in the HFSQL Control Center

Creating a scheduled element

To create a scheduled element:
  1. Connect (if necessary) to an 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. Remark: 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" subdirectory of the HFSQL server. The wizard is used to define a "backup" subdirectory ("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.
    Remark: The backups are performed in a numbered subdirectory ("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.
    Remark: 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. 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 the stored procedure, the procedure will trigger a fatal error, notified in the log of system events.
      Remark: when a stored procedure is started by HExecuteProcedure from a WINDEV, WEBDEV or WINDEV Mobile application, it uses the application analysis and can directly use the 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 an 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 context menu of the scheduled element ("Delete" option).

Modifying a scheduled element

To modify a scheduled element:
  1. Connect (if necessary) to an 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 context 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 version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/06/2024

Send a report | Local help