Awrload导入数据报ORA-20104、ORA-06512错误处理

1、Awrload导入数据报ORA-20104、ORA-06512错误


SQL> @?/rdbms/admin/awrload.sql

~~~~~~~~~~

AWR LOAD

~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~  This script will load the AWR data from a dump file. The   ~

~  script will prompt users for the following information:    ~

~     (1) name of directory object                            ~

~     (2) name of dump file                                   ~

~     (3) staging schema name to load AWR data into           ~

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Specify the Directory Name

~~~~~~~~~~~~~~~~~~~~~~~~~~

Directory Name                 Directory Path

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

IMPDP_DIR_2                    /u01/expdp_dir

Choose a Directory Name from the list above (case-sensitive).

Enter value for directory_name: IMPDP_DIR_2

Using the dump directory: IMPDP_DIR_2

Specify the Name of the Dump File to Load

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please specify the prefix of the dump file (.dmp) to load:

Enter value for file_name: sbd_39791_39978

Loading from the file name: sbd_39791_39978.dmp

Staging Schema to Load AWR Snapshot Data

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The next step is to create the staging schema

where the AWR snapshot data will be loaded.

After loading the data into the staging schema,

the data will be transferred into the AWR tables

in the SYS schema.

The default staging schema name is AWR_STAGE.

To use this name, press <return> to continue, otherwise enter

an alternative.

Enter value for schema_name:

Using the staging schema name: AWR_STAGE

declare

*

ERROR at line 1:

ORA-20104: schema name ‘AWR_STAGE‘ already exists

ORA-06512: at line 17

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning option

2、原因分析

AWR_STAGE是awrload.sql导入AWR数据时,默认创建用于临时存放导入数据的用户,在数据导入完成后,ORACLE会自动将该用户DROP掉。

既然报AWR_TAGE用户已存在,说明以前在导入AWR数据时并未正常结束导致这种问题的出现。

3、处理方法

手工删除AWR_STAGE用户

SQL> drop user AWR_STAGE cascade;

User dropped.

4、重新使用awrload.sql导入

成功导入AWR数据。

SQL> @?/rdbms/admin/awrload.sql

~~~~~~~~~~

AWR LOAD

~~~~~~~~~~


Using tablespace TEMP as the temporary tablespace for AWR_STAGE

... Creating AWR_STAGE user

|

| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

|  Loading the AWR data from the following

|  directory/file:

|   /u01/expdp_dir

|   sbd_39791_39978.dmp

| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

|

|  *** AWR Load Started ...

|

|  This operation will take a few moments. The

|  progress of the AWR load operation can be

|  monitored in the following directory/file:

|   /u01/expdp_dir

|   sbd_39791_39978.log

|

... Dropping AWR_STAGE user

End of AWR Load

SQL>

本文作者:黎俊杰(网名:踩点),从事”系统架构、操作系统、存储设备、数据库、中间件、应用程序“六个层面系统性的性能优化工作

欢迎加入 系统性能优化专业群,共同探讨性能优化技术。群号:258187244

时间: 2024-08-05 23:41:44

Awrload导入数据报ORA-20104、ORA-06512错误处理的相关文章

sqoop往hive中导入数据报找不到数据库错误

sqoop版本为1.4.4,hadoop版本为2.2.0,hive版本为0.11.0,hive元数据存放位置为mysql,当使用sqoop 从mysql往hive中导入数据时,总是提示找不到所指定的hive数据库,事实上hive中已存在该数据库,sqoop中也设置了hive路 径,/etc/profile文件中也已经设置好hive路径. mysql往hive中导数据命令: 1 ${SQOOP_HOME}/bin/sqoop import --connect jdbc:mysql://${host

ORACLE RAC 下非缺省端口监听配置(listener.ora tnsnames.ora)

