大家好:
我的环境是 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.sqlCurrent Instance
~~~~~~~~~~~~~~~~ DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
3559378370 DEMO 1 demoElapsed: 00:00:00.01
Elapsed: 00:00:00.01Specify 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: textType 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 SLES11Using 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: 1Listing 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 1Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 1
Begin Snapshot Id specified: 1Enter 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应该填什么才正确呢?
待复,感谢!oracle11gawr
我的环境是 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.sqlCurrent Instance
~~~~~~~~~~~~~~~~ DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
3559378370 DEMO 1 demoElapsed: 00:00:00.01
Elapsed: 00:00:00.01Specify 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: textType 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 SLES11Using 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: 1Listing 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 1Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 1
Begin Snapshot Id specified: 1Enter 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应该填什么才正确呢?
待复,感谢!oracle11gawr
解决方案 »
- 求助,正则替换,批量替换
- oracle database.zip不能解压
- 关于oracle的版本问题,请知道的帮忙
- sqlplus spool一个文件的时候由于生成文件过大,如何分文件
- RMAN的问题,哪为大侠帮忙看一下哦
- oracle 更新语句死锁问题?????
- 用存储过程复制表数据
- 如果哪位能现场教我在ORACLE8i下写一个返回记录集的存储过程,我就给他150分
- oracle9i在REDHAT LINUX9.0下的安装问题!!!!!!!!急
- CLOB 出错:Error in LOB operation, ORA-01536;space quota exceeded for tablespace 'USERS'.
- 求教!sql语句执行效率问题。。。。。
- oracle问题求指教,改来改去还是一样编译错误
您好,那请问如何创建数据库的快照呢?可以给出详细的语句参考一下吗?谢谢!
网上查到的好像很凌乱,好像要先创建dblink?
select to_char(s.startup_time,'dd Mon "at" HH24:mi:ss') instart_fmt
, di.instance_name inst_name
, di.db_name db_name
, s.snap_id snap_id
, to_char(s.end_interval_time,'dd Mon YYYY HH24:mi') snapdat
, s.snap_level lvl
from dba_hist_snapshot s
, dba_hist_database_instance di
where di.dbid = s.dbid
and di.instance_number = s.instance_number
and di.startup_time = s.startup_time
order by db_name, instance_name, snap_id;
begin
DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT;
end;
这个错误是说你的两个快照执行的两个时间段是不连续的,可能是因为你第一个快照执行后数据库被停掉了,然后在重启后执行了第二个快照,那个AWR报告用的两个快照应该是在数据库持续运行过程中生成的两个快照。
看下,希望对你有点帮助