AWR(自動ワークロード・リポジトリ)は、自動的に略語リポジトリをロードされ、AWRレポートは、システム全体のリソース使用状況レポートには、レポートで学ぶことができる時間を提供する、Oracle 10gのそれ以降のバージョンが提供するパフォーマンス収集および分析ツールでありますシステム全体の動作。
AWRレポートの生成
ユーザーの切り替え
oracleユーザーのパスワードがわからない場合は、オペレーティング・システムを使用してOralceユーザのログインはrootユーザから取得することができます
su - oracle
。server01:root:/>whoami root server01:root:/>su - oracle server01:oracle:/home/oracle>whoami oracle server01:oracle:/home/oracle>
SQLPLUSデータベース接続
Oracleは、ユーザーで行われ
sqlplus / as sysdba
、コマンドデータベースOracleに接続します:server01:oracle:/home/oracle>sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Thu Dec 12 00:01:02 2019 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL>
AWRをエクスポートすると、現在のインスタンスを報告します
SQLPLUSでの実行
@?/rdbms/admin/awrrpt.sql
:SQL> @?/rdbms/admin/awrrpt.sql Current Instance ~~~~~~~~~~~~~~~~ DB Id DB Name Inst Num Instance ----------- ------------ -------- ------------ 919662622 DEVDB 1 devdb Specify the Report Type ~~~~~~~~~~~~~~~~~~~~~~~
エクスポートされたレポートの形式を入力します。
?あなたが入力に直接エクスポートする場合は、@レポートをエクスポートする形式のために/ RDBMS /管理/ awrrpt.sqlコマンドプロンプトを実行した後、デフォルトの形式はHTML、HTML形式です。
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:
輸出に日数を入力します。
レポートの日数の特定の数、派生入力、すなわち、N日の情報が全ての現在時刻:
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:
スナップスタートIDをエクスポートします
エクスポートにしたい日数を入力した後、Oracleは必要に応じて、スナップスタートIDを入力し、スナップの期待に応えるために日数についての情報を一覧表示します:
Listing the last 2 days of Completed Snapshots Instance DB Name Snap Id Snap Started Snap Level ------------ --------- --------- ------------------ ----- devdb DEVDB 3151 11 Dec 2019 00:00 1 3152 11 Dec 2019 01:00 1 3153 11 Dec 2019 02:00 1 3154 11 Dec 2019 03:00 1 3155 11 Dec 2019 04:00 1 3156 11 Dec 2019 05:00 1 3157 11 Dec 2019 06:00 1 3158 11 Dec 2019 07:00 1 3159 11 Dec 2019 08:00 1 3160 11 Dec 2019 09:00 1 3161 11 Dec 2019 10:00 1 3162 11 Dec 2019 11:00 1 3163 11 Dec 2019 12:00 1 3164 11 Dec 2019 13:00 1 3165 11 Dec 2019 14:00 1 3166 11 Dec 2019 15:00 1 3167 11 Dec 2019 16:00 1 3168 11 Dec 2019 17:00 1 3169 11 Dec 2019 18:00 1 3170 11 Dec 2019 19:00 1 3171 11 Dec 2019 20:00 1 3172 11 Dec 2019 21:00 1 3173 11 Dec 2019 22:00 1 3174 11 Dec 2019 23:00 1 3175 12 Dec 2019 00:00 1 Specify the Begin and End Snapshot Ids ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Enter value for begin_snap:
スナップカットIDをエクスポートします
スタートIDを入力した後、あなたが必要な期限のIDを入力し、カットオフIDを求めるメッセージが表示されます。
Enter value for end_snap:
エクスポートされたレポートの名前を設定します。
レポートをエクスポートするときは、エクスポートしたレポートの名前を設定する必要がある場合は、プロンプトに応じて変更することができます。
Specify the Report Name ~~~~~~~~~~~~~~~~~~~~~~~ The default report file name is awrrpt_1_3151_3175.html. To use this name, press <return> to continue, otherwise enter an alternative. Enter value for report_name:
ビューレポート
入力された名前とヒット後の報告の後に入力し、Oracleが自動的にAWRレポートを生成します、あなたはSQLPLUSビューを終了することができます。SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options server01:oracle:/home/oracle>ls -lrt total 12544 drwxr-xr-x 4 root system 256 Jul 02 1972 app -rw-r--r-- 1 oracle dba 25178 Jul 02 1972 db.rsp -rw-r--r-- 1 oracle dba 8 Jul 03 1972 #UNTITLED# -rw-r----- 1 oracle dba 4950061 Jul 06 1972 core -rw-r----- 1 oracle dba 289692 Jul 29 22:31 install2019-07-29_22-17-53.log drwxr-xr-x 2 oracle dba 256 Aug 01 00:40 scripts -rw-r--r-- 1 oracle dba 594527 Dec 11 22:37 test.html -rw-r--r-- 1 oracle dba 545490 Dec 12 00:51 awr.html
この記事では、毎日の共有に学ぶためのもので、間違っている場合、私を修正してください。