exp日常操作有哪些
admin
2023-04-25 13:42:30
0

1、跟踪exp导出操作

strace -o sexp.txt exp user/password file=exptable.dmp buffer=4096000

or

ps -ef |grep exp 

strace -c -p exp_pid

eg:

[oracle@orcl ~]$ strace -c -p 3859

Process 3859 attached - interrupt to quit

Process 3859 detached

% time     seconds  usecs/call     calls    errors syscall

------ ----------- ----------- --------- --------- ----------------

 87.38    0.004672        2336         2           brk

  6.62    0.000354           0      2045           write

  6.00    0.000321           0      1882           read

  0.00    0.000000           0         5           close

  0.00    0.000000           0        18           lseek

  0.00    0.000000           0         4           munmap

  0.00    0.000000           0         1           rt_sigaction

  0.00    0.000000           0         2           rt_sigprocmask

------ ----------- ----------- --------- --------- ----------------

100.00    0.005347                  3959           total

2、EXP-00091: Exporting questionable statistics

[oracle@orcl ~]$ exp lineqi/lineqi file=/home/oracle/aaa.dmp tables=aaa  query=\" where id=2 \"

Export: Release 11.2.0.4.0 - Production on Sat Oct 21 13:22:12 2017

……………………

About to export specified tables via Conventional Path ...

. . exporting table                            AAA          1 rows exported

EXP-00091: Exporting questionable statistics

导出部分表中数据,提示统计信息有问题,这里可以加上statistics=none参数

exp lineqi/lineqi file=/home/oracle/aaa.dmp tables=aaa  query=\" where id=2 \" statistics=none

About to export specified tables via Conventional Path ...

. . exporting table                            AAA          1 rows exported

Export terminated successfully without warnings.

出现EXP-00091还有可能是数据库字符集与客户字符集(NLS_LANG)不一致,

select * from v$nls_parameters where parameter like 'NLS_CHARACTERSET%';

NLS_CHARACTERSET                AL32UTF8

[oracle@orcl ~]$ echo $NLS_LANG

AMERICAN_AMERICA.ZHS16GBK

[oracle@orcl ~]$ exp lineqi/lineqi@satdb file=/home/oracle/aaa04.dmp tables=aaa  

Export: Release 11.2.0.4.0 - Production on Sat Oct 21 13:36:18 2017

About to export specified tables via Conventional Path ...

. . exporting table                            AAA         14 rows exported

EXP-00091: Exporting questionable statistics.

Export terminated successfully with warnings.

3、获取exp导出dump文件中表信息

strings test02.dmp |grep "CREATE TABLE"|awk '{print $3}'|sed 's/"//g'

AAA

BFW_TEST

CBC_TEST

EMP1

PAGE

strings test02.dmp |grep "CREATE TABLE"|awk '{print $3}'|sed 's/"//g'|awk '{if(FNR==1) print "table="$1;else print ","$1}'

table=AAA

,BFW_TEST

,CBC_TEST

,EMP1

,PAGE

相关内容

热门资讯

沈伯洋与台北市长格局有落差,叶... 海峡导报综合报道 民进党将正式拍板征召民代沈伯洋出战台北市长,并发布采访通知,预计在13日下午举行台...
核查:上世纪已有多款汉坦疫苗上... 明查员 冯梦速览- 人类感染汉坦病毒已有数十年历史。朝鲜战争期间,联合国军就曾有过大规模感染。汉坦病...
如何从“一证在手”走向“一技傍... 教员在给学员讲解理论知识。 学员在进行无人机试飞训...
内蒙古自治区党委金融工作委员会... 内蒙古自治区党委金融工作委员会副书记马保国涉嫌严重违纪违法,目前正接受内蒙古自治区纪委监委纪律审查和...
涉非市场化发债,老牌房企花样年... 【大河财立方消息】 5月12日,深圳证监局发布行政监管措施决定书显示,花样年集团(中国)有限公司因非...
郑州市今年计划新入库45个城市... 【大河财立方消息】5月12日,郑州市城乡建设局就《郑州市2026年度城市更新计划(征求意见稿)》公开...
让无名者有名,让英雄回家!湖南... 1948年秋冬,辽沈战役的硝烟刚刚散去,一大批东北子弟兵随军南下。不到一年后,1949年8月,300...
伊方透露新一轮谈判先决条件 当地时间12日,伊朗方面发布消息称,一名知情人士透露了伊朗同美国新一轮谈判的五项先决条件 ——即“结...
中东危机下,莫迪将密集访问5国 【环球时报驻巴基斯坦特约记者 黄晓娜】印度外交部11日宣布,印度总理莫迪将于15日开始对阿联酋、荷兰...