Created
November 4, 2020 13:07
-
-
Save mvelikikh/c9f3936270b9b4bab9554e30f0935638 to your computer and use it in GitHub Desktop.
oracle ctx_output logging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drop table ctxtest; | |
create table ctxtest(stuff varchar2(30)); | |
create index tm_cc_tc_item_txt_cat on ctxtest(stuff) indextype is ctxsys.ctxcat; | |
desc DR$TM_CC_TC_ITEM_TXT_CAT$I | |
insert into ctxtest(stuff) values (lpad('x', 30 ,'x')); | |
exec ctx_output.start_log(null) | |
exec ctx_output.add_event(ctx_output.event_index_print_rowid) | |
alter session set events 'sql_trace bind=true'; | |
alter index tm_cc_tc_item_txt_cat rebuild; | |
exec ctx_output.end_log | |
select DR$TOKEN, length(dr$token) from dr$tm_cc_tc_item_txt_cat$i; | |
select rowid from ctxtest; | |
select ctx_report.create_index_script('TC.tm_cc_tc_item_txt_cat') from dual; | |
select | |
payload | |
from | |
v$diag_trace_file_contents | |
where | |
(adr_home, trace_filename) = ( | |
( | |
(select value from v$diag_info where name = 'ADR Home'), | |
(select substr(value, instr(value,'trace') + 6) from v$diag_info where name = 'Default Trace File') | |
) | |
) | |
/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment