Question: How do I use the
encryption_mode parameter to hide the password in an export job.
I'm using a data pump export (expdp) and I want to hide the
password.
Answer:
The Data Pump expdp
encryption_mode parameter specifies the type
of security and accepts the following values:
-
password: Required to provide a
password to encrypt the dump file
-
transparent: Requires a wallet to
use
-
dual: Creates a dump file which
might be imported using both the above mentioned modes
-
encryption_password: Is used to
provide a password for the dump file and differs between
Oracle 10g and 11g. If this parameter is used, then the
encryption parameter's default value becomes ALL. If both
parameters are omitted, then the encryption parameter is set
to NONE.
In the following example, use all parameters to export data
that is encrypted and password provided using the AES256 algorithm
mode:
expdp usr1/usr1
dumpfile=dp_dir:test.dmp logfile=dp_dir:test.log encryption=all
encryption_mode=password encryption_password=test
encryption_algorithm=aes256 tables='tbl_test';
When you try to import the dump file without providing any
password, you get the following error:
impdp usr2/usr2 remap_schema=usr1:usr2
dumpfile=dp_dir:test.dmp logfile=dp_dir:log.dmp
ORA-39002: invalid operation
ORA-39174: Encryption password must be supplied.
However, by supplying the correct password, you are able to
import the object:
impdp usr2/usr2
remap_schema=usr1:usr2 dumpfile=dp_dir:test.dmp logfile=dp_dir:log.log
encryption_password=test