Home Database Mysql Tutorial Oracle EXP导出报错EXP-00091分析解决

Oracle EXP导出报错EXP-00091分析解决

Jun 07, 2016 pm 04:44 PM
oracle

Oracle EXP/IMP是早期推出数据备份还原工具。因其简单易用、功能强大的特性,广泛的被行业接受。一些开发工具(如PL/SQL Develop

Oracle EXP/IMP是早期推出数据备份还原工具。因其简单易用、功能强大的特性,广泛的被行业接受。一些开发工具(如PL/SQL Developer)中甚至集成嵌入了EXP/IMP工具。一些国内开发团队默认数据部署策略中,EXP/IMP也占到了相当比例。
随着Oracle版本的推进,新特性的推出,特别是海量数据库不断出现在企业应用环境下,传统的EXP/IMP工具架构已经不能承担发展的需要。于是在10g版本中,Oracle推出了服务端运行的数据泵Data Pump工具。到11g版本中,Data Pump已经成为成熟的数据导入导出、备份解决方案。

但是在实际开发领域,Exp/Imp还是有很大的市场。虽然11g中已经不推荐使用Exp/Imp,但是很多厂商部署小数据应用还是采用Exp/Imp方法。

本次记录的是一次部署导出Exp中出现的问题,记录下来,留待需要的朋友需要。

--------------------------------------分割线 --------------------------------------

Oracle 11g 在RedHat Linux 5.8_x64平台的安装手册

Linux-6-64下安装Oracle 12C笔记

在CentOS 6.4下安装Oracle 11gR2(x64)

Oracle 11gR2 在VMWare虚拟机中安装步骤

Debian 下 安装 Oracle 11g XE R2

--------------------------------------分割线 --------------------------------------


 
1、问题综述
 
厂商上线部署系统,进行最后的数据导出导入测试。由于不是最终的环境,而且上线系统数据量初始比较少,所以推荐使用Exp/Imp或者Data Pump工具。在导出过程中,系统数据虽然成功导出,但是出现报错EXP-00091。对应截屏照片如下(安全原因,屏蔽部分信息): 
 

 
导出语法也没有什么额外的信息过程。一时间笔者也没有处理的思路。
 
2、问题分析和检索
 
留下错误信息提示和语句信息之后,笔者查询了Oracle MOS官方网站,希望找到对应的资料。在文档EXP Utility Reports EXP-91 During Export (文档 ID 730106.1)中,笔者找到了这个问题的解释。
Oracle统计量是CBO的工作基础。Oracle优化器在发展历程中,经历了从RBO到CBO的演变过程。RBO时代,优化器生成规则是以代码的方式固化在Oracle代码中的。而CBO的工作是基于数据对象统计量。统计量反映在实体上,就是一系列的元数据信息。在9i时代,CBO与RBO共同作用,而且统计量是需要人工进行收集维护的。而且,由于数据变化的原因,在一些早期CBO版本中,“实时”统计量往往还不能获得最好的执行计划。
所以,在9i的Exp/Imp工具开始,统计量导出就成为Exp工具默认行为。Exp/Imp工具是一个客户端工具,客户端的字符集设置nls_lang和数据库服务器端是存在不同的。如果nls_lang环境变量设置与数据库服务器设置不同,就会导致这个问题出现。
下面我们通过实验来试图重现错误,来证实我们的推论。
 
3、错误模拟
 
我们使用oracle 11gR2来进行测试模拟,具体版本号为11.2.0.4。客户端操作系统为Windows。
 
 
SQL> select * from v$version;
 
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE      11.2.0.4.0    Production
TNS for 64-bit Windows: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 – Production
 
 
当前,服务器NLS关键参数如下。注意,查看nls信息一定是数据库层面的。
 
 
SQL> select * from nls_database_parameters;
 
PARAMETER                      VALUE
------------------------------ --------------------------------------------------------------------------------
NLS_LANGUAGE                  AMERICAN
NLS_TERRITORY                  AMERICA
NLS_CURRENCY                  $
NLS_ISO_CURRENCY              AMERICA
NLS_NUMERIC_CHARACTERS        .,
NLS_CHARACTERSET              AL32UTF8
(篇幅原因,有省略……)
 
 
Nls_lang环境变量的参数格式包括nls_language、nls_territory和nls_characterset。具体格式如下:
 
NLS_LANG=_. 
 

更多详情见请继续阅读下一页的精彩内容:

linux

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to encrypt oracle view How to encrypt oracle view Apr 11, 2025 pm 08:30 PM

Oracle View Encryption allows you to encrypt data in the view, thereby enhancing the security of sensitive information. The steps include: 1) creating the master encryption key (MEk); 2) creating an encrypted view, specifying the view and MEk to be encrypted; 3) authorizing users to access the encrypted view. How encrypted views work: When a user querys for an encrypted view, Oracle uses MEk to decrypt data, ensuring that only authorized users can access readable data.

