dpdbadmin scheduleauditpartitioning
  • 08 Jan 2025
  • 1 Minute à lire
  • Sombre
    Lumière
  • PDF

dpdbadmin scheduleauditpartitioning

  • Sombre
    Lumière
  • PDF

The content is currently unavailable in French. You are viewing the default English version.
Résumé de l’article

The dpdbadmin scheduleauditpartitioning command is used to have new partitions for the audit tables (vdsAuditMsg, vdsAuditMsgField) created on a daily basis in the future. It creates a stored procedure that is scheduled to run automatically each day at a specified time. This is required, because MariaDB does not create such partitions automatically.

Execute this command after you have created the partitions for the existing data using dpdbadmin partitionaudittables (see dpdbadmin partitionaudittables). You can schedule new partitions to be created only if you initially created partitions on a daily basis (with ‑range daily). If you created partitions on a monthly basis (‑range monthly), at the maximum 12 partitions in total will be kept. As a consequence you cannot use dpdbadmin scheduleauditpartitioning to automatically create additional partitions.

This command is only supported for MariaDB. The stored procedure is triggered by a database event, which requires the event scheduler to be running. If the database event scheduler is disabled, dpdbadmin scheduleauditpartitioning issues a respective warning.

Syntax

dpdbadmin scheduleauditpartitioning –d dsn –scheduletime time[OPTION]...

where dsn is the ODBC data source name.

Command-line options

Table: dpdbadmin scheduleauditpartitioning command-line options
OptionParameterDescription

‑d, ‑dsn

dsn

Required. ODBC data source name (DSN), e.g. "IAS embedded database".

‑h, ‑help Show help and usage information.
‑l, ‑loglogfileWrite output to logfile.
‑p, ‑passworddbpassword

Optional. Password of the database administrator.

This option can be omitted if the database administrator account has a blank password.

‑q Quiet mode. Do not output commentary text.
‑scheduletimetime

Required. Specifies the time (UTC) of the day when a new daily partition should be created. Set this to a daytime in the future.

Format: hh:mm

‑synctimeouttimeoutThe timeout in seconds to synchronize with other dpdbadmin instances.
‑u, ‑userdbusernameOptional. User name of a database administrator (if required).
‑unlockdb Unlock a database synchronization lock used to protect the database schema against concurrent schema modifications.
‑v, ‑verbose Print verbose output. Can be specified twice to be more verbose.

Exit codes

Table: dpdbadmin scheduleauditpartitioning exit codes
Exit codeDescription
0The command completed successfully.
1The command has been aborted by the user.
2The command failed due to an unspecified error.
3The specified parameters are invalid.
4The command failed due to an error.
5The database authentication failed.

Examples

To add the stored procedure to the database and schedule it to run each day at 20:00:

dpdbadmin scheduleauditpartitioning –d "IAS embedded database" –scheduletime 20:00

Additional considerations

You can remove the partitions and merge the data back into one big table again using the dpdbadmin removeauditpartitioning command (see dpdbadmin removeauditpartitioning). This will also delete the stored procedure created by dpdbadmin scheduleauditpartitioning.


Cet article vous a-t-il été utile ?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Ozzy, facilitant la découverte de connaissances grâce à l’intelligence conversationnelle