f Oracle STS and STA for short time stress test (My Scenario) ~ 迪貝之家

Oracle STS and STA for short time stress test (My Scenario)

 

之前的專案曾在RAC 跑壓測
不過每次跑都不可能超過一個小時
AP也沒那麼好配合
剛好準點來排壓測
所以ADDM及AWR根本無用武之地
最多就是能看看ASH報表
了不起頂多再用oratop
即時監看session的運作狀況
最近看到了STS及STA
水.......
這是我假想的scenario
每20秒由shared pool 抓資料
持續抓取10分鐘

select instance_number from v$instance;

BEGIN
-- Create the tuning set
DBMS_SQLTUNE.CREATE_SQLSET(
sqlset_name => 'INST1'
,description => 'INST1 workload sample');
--
DBMS_SQLTUNE.CAPTURE_CURSOR_CACHE_SQLSET(
sqlset_name => 'INST1'
,time_limit => 600
,repeat_interval => 20
,,capture_mode => DBMS_SQLTUNE.MODE_ACCUMULATE_STATS);
END;
/
variable mytt varchar2(30);
exec :mytt := DBMS_SQLTUNE.CREATE_TUNING_TASK(sqlset_name => 'INST1');
print :mytt
exec dbms_sqltune.execute_tuning_task(task_name => the :mytt);
set long 10000 longchunksize 10000 linesize 132 pagesize 200
select dbms_sqltune.report_tuning_task( the :mytt) from dual;

---------------------------------------------------------------------------------

select instance_number from v$instance;

BEGIN
-- Create the tuning set
DBMS_SQLTUNE.CREATE_SQLSET(
sqlset_name => 'INST2'
,description => 'INST2 workload sample');
--
DBMS_SQLTUNE.CAPTURE_CURSOR_CACHE_SQLSET(
sqlset_name => 'INST2'
,time_limit => 600
,repeat_interval => 20
,,capture_mode => DBMS_SQLTUNE.MODE_ACCUMULATE_STATS);
END;
/
variable mytt varchar2(30);
exec :mytt := DBMS_SQLTUNE.CREATE_TUNING_TASK(sqlset_name => 'INST2');
print :mytt
exec dbms_sqltune.execute_tuning_task(task_name => the :mytt);
set long 10000 longchunksize 10000 linesize 132 pagesize 200
select dbms_sqltune.report_tuning_task(the :mytt) from dual;