DDL Statements for Manually Creating Recovery Tables
DDL Statements for Manually Creating Recovery Tables
Data Replication requires recovery tables on most targets to prevent the Applier from replicating previously applied data again when the Applier task restarts.
The Applier uses recovery tables for all target types except
Apache Kafka,
Cloudera,
Flat File,
and Hortonworks
.
For Kafka targets, Data Replicaton uses a checkpoint file instead of a recovery table.
Typically, the Applier creates recovery tables. However, if an error occurs while the Applier is creating recovery tables, or if the recovery tables become damaged or corrupted, you can use the following CREATE TABLE statements to manually create the recovery tables.
In these DDL statements, replace the following strings with actual values:
db
represents the name of the target database with the recovery table.
owner
represents the name of the owner of the recovery table.
table
represents the table name of the recovery table.
Amazon Redshift,
DB2 for Linux, UNIX, and Windows,
Greenplum, Netezza
, PostgreSQL
, and Teradata:
CREATE TABLE "
owner
"."
table
" (config VARCHAR(256) NOT NULL, task_id INT NOT NULL, subtask_id INT, scn DECIMAL(20,0) NOT NULL, scn_low DECIMAL(20,0), cycle_id INT, table_name VARCHAR(256), status VARCHAR(256));
Microsoft SQL Server:
CREATE TABLE [
db
].[
schema
].[
table
] (config VARCHAR(256) NOT NULL, task_id INT NOT NULL, subtask_id INT, scn DECIMAL(20, 0) NOT NULL, scn_low DECIMAL(20, 0), cycle_id INT, table_name VARCHAR(256), status VARCHAR(256));
MySQL:
CREATE TABLE '
db
′.'
table
' (config VARCHAR(256) NOT NULL, task_id INT NOT NULL, subtask_id INT, scn DECIMAL(20, 0) NOT NULL, scn_low DECIMAL(20, 0), cycle_id INT, table_name VARCHAR(256), status VARCHAR(256));
Oracle:
CREATE TABLE "
owner
"."
table
" (config VARCHAR(256) NOT NULL, task_id INT NOT NULL, subtask_id INT, scn NUMBER NOT NULL, scn_low NUMBER, cycle_id INT, table_name VARCHAR(256), status VARCHAR(256));
Vertica
CREATE TABLE "
owner
"."
table
" (config VARCHAR(256) NOT NULL, task_id INT NOT NULL, subtask_id INT, scn DECIMAL(20, 0) NOT NULL, scn_low DECIMAL(20, 0), cycle_id INT, table_name VARCHAR(256), status VARCHAR(256));