-
Notifications
You must be signed in to change notification settings - Fork 5
Command line parameters
About usage modes read here.
In all deployment modes two parameters are mandatory: --packet-name and --db-name.
Ways to list target databases:
--db-name=my_db_01 # deployment on the specified database only
--db-name=my_db_01,my_db_02 # deployment on the listed databases
--db-name=my_db_0* # deployment on databases matching mask
--db-name=ALL # deployment will be carried out on all databases specified in the [databases] section of db_converter.conf file
--db-name=ALL,exclude:my_db_01,my_db_02 # deployment on all databases except those listed after ",exclude:"
--db-name=ALL,exclude:my_db_0* # deployment on all databases except those matching the mask "my_db_0*"
--db-name=ALL,exclude:my_db_0*,my_db_10 # deployment on all databases except those matching the mask "my_db_0*" and except "my_db_10"By default, conversion is performed in parallel (asynchronous) mode on all specified databases. In some cases, sequential execution in the specified order is required. To do this use the --seq key.
Deployment options:
-
--seq- sequential execution in order listed indb_converter.conf -
--force- ignore the difference between packet hashes. If the first execution of packet was completed with an error not related to the connection and this packet was modified during the next launch, then execution requires confirmation without--forceoption -
--skip-step-cancel - skip whole step on first error likeDeadlock,QueryCanceledError` -
--skip-action-cancel - skip action errors likeDeadlock,QueryCanceledError`
Additional options that can be used with --db-name and --packet-name (one of the following):
-
--status- get status of the packet for specified base (possible statuses:done,started,exception,new) -
--wipe- delete information about--packet-namefrom action tracker (dbc_*tables) -
--stop- executepg_terminate_backendfor all db_converter's connections with specific packet name -
--list- list all databases according--db-namemask -
--unlock- unlock the specified packet (delete row fromdbc_lockstable)
Extended options:
-
--template- copy*.sqlfiles frompackets/templates/templatetopackets/packet-name -
--version- show version ofdb_converter
The types of errors, which is affected by parameters --skip-*-errors:
| Exception name | Code | Description |
|---|---|---|
| QueryCanceledError | 57014 | Class 57 - Operator Intervention |
| AdminShutdownError | 57P01 | Class 57 |
| CrashShutdownError | 57P02 | Class 57 |
| ServerNotReadyError | 57P03 | Class 57 |
| DeadlockError | 40P01 | Class 40 - Transaction Rollback |
If --skip-*-errors are not specified, then a re-transaction will be performed for the above exceptions, after conn_exception_sleep_interval seconds.
All other types of exceptions will cause the packet deployment to complete, with the stack trace written to the dbc_steps.exception_descr table.