现在的位置: 首页 > 综合 > 正文

通过命令方式得到awr报表,ADDM报表

2013年10月22日 ⁄ 综合 ⁄ 共 578字 ⁄ 字号 评论关闭

执行exec dbms_workload_repository.create_snapshot();

执行以下命令:

drop table t purge;

drop sequence s;

create table t(c number,d varchar2(20));

create index it on t(c);

create sequence s start with 1increment by 1nomaxvalue ;

session1中执行:

set echo on

set serveroutput on

begin

for i in 1..654321 loop

insert into t values(s.nextval,'first');

commit;

end loop;

end;

/

Session2中执行:

set echo on

set serveroutput on

begin

for i in 1..654321 loop

insert into t values(s.nextval,'first');

commit;

end loop;

end;

/

执行exec dbms_workload_repository.create_snapshot();

@C:/oracle/product/10.2.0/db_1/RDBMS/ADMIN/awrrpt.sql

执行awrrpt.sql脚本产生awr报表。

执行addmrpt.sql脚本产生addm报表。

 

 

抱歉!评论已关闭.