一、打开cmd输入导出语句。
导出数据库语句:
expdp sw_new/123456@0.0.0.0/orcl schemas=sw_new dumpfile=127real.dmp
expdp(impdp) username/password@SERVICENAME/orcl schemas=username dumpfile=file.dmp
导出后DMP文件在服务器上:
将DMP文件复制粘贴到本地:
二、创建表空间。
create tablespace SW_NEW_LOCAL datafile 'F:\app\Administrator\oradata\orcl\xtbg.dbf' size 100m autoextend on next 50 m;
创建用户。
-- Create the user
create user SW_NEW_LOCAL
identified by 123456
default tablespace SW_NEW_LOCAL
temporary tablespace TEMP
profile DEFAULT;
-- Grant/Revoke role privileges
grant connect to SW_NEW_LOCAL;
grant dba to SW_NEW_LOCAL;
grant resource to SW_NEW_LOCAL;
-- Grant/Revoke system privileges
grant create any procedure to SW_NEW_LOCAL;
grant select any table to SW_NEW_LOCAL;
grant unlimited tablespace to SW_NEW_LOCAL;
三、将12711REAL.DMP导入本地数据库。
导入语句:
impdp sw_new_local/123456@orcl dumpfile=12711REAL.DMP
打开cmd输入命令语句。
四、数据库查看表 。