-
Notifications
You must be signed in to change notification settings - Fork 334
Expand file tree
/
Copy pathcborun.sql
More file actions
30 lines (20 loc) · 719 Bytes
/
cborun.sql
File metadata and controls
30 lines (20 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
-- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
exec e2sn_monitor.cbo_trace_on;
def cbo_suffix ="/* cbotrace &_DATE */"
clear buffer
1 &1 &cbo_suffix
/
exec e2sn_monitor.cbo_trace_off
prompt Fetching tracefile...
set trimspool on termout off
spool &_tpt_tempdir/cbotrace_&_tpt_tempfile..txt
prompt &1 &cbo_suffix
select column_value CBO_TRACE
from table (e2sn_monitor.get_session_trace)
where regexp_like(column_value, '&2', 'i') or lower(column_value) like lower('&2');
spool off
set termout on
set define ^
host mvim ^_tpt_tempdir/cbotrace_^_tpt_tempfile..txt &
set define &