How to delete all data from oracle How to delete all data from oracle Apr 11, 2025 pm 08:36 PM

Deleting all data in Oracle requires the following steps: 1. Establish a connection; 2. Disable foreign key constraints; 3. Delete table data; 4. Submit transactions; 5. Enable foreign key constraints (optional). Be sure to back up the database before execution to prevent data loss.

What to do if the oracle can't be opened What to do if the oracle can't be opened Apr 11, 2025 pm 10:06 PM

Solutions to Oracle cannot be opened include: 1. Start the database service; 2. Start the listener; 3. Check port conflicts; 4. Set environment variables correctly; 5. Make sure the firewall or antivirus software does not block the connection; 6. Check whether the server is closed; 7. Use RMAN to recover corrupt files; 8. Check whether the TNS service name is correct; 9. Check network connection; 10. Reinstall Oracle software.

How to paginate oracle database How to paginate oracle database Apr 11, 2025 pm 08:42 PM

Oracle database paging uses ROWNUM pseudo-columns or FETCH statements to implement: ROWNUM pseudo-columns are used to filter results by row numbers and are suitable for complex queries. The FETCH statement is used to get the specified number of first rows and is suitable for simple queries.

How to solve the problem of closing oracle cursor How to solve the problem of closing oracle cursor Apr 11, 2025 pm 10:18 PM

The method to solve the Oracle cursor closure problem includes: explicitly closing the cursor using the CLOSE statement. Declare the cursor in the FOR UPDATE clause so that it automatically closes after the scope is ended. Declare the cursor in the USING clause so that it automatically closes when the associated PL/SQL variable is closed. Use exception handling to ensure that the cursor is closed in any exception situation. Use the connection pool to automatically close the cursor. Disable automatic submission and delay cursor closing.

How to create cursors in oracle loop How to create cursors in oracle loop Apr 12, 2025 am 06:18 AM

In Oracle, the FOR LOOP loop can create cursors dynamically. The steps are: 1. Define the cursor type; 2. Create the loop; 3. Create the cursor dynamically; 4. Execute the cursor; 5. Close the cursor. Example: A cursor can be created cycle-by-circuit to display the names and salaries of the top 10 employees.

How to stop oracle database How to stop oracle database Apr 12, 2025 am 06:12 AM

To stop an Oracle database, perform the following steps: 1. Connect to the database; 2. Shutdown immediately; 3. Shutdown abort completely.

How to create oracle dynamic sql How to create oracle dynamic sql Apr 12, 2025 am 06:06 AM

SQL statements can be created and executed based on runtime input by using Oracle's dynamic SQL. The steps include: preparing an empty string variable to store dynamically generated SQL statements. Use the EXECUTE IMMEDIATE or PREPARE statement to compile and execute dynamic SQL statements. Use bind variable to pass user input or other dynamic values ​​to dynamic SQL. Use EXECUTE IMMEDIATE or EXECUTE to execute dynamic SQL statements.

See all articles