执行awrrpt.sql数据库巡检时,输入snapshots id时提示错误
大家好:
我的环境是 SUSE Linux Enterprise Server 11 + Oracle 11gR2,有两个数据库: orcl 和 demo。
我在 demo 数据库中运行 awrrpt.sql 检查脚本时,在输入起始Snap Id 为 1,结束 Snap Id 为 2时,提示错误,如下:
SQL> @/oracle/product/database/rdbms/admin/awrrpt.sql
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
3559378370 DEMO 1 demo
Elapsed: 00:00:00.01
Elapsed: 00:00:00.01
Specify the Report Type
~~~~~~~~~~~~~~~~~~~~~~~
Would you like an HTML report, or a plain text report?
Enter 'html' for an HTML report, or 'text' for plain text
Defaults to 'html'
Enter value for report_type: text
Type Specified: text
Elapsed: 00:00:00.00
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 3559378370 1 DEMO demo SLES11
Using 3559378370 for database Id
Using 1 for instance number
Specify the number of days of snapshots to choose from
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Entering the number of days (n) will result in the most recent
(n) days of snapshots being listed. Pressing <return> without
specifying a number lists all completed snapshots.
Enter value for num_days: 1
Listing the last day's Completed Snapshots
Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
demo DEMO 1 13 May 2013 11:00 1
2 13 May 2013 14:31 1
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 1
Begin Snapshot Id specified: 1
Enter value for end_snap: 2
End Snapshot Id specified: 2
declare
*
ERROR at line 1:
ORA-20200: The instance was shutdown between snapshots 1 and 2
ORA-06512: at line 42
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
------
请问这是什么原因导致的,起始和结束 Snap Id应该填什么才正确呢?
待复,感谢! oracle 11g awr
[解决办法]
两个 SNAPSHOT id之间是不能重启过数据库的。