Encountering ORA-31685 on datapump import and I don't understand why
BillWJan 1 2013 — edited Jan 3 2013Greetings,
I am attempting to migrate an existing OEM repository to a new server in order to upgrade OEM. The RDMS version is 11.1.0.7 on each server. Due to platform differences (source=SPARC, destination=Linux) I must use export/import. I am using the datapump.
I precreated the database using the DBCA, created the OPS$ORACLE user, granted it DBA privileges and then initially performed the import as ops$oracle. The import failed to create a materialized view due to error ORA-31685. The view is owned by SYSMAN which the import creates. On the source I see the following -
SQL> select * from dba_mviews;
SYSMAN MGMT_ECM_MD_ALL_TBL_COLUMNS
MGMT_ECM_MD_ALL_TBL_COLUMNS
SELECT c.METADATA_ID, c.TARGET_TYPE, c.SNAPSHOT_TYPE, c.TABLE_NAME,
c.NAM
2036 N
N NONE DEMAND FORCE DEFERRED NO COMPLETE 02-SEP-10
FRESH NA N N N N N N VALID N
0
This view does not get created on the destination due to error ORA-31865 on import.
It was suggested to either grant DBA privileges to the user performing the export, the export was done by OPS$ORACLE which has DBA privileges, or grant create user to the user in question, sysman in this case which does have create user in the source database although I am not certain at what step in the process this grant is issued, at creation I expect.
I then tried running the import as user sys and the same error occurred. Although in this case the failing SQL was not displayed in the log file.
I found Metalink note 117136.5 but this does not appear to address my situation.
The export parameter file I am using is -
USERID=/
DIRECTORY=DATAPUMP_DIR
DUMPFILE=expdp_ares_full.dmp
LOGFILE=expdp_ares_full_1.log
JOB_NAME=expdp_ares_full
FULL=Y
REUSE_DUMPFILES=yes
and the import parameter file is -
USERID='sys/<password> as sysdba'
full=y
directory=datapump_dir
dumpfile=expdp_ares_full.dmp
logfile=imp_oemrepos.log
remap_datafile=/local/d01/u01/oracle/emrep:/u01/oracle/oemrepos
remap_datafile=/local/d03/oracle/emrep:/u01/oracle/oemrepos
table_exists_action=append
My questions are -
1) What is the cause of this failure?
2) Can I resolve this one problem without completely redoing the export/import?
Any help is greatly appreciated, thank you.
Bill Wagman