Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!
-
Recent Posts
Recent Comments
Mr WordPress on Hello world! Archives
Categories
Meta
Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!
Information in this article applies to:
Oracle Enterprise Manager Grid Control Release 1 (10.1.0.2.0, 10.1.0.3.0)
Description of the package:
This maintanence package handles statistics maintenance for the EMD Schema. It contains the following procedures:
update_stale_stats
This procedure collects stale statistics for the specified schema.
It collects it every Saturday at 2am by default.
These parameters can be configured.
delete_all_stats
This procedure deletes all stats for the specified schema. It will
delete all schema statistics once on Saturday at 1am by default. These
parameters can be configured.
analyze_emd_schema
This procedure is called by update_stale_stats. It gathers
statistics for all objects in the schema. It runs only once.
It calls GATHER_STALE for objects that have monitoring turned on
and already have statistics or just analyzes objects that do not
have statistics.
pin_plsql
This procedure is called by update_stale_stats. This procedure will
pin all the critical EMD PL/SQL packages in memory. This is critical
to ensure that we do not fragment the shared pool.
Intended Usage of the Package:
control file parallel write — 当server 进程更新所有控制文件时,这个事件可能出现。如果等待很短,可以不用考虑。如果等待时间较长,检查存放控制文件的物理磁盘I/O 是否存在瓶颈。多个控制文件是完全相同的拷贝,用于镜像以提高安全性。对于业务系统,多个控制文件应该存放在不同的磁盘上,一般来说三个是足够的,如果只有两个物理硬盘,那么两个控制文件也是可以接受的。在同一个磁盘上保存多个控制文件是不具备实际意义的。减少这个等待,可以考虑如下方法:
Snapshots
By default snapshots of the relevant data are taken every hour and retained for 7 days. The default values for these settings can be altered using:
BEGIN
DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(RETENTION => 43200, INTERVAL=>30); //minutes
END;
The changes to the settings are reflected in the DBA_HIST_WR_CONTROL view. Typically the retention period should capture at least one complete workload cycle. If your system has monthly archive and loads a 1 month retention time would be more eneficial that the default 7 days. An interval of "0" switches off snapshot collection, which in turn stops much of the self-tuning functionality, hence this is not recommended. Automatics collection is only possible if the STATISTICS_LEVEL parameter is set to TYPICAL or ALL. If the values is set to BASIC manual snapshots can be taken, but they will be missing some statistics.
Extra snapshots can be taken and existing snapshots can be removed using:
BEGIN
DBMS_WORKLOAD_REPOSITORY.DROP_SNAPSHOT_RANGE(low_snap_id=>22, high_snap_id=>32);
END;
Snapshot information can be queried from the DBA_HIST_SNAPSHOT view.
Baselines
A baseline is a pair of snapshots that represents a specific period of usage. Once baselines are defined they can be used to compare current performance agaginst similar periods in the past. You may with to create baseline to represent a period of batch processing like:
BEGIN
DBMS_WORKLOAD_REPOSITORY.CREATE_BASELINE(start_snap_id=>210,end_snap_id=>220,baseline_name=>’batch baseline’);
END;
The pair of snapshots associated with a baseline are retained until the baseline is explicitly deleted:
BEGIN
DBMS_WORKLOAD_REPOSITORY.DROP_BASELINE(baseline_name=>’batchline’,cascade=>false); //deltes associated snapshots if TRUE
END;
Baseline information can be queried from the DBA_HIST_BASELINE view.
Workload Repository Views
The following workload repository views are available:
Workload Repository Reports
Oracle provide two scripts to produce workload repository reports(awrrpt.sql and awrrpti.sql). They are similar in format to the statspack reports and give the option of HTML or plain text formats. The two reports give essential the same output but the awrrpti.sql allows you to select a single instance. The reports can be generated as follows:
@$ORACLE_HOME/rdbms/admin/awrrpt.sql @$ORACLE_HOME/rdbms/admin/awrrpti.sql
VERSION INFORMATION:
TNS for Linux: Version 10.2.0.1.0 – Production
Oracle Bequeath NT Protocol Adapter for Linux: Version 10.2.0.1.0 – Production
TCP/IP NT Protocol Adapter for Linux: Version 10.2.0.1.0 – Production
Time: 29-NOV-2006 19:13:40
Tracing not turned on.
Tns error struct:
ns main err code: 12535
TNS-12535: TNS:operation timed out
ns secondary err code: 12560
nt main err code: 505
TNS-00505: Operation timed out
nt secondary err code: 110
nt OS err code: 0
Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=219.239.13.3)(PORT=19948))
在 listener.ora 增加:
INBOUND_CONNECT_TIMEOUT_LISTENER = 30
重启监听器:
lsnrctl reload