您的位置:首页 > 数据库 > Oracle

Oracle 11g export and import

2016-05-12 14:04 567 查看
a. Export:

sqlplus:

1. conn system/pass@xe as sysdba

2. create directory dump as 'c:\dump';

3. grant read,write on directory dump to public;

cmd:

expdp system/pass@xe schemas=trunk dumpfile=trunk.dmp directory=dumplogfile=trunk.log;

b. Import:

sqlplus:

1. connsystem/pass@xe as sysdba

2. createdirectory dump as 'c:\dump';

3. grantread,write on directory dump to public;

4. createtemporary tablespace tem_space tempfile 'D:\dump\xe\tem_space.dbf' size50m autoextend on next 50m maxsize 20480m extent management local;

5. createtablespace sungard datafile 'c:\dump\xe\sungard.dbf' size 50M autoextend onnext 50M maxsize 20480M;

6. create user trunk identified by pass default tablespace sungard temporary tablespacetem_space;

7. grantconnect,resource,dba to trunk;

cmd:

impdpsystem/pass directory=dump dumpfile=nxg_it.dmp REMAP_SCHEMA=nxg_it:trunkfull=y;

ps: REMAP_SCHEMA = [dump文件对应的user]:[自己数据库新建的user], 同理 REMAP_TABLESPACE
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: