Creating cdc table in a different database

Advertisement

Creating cdc table in a different database
this is my code which creates cdc table.
how do i create my cdc table in a different db and not in the db where my source is residing.<i think i need to use db link but where do i specify it??>
SQL> exec dbms_logmnr_cdc_publish.create_change_table(owner => 'dvd', -
change_table_name => 'classes_ct', -
change_set_name => 'SYNC_SET', -
SOURCE_SCHEMA => 'dvd', -
SOURCE_TABLE => 'classes', -
COLUMN_TYPE_LIST => 'class_id NUMBER, -
class_title VARCHAR2(30), -
class_instructor VARCHAR2(30), -
class_term_code VARCHAR2(6), -
class_credits NUMBER', -
CAPTURE_VALUES => 'both', -
RS_ID => 'y', -
ROW_ID => 'n', -
USER_ID => 'n', -
TIMESTAMP => 'y', -
OBJECT_ID => 'n', -
SOURCE_COLMAP => 'y', -
TARGET_COLMAP => 'n',-
OPTIONS_STRING => null);PL/SQL procedure successfully completed.
Repaly
Still fails.  Here is table definition in new database, confirmed identical with original database:
CREATE TABLE [dbo].[Networks](
        [ID] [binary](5) NOT NULL,
        [Description] [varchar](255) NULL,
        [Network] [binary](4) NOT NULL,
        [Netmask] [binary](4) NOT NULL,
        [Parent] [binary](5) NULL,
        [RowID] [uniqueidentifier] ROWGUIDCOL  NOT NULL,
        [RowVersion] [timestamp] NOT NULL,
 CONSTRAINT [PK_Networks] PRIMARY KEY CLUSTERED
        [RowID] ASC
)WITH (PAD_INDEX  = OFF,
       STATISTICS_NORECOMPUTE  = OFF,
       IGNORE_DUP_KEY = OFF,
       ALLOW_ROW_LOCKS  = ON,
       ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [IX_Networks] UNIQUE NONCLUSTERED
        [ID] ASC
)WITH (PAD_INDEX  = OFF,
       STATISTICS_NORECOMPUTE  = OFF,
       IGNORE_DUP_KEY = OFF,
       ALLOW_ROW_LOCKS  = ON,
       ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
I also created an Execute SQL Task which specifically did not include either the RowID or RowVersion columns, and it STILL dies with exactly the same error.
I'm stumped by this behavior - this makes no sense whatsoever.
Read More: The other 12 answers