I could not import materialized view from one scema to another. Any work arounds? Thanks.
Printable View
I could not import materialized view from one scema to another. Any work arounds? Thanks.
describe the steps you took and the errors you receivedQuote:
Originally posted by dba1
I could not import materialized view from one scema to another. Any work arounds? Thanks.
Schema A is set to have replication feature.
Steps:
1) I export db from schema A.
2) I import it to schema B.
Here is the error message below. Obviously, 'imp.exe' does not replace schema name 'A' with 'B'.
IMP-00015: following statement failed because the object already exists:
"CREATE SNAPSHOT LOG ON "A"."FORECAST" WITH PRIMARY KEY EXCLUDIN"
"G NEW VALUES USING ("MLOG$_FORECAST", ........
full import statement please
We have found the explanation from Oracle's doc. Here it is:
Importing a Snapshot into a Different Schema
Snapshots, snapshot logs, and related items are exported with the schema name explicitly given in the DDL statements; therefore, snapshots and their related items cannot be imported into a different schema.
If you attempt to use FROMUSER and TOUSER to import snapshot data, an error will be written to the Import log file and the items will not be imported.
time to change the import file then with the correct user