I have a table DA_TEST_TABLE_NOPK (this table is without primary keys), and I want to replicate this table into another db using snapshot replication, so i create logs on master side:
CREATE MATERIALIZED VIEW LOG ON DA_TEST_TABLE_NOPK
TABLESPACE DA_LOGS
NOLOGGING
WITH ROWID
EXCLUDING NEW VALUES
Then I create a table DA_TEST_TABLE_NOPK on the replicated side(with the same structure as in master side), and use matview with prebuilt option. But I cant create matview(because of error ORA-12014: table 'DA_TEST_TABLE_NOPK' does not contain a primary key constraint)
CREATE MATERIALIZED VIEW DA_TEST_TABLE_NOPK
ON PREBUILT TABLE
REFRESH FAST ON DEMAND
AS
SELECT * FROM DA_TEST_TABLE_NOPK@master_side;
(master_side -db link to master side )
When I try to create matview 'with rowid', I recieved another error (ORA-12058: materialized view cannot use prebuilt table). So what can you suggest to solve this problem (replicate table without primary key with prebuilt table). Thank you for your's attention
CREATE MATERIALIZED VIEW DA_TEST_TABLE_NOPK
BUILD IMMEDIATE
REFRESH FAST ON DEMAND
WITH ROWID
AS
SELECT * FROM DA_TEST_TABLE_NOPK@master_side;
(master_side -db link to master side )
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Bookmarks