不论是单实例还是RAC,对于非缺省端口下(1521)的监听器,pmon进程不会将service/instance注册到监听器,即不会实现动态注册.与单实例相同,RAC非缺省端口的监听器也是通过设置参数local_listener来达到目的.除此之外,还可以对实例进行远程注册,以达到负载均衡的目的.这是通过一个参数remote_listener来实现. 有关Oracle 网络配置相关基础以及概念性的问题请参考:      配置ORACLE 客户端连接到数据库   配置非默认端口的动态服务注册   

(转)认识oracle中的sqlnet.ora tnsnames.ora listener.ora三个文件

概述 在oracle安装目录$HOME/network/admin下,,经常看到sqlnet.ora tnsnames.ora listener.ora这三个文件,除了tnsnames.ora,其他两个文件详细的用途很多人都不太了解.sqlnet.ora 用在oracle client端,用于配置连接服务端oracle的相关参数. tnsnames.ora 用在oracle client端,用户配置连接数据库的别名参数,就像系统中的hosts文件一样.listener.ora 用在oracle

oracle的listener.ora sqlnet.ora tnsnames.ora三个文件的关联性

学习:http://www.cnblogs.com/william-lee/archive/2010/10/20/1856261.html 之前因为安装的是windows server 2008 r2的系统,oracle是11g r2 64bit,因为像很多网友一样,无法使用pl/sql developer 8连接oracle,今天可算连上了,对listener.ora sqlnet.ora tnsnames.ora三个文件.TNSListener服务的认识也深了一层. 先说说我是怎么样连接上的

navicat 导入数据报错 --- 1153 - got a packet bigger than &#39;max_allowed_packet&#39; bytes

navicat 导入数据报错 --- 1153 - got a packet bigger than 'max_allowed_packet' bytes 今天在用navicat导入sql文件时报错:mysql 错误 err [imp] 1153 - got a packet bigger than 'max_allowed_packet' bytes 查了一下,原来是mysql默认读取执行的sql文件最大为16m,我这个sql文件260m,所以执行不过去 解决方法: 在mysql安装目录下找到

.m文件导入C++头文件带来的错误

这几天的工作挖了不少的坑,遇到了各种千奇百怪的错误,现在好好总结一下. 新建一个工程,然后新建HelloCPP.h,HelloCPP.cpp文件,HelloCPP.h文件内容如下: #ifndef __CPPWrong__HelloCPP__ #define __CPPWrong__HelloCPP__ //#include <stdio.h> namespace hello { }; #endif /* defined(__CPPWrong__HelloCPP__) 就一个空的namespa

关于Excel文件导入到Sqlserver2008中出现截断错误的解决办法

出现错误的可能原因: 1.数据库字段Varchar长度不够: 2.不能用Text类型: 3.数据中可能存在换行符: 4.数据项文本过长,超过4000: 5.前8行的最大长度不够大,后面有超过的. 解决办法: 1.修改Varchar长度为足够长: 2.替换掉换行符(可手工输入一个换行符,复制到替换文本框中,Office中可按住Alt键,从小键盘输入10,再松开Alt键): 3.第一行中记录设足够长,导入后再替换: 4.把Excel文件存为2007格式,可解决导入后很多数据项为NULL的问题: 5.

listener.ora/sqlnet.ora/tnsnames.ora配置文件详解

oracle网络配置 三个配置文件 listener.ora.sqlnet.ora.tnsnames.ora ,都是放在$ORACLE_HOME/network/admin目录下. 英文说明: The sqlnet.ora is an optional file expressing more parameters about the connection (eg: the trace level for debugging, the types of authentication you wo

oracle的sqlnet.ora , tnsnames.ora , Listener.ora 文件的作用(转)

oracle网络配置三个配置文件 listener.ora.sqlnet.ora.tnsnames.ora ,都是放在$ORACLE_HOME/network/admin目录下.1. sqlnet.ora-----作用类似于linux或者其他unix的nsswitch.conf文件,通过这个文件来决定怎么样找一个连接中出现的连接字符串.例如我们客户端输入sqlplus sys/[email protected]假如我的sqlnet.ora是下面这个样子SQLNET.AUTHENTICATION_