Antoine_Sauteron_1266

Supprimer les exécutions dans ARA avec l'utilitaire DB-cleanup

Discussion created by Antoine_Sauteron_1266 on Nov 21, 2017
Bonjour,

Voici quelques exemples d'utilisation de DB-cleanup.

A - Supprimer des exécutions spécifiques - par exemple les RunIDs : 2057279, 2065202

Il suffit d'utiliser le paramètre "--id"

exemple :
DB-cleanup --id "2057279,2065202"


B - Supprimer toutes les exécutions pour une ou plusieurs applications

On peut utiliser les paramètres ci-dessous :
  •     "--applications" : nom de la ou des applications
  •     "--olderthan" : définir à "0" pour supprimer toutes les exécutions (--olderthan 0 = plus ancien qu'aujourd'***).
  •     "--keepatleast" : définir à "0" pour supprimer toutes les exécutions - pas de nombre minimum.

exemple :
DB-cleanup --applications "MyAppNumber1, MyAppNumber2" --olderthan "0" --keepatleast "0"



Aller plus loin

1 - Il est possible de lister tous les paramètres avec la commande "DB-cleanup -help"

DB-cleanup -help
INFO : Parsing options from application config file
INFO : Parameters from configuration file:
INFO :     olderThan =
INFO :     keepAtLeast =
INFO :     applications =
INFO :     workflows =
INFO :     archivedOnly =
INFO :     force = false
INFO :     verbose = max
INFO :     fi =
INFO :     id =
DBCleanup 8.0.0.0
Copyright © Automic Software GmbH

  --connectionString    Connection string to the ARA database.

  --olderThan           Only executions having an end-date older than the
                        specified number of days are considered. Default is 90.

  --keepAtLeast         Defines how many executions must remain per workflow
                        independent from their end date. Default value is 5.

  --applications        Comma-separated list of application names. If set, only
                        executions of the specified applications are considered.

  --workflows           Comma-separated list of workflow names. For application
                        workflows this parameters has to be set in conjunction
                        with the applications parameter. If the applications
                        parameter is not set, only general workflows are
                        considered.

  --archivedOnly        Flag whether only archived executions should be
                        deleted. Default value is False.

  --force               Flag whether the utility should also delete executions
                        that belong to a current installation. Default value is
                        False

  --verbose             Level of textual output to screen or log file. Possible
                        values: min, med, and max. Default is min.

  --fi                  Optionally mirror screen output to a log file. Messages
                        will have timestamp appended before it.

  --id                  Comma-separated id of executions to be deleted. At
                        most, you can specify 100 executions id using this
                        switch.

  --ignorestatus

  --help                Display this help screen.


2 - Vous pouvez sauvegarder les paramètres de maintenance directement dans "DB-Cleanup.exe.config" avec des balises  <add key>.

exemple:
<add key "applications" value="MyApp1,MyApp2">


Cordialement,
Antoine

Outcomes