关于exp statistics的问题和简单测试(82天)

在数据导出的时候,可能会碰到EXP-00091: Exporting questionable statistics.的问题,有时候会让人有点摸不到头脑,不知道该调整什么。 这个时候NLS_LANG就发挥作用了。

[ora11g@rac1 ~]$ exp n1/n1 tables=t file=t.dmp rows=n 
Export: Release 11.2.0.3.0 - Production on Fri May 23 19:26:35 2014 
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved. 
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production 
With the Partitioning, OLAP, Data Mining and Real Application Testing options 
Export done in US7ASCII character set and AL16UTF16 NCHAR character set 
server uses AL32UTF8 character set (possible charset conversion) 
Note: table data (rows) will not be exported 
About to export specified tables via Conventional Path ... 
. . exporting table                              T 
EXP-00091: Exporting questionable statistics. 
Export terminated successfully with warnings. 

可以通过查询字符集来判断是否和客户端的有出入。?

SQL>  select * from v$nls_parameters where parameter='NLS_CHARACTERSET'; 
PARAMETER 
---------------------------------------------------------------- 
VALUE 
---------------------------------------------------------------- 
NLS_CHARACTERSET 
AL32UTF8 
SQL> host
echo的结果不是没设置,就可能是设置的有问题。重新设置,问题就解决了。 
[ora11g@rac1 ~]$ echo $NLS_LANG 
[ora11g@rac1 ~]$ export NLS_LANG=AMERICAN_AMERICA.AL32UTF8 
[ora11g@rac1 ~]$ exp n1/n1 tables=t file=t.dmp rows=n 
Export: Release 11.2.0.3.0 - Production on Fri May 23 19:28:42 2014 
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved. 
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production 
With the Partitioning, OLAP, Data Mining and Real Application Testing options 
Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set 
Note: table data (rows) will not be exported 
About to export specified tables via Conventional Path ... 
. . exporting table                              T 
Export terminated successfully without warnings.

当然了,对于这个问题,提示导出的statistics信息有问题,来测试一下在有警告的情况下,导入是否有问题。我们换一个用户,看看统计信息是否能够导入。

[ora11g@rac1 ~]$ exp n1/n1 tables=t file=t.dmp rows=n
Export: Release 11.2.0.3.0 - Production on Fri May 23 19:53:24 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production 
With the Partitioning, OLAP, Data Mining and Real Application Testing options 
Export done in US7ASCII character set and AL16UTF16 NCHAR character set 
server uses AL32UTF8 character set (possible charset conversion) 
Note: table data (rows) will not be exported
About to export specified tables via Conventional Path ... 
. . exporting table                              T 
EXP-00091: Exporting questionable statistics. 
Export terminated successfully with warnings.

SQL> create table testo.t tablespace pool_data as select *from n1.t where rownum<2;
Table created.
[ora11g@rac1 ~]$ imp testo/oracle file=t.dmp tables=t statistics=always
Import: Release 11.2.0.3.0 - Production on Fri May 23 19:54:01 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production 
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export file created by EXPORT:V11.02.00 via conventional path
Warning: the objects were exported by N1, not by you
import done in US7ASCII character set and AL16UTF16 NCHAR character set 
import server uses AL32UTF8 character set (possible charset conversion) 
. importing N1's objects into TESTO 
. importing N1's objects into TESTO 
Import terminated successfully without warnings.

可以看到,没有任何的警告,查看统计信息,发现已经导入了。尽管表里没有数据,但是由于统计信息的导入,显示数据条数还是600多万。

********** TABLE GENERAL INFO *****************
TABLE_NAME                     PAR TABLESPACE STATUS   NUM_ROWS     BLOCKS EMPTY_BLOCKS LOG MON ROW_MOVE LAST_ANAL 
------------------------------ --- ---------- ------ ---------- ---------- ------------ --- --- -------- --------- 
T                              NO  POOL_DATA  VALID     6856704      39174            0 NO  YES DISABLED 23-MAY-14

原文发布于微信公众号 - 杨建荣的学习笔记(jianrong-notes)

原文发表时间:2014-05-24

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

发表于

我来说两句

0 条评论
登录 后参与评论

相关文章

来自专栏Ceph对象存储方案

Luminous版本PG 分布调优

Luminous版本开始新增的balancer模块在PG分布优化方面效果非常明显,操作也非常简便,强烈推荐各位在集群上线之前进行这一操作,能够极大的提升整个集群...

3195
来自专栏一个会写诗的程序员的博客

Spring Reactor 项目核心库Reactor Core

Non-Blocking Reactive Streams Foundation for the JVM both implementing a Reactiv...

2192
来自专栏大内老A

The .NET of Tomorrow

Ed Charbeneau(http://developer.telerik.com/featured/the-net-of-tomorrow/) Exciti...

32010
来自专栏张善友的专栏

LINQ via C# 系列文章

LINQ via C# Recently I am giving a series of talk on LINQ. the name “LINQ via C...

2665
来自专栏芋道源码1024

熔断器 Hystrix 源码解析 —— 断路器 HystrixCircuitBreaker

本文主要基于 Hystrix 1.5.X 版本 1. 概述 2. HystrixCircuitBreaker 3. HystrixCircuitBreaker....

5367
来自专栏跟着阿笨一起玩NET

c#实现打印功能

2812
来自专栏张善友的专栏

Silverlight + Model-View-ViewModel (MVVM)

     早在2005年,John Gossman写了一篇关于Model-View-ViewModel模式的博文,这种模式被他所在的微软的项目组用来创建Expr...

2988
来自专栏陈仁松博客

ASP.NET Core 'Microsoft.Win32.Registry' 错误修复

今天在发布Asp.net Core应用到Azure的时候出现错误InvalidOperationException: Cannot find compilati...

4878
来自专栏闻道于事

js登录滑动验证,不滑动无法登陆

js的判断这里是根据滑块的位置进行判断,应该是用一个flag判断 <%@ page language="java" contentType="text/html...

6948
来自专栏我和未来有约会

Kit 3D 更新

Kit3D is a 3D graphics engine written for Microsoft Silverlight. Kit3D was inita...

2586

扫码关注云+社区