频道栏目
首页 > 资讯 > Oracle > 正文

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

15-04-26        来源:[db:作者]  
收藏   我要投稿

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 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>

 

相关TAG标签
上一篇:安装sqlserver2008的教训
下一篇:黑客挟持特斯拉官方Twitter账号 宣布要向粉丝免费派送特斯拉电动车
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站