Oracle使用impdp进行用户复制

impdp数据库迁移(单用户复制)

关应用

停止所有对数据库的RUD操作

在新数据库中删除及创建用户及赋权

sqlplus / as sysdba
create user bjzjxt identified by Admin123
grant connect, resource, dba to bjzjxt;
grant create public database link to bjzjxt;

创建虚拟路径

create directory dppath as '/u01/dppath';

给新用户赋读取及修改路径的权限

grant read, write on directory dppath to bjzjxt;
create public database link bjzjxt_old connect to bjzjxt identified by Admin123 using '(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL = TCP)(HOST = 192.168.100.9)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = ORCL11G)))'; 

复制数据

impdp bjzjxt/Admin123 directory=dppath  network_link=bjzjxt9 remap_schema=bjzjxt:bjzjxt;

你可能感兴趣的:(Oracle)