未知导出(exp)用户的DMP文件导入(imp)方法及EXP-00091异常原因
如果你手里有个exp导出的dmp文件,不知道导出用户,如何导入?
现在模拟一下,从test导出导入新建用户anbob
[oracle@orazhang ~]$ exp test/test file=test.dbf
Export: Release 10.2.0.1.0 – Production on 星期三 4月 13 17:19:24 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, OLAP and Data Mining options
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
server uses AL32UTF8 character set (possible charset conversion)
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user TEST
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user TEST
About to export TEST’s objects …
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export TEST’s tables via Conventional Path …
. . exporting table TESTCHAR 2 rows exported
EXP-00091: Exporting questionable statistics.
. . exporting table TESTNULL 1 rows exported
EXP-00091: Exporting questionable statistics.
. . exporting table TEST_PRO 2 rows exported
. . exporting table TEST_TRAN 5 rows exported
EXP-00091: Exporting questionable statistics.
. . exporting table TEST_TRI 1 rows exported
EXP-00091: Exporting questionable statistics.
. . exporting table TEST_UNUSE 50706 rows exported
EXP-00091: Exporting questionable statistics.
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting materialized views
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully with warnings.
[oracle@orazhang ~]$ ls
afiedt.buf baiji.java doub.java ed.hup orcldrop.sql test.dbf
a.sql b.sql Download on.lst record wxWidgets-2.9.1
baiji.class Desktop dwhelper oraInventory sqlnet.log
[oracle@orazhang ~]$ ora
SQL*Plus: Release 10.2.0.1.0 – Production on 星期三 4月 13 17:19:44 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, OLAP and Data Mining options
SQL> create user anbob identified by anbob;
User created.
SQL> grant connect,resource to anbob;
Grant succeeded.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, OLAP and Data Mining options
[oracle@orazhang ~]$ imp anbob/anbob file=test.dbf;
Import: Release 10.2.0.1.0 – Production on 星期三 4月 13 17:20:46 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, OLAP and Data Mining options
Export file created by EXPORT:V10.02.01 via conventional path
Warning: the objects were exported by TEST, not by you
import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
import server uses AL32UTF8 character set (possible charset conversion)
. importing TEST’s objects into ANBOB
Import terminated successfully without warnings.
[oracle@orazhang ~]$ imp anbob/anbob file=test.dbf full=y;
Import: Release 10.2.0.1.0 – Production on 星期三 4月 13 17:24:32 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, OLAP and Data Mining options
Export file created by EXPORT:V10.02.01 via conventional path
Warning: the objects were exported by TEST, not by you
import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
import server uses AL32UTF8 character set (possible charset conversion)
. importing TEST’s objects into ANBOB
. . importing table “TESTCHAR” 2 rows imported
. . importing table “TESTNULL” 1 rows imported
. . importing table “TEST_PRO” 2 rows imported
. . importing table “TEST_TRAN” 5 rows imported
. . importing table “TEST_TRI” 1 rows imported
. . importing table “TEST_UNUSE” 50706 rows imported
Import terminated successfully without warnings.
[oracle@orazhang ~]$ ora
SQL*Plus: Release 10.2.0.1.0 – Production on 星期三 4月 13 17:24:59 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, OLAP and Data Mining options
SQL> conn anbob/anbob
Connected.
SQL> select count(*) from tab;
COUNT(*)
———-
6
————————————————
导出成功,数据也没问题,但大伙应该注意到导出的时候有异常EXP-00091: Exporting questionable statistics
是因为数据库的字符集和客户端(NLS_LANG)的字符集不一致导致的,修改一致后,再试一下
数据库字符集:
SQL> RUN
1 select * from database_properties where property_name like ‘%SET%’
2*
rows will be truncated
PROPERTY_NAME PROPERTY_VALUE
———————————————————— —————————————————————————————–
NLS_CHARACTERSET AL32UTF8
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_LANG字符集
[oracle@orazhang ~]$ echo $NLS_LANG
Simplified Chinese_china.ZHS16GBK
[oracle@orazhang ~]$ export NLS_LANG=”Simplified Chinese_china.AL32UTF8″
[oracle@orazhang ~]$ exp test/test file=c.dbf
Export: Release 10.2.0.1.0 – Production on 鏄熸湡涓?4鏈?13 17:45:25 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, OLAP and Data Mining options
Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user TEST
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user TEST
About to export TEST’s objects …
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export TEST’s tables via Conventional Path …
. . exporting table TESTCHAR 2 rows exported
. . exporting table TESTNULL 1 rows exported
. . exporting table TEST_PRO 2 rows exported
. . exporting table TEST_TRAN 5 rows exported
. . exporting table TEST_TRI 1 rows exported
. . exporting table TEST_UNUSE 50706 rows exported
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting materialized views
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully without warnings.
上一篇: procedure调用DDL需显示授权
对不起,这篇文章暂时关闭评论。