1. 显示当前目录
pwd
2 远程复制
scp ics20140902_0200.DMP oracle@10.10.16.40:./hpdata
3 重启数据库
lsnrctl stop;--监听服务停止
shutdown immediate;
startup;
4 进入Oracle
sqlplus "/as sysdba"
5 删用户
SQL>drop user hlj cascade;
6 建用户
SQL>create user hlj identified by hlj default tablespace users;
SQL>grant resource to hlj;
SQL>grant connect to hlj;
SQL>grant dba to hlj;
7 建目录
SQL>create directory HLJDIR as ‘/home/oracle/hpdata‘;
SQL>Grant read,write on directory DUMPDIR to lh;
8 导入库
impdp hlj/hlj DIRECTORY=DUMPDIR DUMPFILE=ics20140912_1408.DMP remap_schema=ics:hlj FULL=Y IGNORE=Y --新建数据库
impdp hlj2/hlj DIRECTORY=HLJDIR DUMPFILE=ics20140919_0820.DMP remap_schema=ics:hlj2 TABLE_EXISTS_ACTION=REPLACE --替换已存在数据库