这里直结用sql语句生成或者用PL/SQL编辑器生成
sql>var snap_id number; sql>exec :snap_id :=dbms_workload_repository.create_snapshot('TYPICAL'); sql>print snap_id; sql>select snap_id from (select * from dba_hist_snapshot ORDER BY snap_id desc) where rownum<=10; sql>@$ORACLE_HOME/rdbms/admin/addmrpt.sql; sql>@$ORACLE_HOME/rdbms/admin/awrrpt.sql;