ASH报告是否可以生成备库的ASH报告。
答案: 可以的。也可以生成主库的,在执行ASH会话的时候,会选择S或者P。生成备库或者主库的ASH报告,默认是生成备库的。
参考文档:
Measuring Database Performance (oracle.com)
You can gather this information over a specified duration into an ASH report.
Active session history sampling is also available for Active Data Guard physical standby instances and Oracle Automatic Storage Management (Oracle ASM) instances. On these instances, the current session activity is collected and displayed in the V$ACTIVE_SESSION_HISTORY view, but not written to disk.
以下是在备库上执行ASH报告的过程。
SYS@PROD1> @?/rdbms/admin/ashrpt.sql
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
123456789 PROD 1 PROD1
Specify the Report Type
~~~~~~~~~~~~~~~~~~~~~~~
Enter 'html' for an HTML report, or 'text' for plain text
Defaults to 'html'
Enter value for report_type: text
Type Specified: text
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
123456789 2 PROD db2 abc.com
123456789 1 PROD db1 abc.com
Defaults to current database
Using database id: 123456789
Enter instance numbers. Enter 'ALL' for all instances in a
RAC cluster or explicitly specify list of instances (e.g., 1,2,3).
Defaults to current instance.
Using instance number(s): 1
You are running ASH report on a Standby database. To generate the report
over data sampled on the Primary database, enter 'P'.
Defaults to 'S' - data sampled in the Standby database.
Enter value for stdbyflag:
END。