|
| 1 | +-- how to add capture filters |
| 2 | + |
| 3 | +-- example 1 for inclusion |
| 4 | + |
| 5 | +-- Add filters |
| 6 | +-- The usage mode is determined by the DEFAULT_ACTION input of START_CAPTURE procedure. |
| 7 | + |
| 8 | +exec DBMS_WORKLOAD_CAPTURE.ADD_FILTER (fname => 'USER_TRACK', fattribute => 'USER', fvalue => 'TRACKUSER'); |
| 9 | + |
| 10 | +-- check status in dba_workload_filters |
| 11 | +-- check filters_used in dba_workload_captures |
| 12 | + |
| 13 | +-- start capture (see capturestart.sql) and use EXCLUDE in DEFAULT_ACTION |
| 14 | + |
| 15 | +execute dbms_workload_capture.start_capture (name=>'&Name', dir=>'&Dir', default_action=>'EXCLUDE'); |
| 16 | + |
| 17 | +-- EXCLUDE: No user request to the database is captured, except for the part of the workload defined by the filter. |
| 18 | + |
| 19 | +-- check status in dba_workload_filters |
| 20 | +-- check filters_used in dba_workload_captures |
| 21 | + |
| 22 | + |
| 23 | +-- example 2 for exclusion |
| 24 | + |
| 25 | +-- Add filters |
| 26 | +-- The usage mode is determined by the DEFAULT_ACTION input of START_CAPTURE procedure. |
| 27 | + |
| 28 | +exec dbms_workload_capture.add_filter('ORACLE_MANAGEMENT_SERVICE', 'Program', 'OMS'); |
| 29 | +exec dbms_workload_capture.add_filter('ORACLE_MANAGEMENT_AGENT', 'Program', 'emagent%'); |
| 30 | +exec dbms_workload_capture.add_filter('U_DBSNMP', 'USER', 'DBSNMP'); |
| 31 | + |
| 32 | + |
| 33 | +-- check status in dba_workload_filters |
| 34 | +-- check filters_used in dba_workload_captures |
| 35 | + |
| 36 | + |
| 37 | +execute dbms_workload_capture.start_capture (name=>'&Name', dir=>'&Dir', default_action=>'INCLUDE'); |
| 38 | + |
| 39 | +-- INCLUDE: All user requests to the database are captured, except for the part of the workload defined by the filters. |
0 commit comments