-
Problems with snapshot replication
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
-
you can use
CREATE MATERIALIZED VIEW name
build immediate
refresh fast on demand
with rowid
as
select * from master_table@dblink
-
a possible way
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 )
-
CAN YOU EXECUTE OF THIS WAY
CREATE MATERIALIZED VIEW DA_TEST_TABLE_NOPK
BUILD IMMEDIATE
REFRESH FAST ON DEMAND
WITH ROWID
AS
SELECT * FROM DA_TEST_TABLE_NOPK@master_side;
-
Neither one of your three posts answers poster's question.
Have you read the original post?
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|