Home » RDBMS Server » Server Utilities » Expdp/Impdp in Oracle 12c (Linux, Oracle 12c)
Expdp/Impdp in Oracle 12c [message #641024] Sun, 09 August 2015 14:51 Go to next message
krish96
Messages: 74
Registered: October 2012
Member
Hello Experts,


I am trying to take an export of a schema from 12c PDB using these parameters in par file..

USERID="/ as sysdba"
DIRECTORY=DATA_PUMP_DIR
DUMPFILE=expdp_PDBUSR.dmp
LOGFILE=expdp_PDBUSR.log
SCHEMAS=PDBUSR


and I am Getting error...


Export: Release 12.1.0.2.0 - Production on Sun Aug 9 15:48:59 2015

Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
ORA-39001: invalid argument value
ORA-39170: Schema expression 'PDBUSR' does not correspond to any schemas.


Please help me with expdp parameters.. and i am new to 12c..

Thanks in advance..
Re: Expdp/Impdp in Oracle 12c [message #641025 is a reply to message #641024] Sun, 09 August 2015 15:02 Go to previous messageGo to next message
John Watson
Messages: 8640
Registered: January 2010
Location: Global Village
Senior Member
You are connecting to the root container, but your schema is in a pluggable container. You need to connect through the PDB's service, though the listener, not using "/as sysdba".
Re: Expdp/Impdp in Oracle 12c [message #641026 is a reply to message #641025] Sun, 09 August 2015 15:14 Go to previous messageGo to next message
krish96
Messages: 74
Registered: October 2012
Member
Thanks a lot for reply John,

I have changed the parfile as below..

USERID=PDBDBA/password@PDBSERVICENAME
DIRECTORY=DATA_PUMP_DIR
DUMPFILE=expdp_PDBUSR.dmp
LOGFILE=expdp_PDBUSR.log
SCHEMAS=PDBUSR

Here's the out put..


ORA-31626: job does not exist
ORA-31633: unable to create master table "PDBDBA_USER.SYS_EXPORT_SCHEMA_05"
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPV$FT", line 1048
ORA-01031: insufficient privileges
Re: Expdp/Impdp in Oracle 12c [message #641027 is a reply to message #641026] Sun, 09 August 2015 15:19 Go to previous messageGo to next message
John Watson
Messages: 8640
Registered: January 2010
Location: Global Village
Senior Member
Now it is time for you to think. What makes you think that PDBDBA, whoever he is, has the necessary privileges? What views are you going to query to find out what privileges he hs? What privileges will he need?
Re: Expdp/Impdp in Oracle 12c [message #641194 is a reply to message #641027] Tue, 11 August 2015 12:41 Go to previous messageGo to next message
krish96
Messages: 74
Registered: October 2012
Member
John,

I am able to take the expdp from dev database and copied those dmp files to test DB server and started importing the schema .. here's what i am seeing the error from test impdp..

ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39087: directory name DATA_PUMP_DIR is invalid


Here's how i created the directory on the database ..

SQL> CREATE or REPLACE DIRECTORY DATA_PUMP_DIR AS '/DBBackup/Backup';

Directory created.

SQL> commit;

Commit complete.

SQL> GRANT READ ON DIRECTORY DATA_PUMP_DIR to system;

Grant succeeded.

SQL> commit;

Commit complete.

SQL> GRANT WRITE ON DIRECTORY DATA_PUMP_DIR TO system;

Grant succeeded.

SQL> commit;

Commit complete.

SQL> grant datapump_exp_full_database to system;

Grant succeeded.

SQL> commit;

Commit complete.

SQL> grant datapump_imp_full_database to system;

Grant succeeded.

SQL> commit;

Commit complete.


here's the parfile..

userid=system/passworddbA@PDB_Instance
DIRECTORY=DATA_PUMP_DIR
DUMPFILE=expdp_PDBUSR.dmp
LOGFILE=expdp_PDBUSR.log
SCHEMAS=PDBUSR

and i have tried the same by command line, even that not working and i have verified DATA_PUMP_DIR is haing valid location on the server and able to create the files and copy ..etc..

please let me know if you have anyother suggestions..

Thanks in advance..
Krish

Re: Expdp/Impdp in Oracle 12c [message #641195 is a reply to message #641194] Tue, 11 August 2015 12:48 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
which OS USER owns both folders "/DBBackup/Backup" ?
What is OS file system protection mask on these 2 directories?
which OS user is responsible for creating the log file?

Compare & contrast file/directory ownership between source system (expdp) and target system (impdp) & protection masks on them.
Previous Topic: export with sysdate
Next Topic: ORA-31693: Table data object failed to load/unload and is being skipped due to error
Goto Forum:
  


Current Time: Mon Nov 29 03:35:10 CST 2021