Heim > Datenbank > MySQL-Tutorial > Oracle 11g中用exp不能导出空表,异构平台迁移可以使用expdp、impdp

Oracle 11g中用exp不能导出空表,异构平台迁移可以使用expdp、impdp

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Freigeben: 2016-06-07 17:03:43
Original
947 Leute haben es durchsucht

在Oracle 11g中,exp默认不能导出空表。用传统的exp,imp进行异构平台数据库迁移会比较麻烦。不过可以使用expdp、impdp进行迁移。

在Oracle 11g中,,exp默认不能导出空表。用传统的exp,imp进行异构平台数据库迁移会比较麻烦。不过可以使用expdp、impdp进行迁移。

把64位windows 2003的Oracle11gR2数据库迁移到64位Linux RedHat Enterprise 5中,可以使用expdp、impdp进行迁移数据。

如:Windows为A服务器,Linux为B服务器,数据库用户为test,把A服务器的数据迁移到B服务器中

在A服务器操作:

1、

SQL> create directory expdp_dir as 'D:\mzl\backup ';

SQL> grant read,write on directory expdp_dir to test;

2、在windows目录创建目录D:\mzl\backup

3、在DOS命令窗口导出:

expdp test/test DIRECTORY=expdp_dir DUMPFILE=test.dmp logfile=testexpdp.log

在B服务器中操作:

4、SQL> create directory impdp_dir as '/home/oracle/impdp_dir';

  SQL> grant read,write on directory impdp_dir to test;

1、 在系统中需要有/home/oracle/impdp_dir目录,在impdp_dir目录下必须有读写权限

(chmod 777 impdp_dir)

5、用ftp把A服务器导出的数据上传到B服务器的/home/oracle/impdp_dir目录中

在A服务器中配置好B服务器的服务器名,在A服务器导入数据

6、在DOS命令窗口导出:

imppdp test/test@B_database DIRECTORY=impdp_dir DUMPFILE=test.dmp logfile=testimpdp.log

(这里注意大小写,如果test.dmp在linux中为大写,必须更改为大写。Linux区分大小写)

linux

Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage