关于expdp的几个小问题

来源:互联网 发布:java主方法入口 编辑:程序博客网 时间:2024/05/22 12:43

今天帮开发导数据,数据量很大,还有很多clob字段。遇到几个小问题,总结一下


(1)开发远程exp导出的时候遇到问题


      EXP-00113: Feature New Composite Partitioning Method is unsupported. Table user.tab could not be exported。


     11G引入了INTERVAL分区,但是INTERVAL分区却不支持EXP导出,只支持DATA PUMP的导出。我们一些表使用了分区新特性,并且是复合分区


(2)想expdp在服务器端导出吧,导出的时候数据库负载有些偏高,为了避免影响,决定取消job。


 取消Ctrl+C以后出现了export命令交互窗口,不小心退出了。然后job还在运行。


select * from v$session 看不到这个任务。呃,当然查不到了,因为视图不对嘛,笨蛋


select owner_name owr,job_name jbn,operation ope,job_mode jbm,state,degree,attached_sessions atts,datapump_sessions dats

 from dba_datapump_jobs;

当时使用的方法是


lsof  /home/.../uc_test_1211.dmp 


可以看到操作文件的spid,ps -ef|grep spid 看到进程为 ora_dm_0001 ,kill -9


 (3)使用dblink可以实现远程expdp


1.创建TNS字符串

FHACDB =  (DESCRIPTION =    (ADDRESS_LIST =      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.101)(PORT = 1523))    )    (CONNECT_DATA =      (SERVICE_NAME = fhacdb)    )  )

2.创建DIRECTORY并授权

SQL> create directory imp as '/home/oracle';Directory created.SQL> grant read,write on directory imp to storage;Grant succeeded.

3.创建DB_LINK

SQL> create public database link l_storage connect to storage identified by storage using 'fhacdb';Database link created.

4.使用IMPDP的NETWORK_LINK进行迁移操作

[oracle@fhacdb admin]$ impdp storage/storage directory=imp network_link=l_storageImport: Release 11.2.0.2.0 - Production on Wed Feb 15 11:02:18 2012Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 With the Partitioning, OLAP, Data Mining and Real Application Testing options.... . 导入了 "STORAGE"."T_DICTIONARY"           123371行. . 导入了 "STORAGE"."CHN_WEST_DATE"          198702行. . 导入了 "STORAGE"."T_FILE_INFO_RAW"         25176行. . 导入了 "STORAGE"."T_FILE_INFO"              6657行. . 导入了 "STORAGE"."T_LOG_INFO"               6476行. . 导入了 "STORAGE"."T_BATCH_QUALITY"          4760行

这个例子是从别人那里拿的参考,参考连接为


http://www.dbdream.org/?p=349
0 0