prosync — utility to replay changes to a source database on a destination database of a different type
prosync config generate [option...]
prosync init [option...]
prosync run [option...]
prosync complete [option...]
prosync is a utility to perform the change data capture (CDC) of a source database and replay the changes on a destination database of a different type.
prosync is not responsible for:
Database schema transfer.
Transferring data that is missing from log files.
Data verification after the data transfer.
prosync participates in the hot DB migration (see Section 4.5 for more details).
To prepare for the migration of a hot DB, perform the following steps:
Prepare and set up the destination DB for the migration:
Create the necessary schemas and tables.
Remove or turn off triggers.
Generate the configuration file:
prosync config generate -o filename
Update the configuration file with appropriate values.
Initialize prosync with the command:
prosync init -f filename
For an Oracle source, prosync will store the current SCN to start the subsequent replication with this value. For a PostgreSQL/Postgres Pro source, prosync will create a logical replication slot for subsequent reading of changes.
Perform the migration as follows:
Launch the procopy load:
procopy load -f filename
When it finishes, launch the prosync replay of changes:
prosync run -f filename
Wait until the difference between Parsing SCN and
Oracle latest SCN decreases to an admissible value.
For the migration of a hot DB, it is critical for this difference
to decrease:
Parsing SCN 3671057 Oracle latest SCN 4995972
Disable the load on the source DB and wait until Parsing SCN
and Oracle latest SCN virtually stop changing.
Stop prosync.
Changes always occur in Oracle even if
nobody changes the data, so Oracle latest SCN
is continuously growing. Therefore, the difference between
Parsing SCN and Oracle latest SCN
never reaches zero.
Table Type #
When executing tasks of the TABLE type (see the section called “Types of Tasks” for details) during data migration
involving prosync, do not exclude (through
exclude_columns
or include_columns)
columns that are used by LogMiner as a
row key. Otherwise, executing DELETE or UPDATE
commands can change more than one row.
For tables without keys (heap), do not exclude any columns as LogMiner uses the whole row for identification.
These rules do not apply for data migrations that are only performed by procopy.
When migrating the PostgreSQL/Postgres Pro DB, a replication slot is needed for running prosync replay of changes. Therefore:
This section describes prosync commands. Optional parameters are enclosed in square brackets.
prosync config generate [-f|--formatjson|yaml] [-o|--outputfilename] [-c|--source_config]
Generates a prosync configuration file.
-f json|yaml--format json|yamlSpecifies the format of the configuration file: JSON or YAML. The default is YAML.
-o filename--output filenameSpecifies the filename of the configuration file. By default, the configuration file will be output to stdout.
-c--source-configUse the procopy configuration file as the basis of the prosync configuration file and add missing options there.
prosync init -f|--file filename [-u|--update-config]
Gets the current SCN from the source database.
-f filename--file filenameName of the configuration file, where the connection options are specified.
-u--update-configUse the procopy configuration file as the basis and add missing options there.
prosync run -f|--filefilename[--log-levelerror|warn|info|debug] [--dry-run|--read-only] [-c|--clear] [--with-table-stats]
Launches the replay of changes to the source DB on the destination DB.
-f filename--file filenameName of the configuration file, where the connection options are specified.
--log-level error|warn|info|debug
Logging level. The default is info.
--dry-runTurns off writing to the destination. prosync will perform all the operations except writing. This flag is useful for checking the performance of writing.
--read-onlyTurns off all the prosync logic except reading from the source. This flag is useful for checking the performance of reading.
-c--clearClear the screen before each next output of the statistics. When enabled, it is recommended to output logs to a file, as follows:
prosync run ... -c 2>prosync.log
--with-table-statsOutput the extended statistics on tables.