- 最后登录
- 2015-10-8
- 在线时间
- 42 小时
- 威望
- 70
- 金钱
- 476
- 注册时间
- 2012-4-23
- 阅读权限
- 50
- 帖子
- 101
- 精华
- 2
- 积分
- 70
- UID
- 382
|
1#
发表于 2013-8-29 11:02:51
|
查看: 3162 |
回复: 4
数据库版本: oracle 10.2.0.4
主机版本: linux 5.2
问题:选择3天就1条快照信息!
SQL> @$ORACLE_HOME/rdbms/admin/awrrpt.sql
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
1198386908 ENCHRAC 1 enchrac1
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:
Type Specified: html
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
1198386908 1 ENCHRAC enchrac2 enchrac02
1198386908 3 ENCHRAC enchrac3 enchrac03
1198386908 2 ENCHRAC enchrac2 enchrac02
* 1198386908 1 ENCHRAC enchrac1 enchrac01
Using 1198386908 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: 3
Listing the last 3 days of Completed Snapshots
Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
enchrac1 ENCHRAC 40455 29 Aug 2013 08:50 1
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap:
Begin Snapshot Id specified:
信息收集:
SQL> select
2 a.job_name,
3 a.enabled
4 from
5 dba_scheduler_jobs a,
6 dba_scheduler_wingroup_members b,
7 dba_scheduler_windows c
8 where
9 job_name='GATHER_STATS_JOB'
10 and
11 a.schedule_name=b.window_group_name
12 and
13 b.window_name=c.window_name;
JOB_NAME ENABL
------------------------------ -----
GATHER_STATS_JOB TRUE
GATHER_STATS_JOB TRUE
SQL> SQL> SELECT snap_id,
2 to_char(begin_interval_time,'dd/MON/yy hh24:mi') Begin_Interval, to_char(end_interval_time,'dd/MON/yy hh24:mi') End_Interval
3 FROM dba_hist_snapshot
4 ORDER BY 1;
Snap Id BEGIN_INTERVAL END_INTERVAL
--------- ------------------ ------------------
40286 22/AUG/13 07:00 22/AUG/13 08:00
40286 22/AUG/13 07:00 22/AUG/13 08:00
40287 22/AUG/13 08:00 22/AUG/13 09:00
40287 22/AUG/13 08:00 22/AUG/13 09:00
40288 22/AUG/13 09:00 22/AUG/13 10:00
40288 22/AUG/13 09:00 22/AUG/13 10:00
40289 22/AUG/13 10:00 22/AUG/13 11:00
.......
40448 29/AUG/13 01:00 29/AUG/13 02:00
40449 29/AUG/13 02:00 29/AUG/13 03:00
40449 29/AUG/13 02:00 29/AUG/13 03:00
40450 29/AUG/13 03:00 29/AUG/13 04:00
40450 29/AUG/13 03:00 29/AUG/13 04:00
40451 29/AUG/13 04:00 29/AUG/13 05:00
40451 29/AUG/13 04:00 29/AUG/13 05:00
40452 29/AUG/13 05:00 29/AUG/13 06:00
40452 29/AUG/13 05:00 29/AUG/13 06:00
40453 29/AUG/13 06:00 29/AUG/13 07:00
40453 29/AUG/13 06:00 29/AUG/13 07:00
40454 29/AUG/13 07:00 29/AUG/13 08:00
40454 29/AUG/13 07:00 29/AUG/13 08:00
40455 29/AUG/13 08:00 29/AUG/13 08:50
40455 16/AUG/13 10:16 29/AUG/13 08:50
40455 29/AUG/13 08:00 29/AUG/13 08:50
40456 29/AUG/13 08:50 29/AUG/13 10:00
Snap Id BEGIN_INTERVAL END_INTERVAL
--------- ------------------ ------------------
40456 29/AUG/13 08:50 29/AUG/13 10:00
|
|