欢迎投稿

今日深度:

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

Awrload导入数据报ORA-20104、ORA-06512错误处理,ora-20104ora-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

www.htsjk.Com true http://www.htsjk.com/shujukunews/7785.html NewsArticle Awrload导入数据报ORA-20104、ORA-06512错误处理,ora-20104ora-06512 1、Awrload导入数据报ORA-20104、ORA-06512错误 SQL @?/rdbms/admin/awrload.sql ~~~~~~~~~~ AWR LOAD ~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
评论暂时关闭