Author: skate
Time: 2011/10/12
The common method to analyze standby database performance problems is to judge through the dynamic performance view, starting from 11 GB, with the emergence of the Active Data guard function, early statspack tools can collect performance analysis data on standby database,
This collection must be completed on the primary database. The standby database must be opened to read-only mode for redo apply.
Install standby statspack
The following steps are for 11gr2, which is a little different for 11gr1. The installation and use of the tool are basically the same as those of the previous statspack.
(1) create a tablespace for statspack on the master database.
(2) install statspack on the master database (if you only want to use standby statspack, you must also install the statspack of the master database, that is, run the spcreate script.
Start/Oracle/APP/Oracle/product/11.2.0/db_1/spcreate
(3) install standby statspack on the master database
Conn as sysdba
Start/Oracle/APP/Oracle/product/11.2.0/db_1/sbcreate
During installation, you are required to enter the tablespace name, password, and TNS string and user/password required to connect to the standby database (dblink ).
After the installation is complete, some packages similar to earlier statspack will be created. However, standby database statpack is named after statspack _. The new scheam is stdbyperf.
(4) Then you can collect and analyze standby database performance
SQL> conn stdbyperf/stdbyperf
SQL> exec statspack_detail02_detaildb.snap
SQL> exec statspack_detail02_detaildb.snap
Package statspack_detail02_detaildb can go to the user stdbyperf to view the specific name
(5) generate a report
SQL> conn stdbyperf/stdbyperf
SQL> @/Oracle/APP/Oracle/product/11.2.0/db_1/sbreport
When the script is executed, a message is displayed, indicating that all required information is in the stats $ database_instance table.
Select * From stats $ database_instance
--- End ---