(3)生成指定數據庫實例的統計報表 |
[君三思] 2009-10-27 |
2.2 生成指定數據庫實例的統計報表這項統計報表一般是針對多實例數據庫,前面使用的腳本是生成數據庫級別的統計報表,對于多實例的數據庫,有時候DBA可能希望看到某個實例的表現,那么本腳本就能派上用場了。其實操作與上非常類似(都比較簡單,需要DBA敲的字符加一塊也沒幾個),注意執行的腳本不同的喲。 SQL> @$ORACLE_HOME/rdbms/admin/awrrpti.sql 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:此處需指定生成的報表格式,有txt和html兩種選擇,默認情況下為html格式。 Type Specified: html Instances in this Workload Repository schema ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DB Id Inst Num DB Name Instance Host ------------ -------- ------------ ------------ ------------ 948405229 2 JSSDB jssdbn2 jssdbn2 * 948405229 1 JSSDB jssdbn1 jssdbn1 Enter value for dbid: 948405229 Using 948405229 for database Id Enter value for inst_num: 1 Using 1 for instance number相比標準統計報表的生成,這里多了兩個需指定的值,就是選擇要生成報表的DBID以及實例的ID。 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: 2指定要讀取多少天內的快照信息。 Listing the last 2 days of Completed Snapshots Snap Instance DB Name Snap Id Snap Started Level ------------ ------------ --------- ------------------ ----- jssdbn1 JSSDB 235 22 Oct 2009 00:00 1 236 22 Oct 2009 01:00 1 237 22 Oct 2009 02:00 1 238 22 Oct 2009 03:00 1 239 22 Oct 2009 04:00 1 240 22 Oct 2009 05:00 1 241 22 Oct 2009 06:00 1 242 22 Oct 2009 07:00 1 243 22 Oct 2009 08:00 1 244 22 Oct 2009 09:00 1 245 22 Oct 2009 10:00 1 246 22 Oct 2009 11:00 1 247 22 Oct 2009 12:00 1 248 22 Oct 2009 13:00 1 249 22 Oct 2009 14:00 1 250 22 Oct 2009 15:00 1 251 22 Oct 2009 16:00 1 252 22 Oct 2009 17:00 1 253 22 Oct 2009 18:00 1 254 22 Oct 2009 19:00 1 255 22 Oct 2009 20:00 1 256 22 Oct 2009 21:00 1 257 22 Oct 2009 22:00 1 258 22 Oct 2009 23:00 1 259 23 Oct 2009 00:00 1 260 23 Oct 2009 01:00 1 261 23 Oct 2009 02:00 1 262 23 Oct 2009 03:00 1 263 23 Oct 2009 04:00 1 264 23 Oct 2009 05:00 1 265 23 Oct 2009 06:00 1 266 23 Oct 2009 07:00 1 267 23 Oct 2009 08:00 1 Specify the Begin and End Snapshot Ids ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Enter value for begin_snap: ..................... ......................剩下的步驟就與標準統計報表的步驟完全相同,這里就不重復演示了。 |