Professional Documents
Culture Documents
Next login as MVAULT and create the directory where you want the backup. The backup directory should already
exist:
C:\> sqlplus MVAULT/ MVAULT
SQL> create or replace directory mybackup_dir as 'C:\db_backup;
SQL> exit
[NOTE: Directory db_backup must exist in C:\ before executing above command]
Some dumps are done as one user and imported as another. If you are not importing as the same user, then you
need to explicitly state this by adding the following parameter to your command line:
REMAP_SCHEMA=palantir_user:new_user
Thus the total command line would look as follows:
[oracle]$ impdp palantir_user/password schemas=palantir_user directory=dmp_dir
dumpfile=palantir_031707.dmp logfile=imp_palantir_031707.log REMAP_SCHEMA=palantir_user:new_user
In addition, if you are switching tablespaces, you'll need to remap tablespaces:
REMAP_TABLESPACE=support:users
Lastly, always run dbms stats after an imp:
[oracle]$ . oraenv
ORACLE_SID = oracle ? oracle
[oracle]$ sqlplus new_user/password
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Feb 17 17:05:17 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> exec dbms_stats.gather_schema_stats('new_user');
Note - the 'new_user' argument is the schema name to run statistics against. This is usually the same as your
username.