bts_tracelevel() function

The bts_tracelevel() function sets the level of tracing. Use this function together with the bts_tracefile() function to trace basic text search-related events.

Syntax


1  bts_tracelevel ( level )
level
The level of tracing output:
1
UDR entry points.
10
UDR entry points and lower-level calls.
20
Trace information and small events.
100
Memory resource tracing (very verbose).

If you enter a value from 1-9, it is treated as level 1, a value between 10 and 19 is treated as level 10, a value between 20 and 99 is treated as level 20. A value greater than or equal to 100 is treated as level 100.

Usage

Use the bts_tracelevel() function to troubleshoot events related to the basic text search extension.

For the syntax for bts_tracefile(), see bts_tracefile() function.

For more details about tracing, see the HCL OneDB™ Guide to SQL: Reference.

Example

The following example specifies a trace file, sets the trace level to 20, and then performs a SELECT statement, which generates a tracing log:
EXECUTE FUNCTION bts_tracefile('/tmp/bts_select.log');
EXECUTE FUNCTION bts_tracelevel(20);
SELECT * FROM vessels WHERE bts_contains(xml_info, 'boatname:black');
The following might be the contents of the tracing log for trace level 20. The number 32 is the trace session number.
============================================================

Tracing session: 32 on 03/26/2009

09:21:11  BTS[32] bts_tracelevel_set: exit  (level = 20, status = 0)
09:21:11  BTS[32] bts_am_cost: entry 
09:21:11  BTS[32] bts_am_cost: exit  (status = 0, cost = 0.500000)
09:21:11  BTS[32] bts_am_open: entry 
09:21:11  BTS[32] bts_init: entry 
09:21:11  BTS[32] bts_lock_try: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: exit  (lock name: 'BTS_LOCK-EVP', status = 0)
09:21:11  BTS[32] bts_lock_try: exit  (status = 0)
09:21:11  BTS[32] bts_cl_init: entry (bts_cl_init_value = 0)
09:21:11  BTS[32] bts_cl_init_restore: entry 
09:21:11  BTS[32] bts_cl_init_setup: entry 
09:21:11  BTS[32] bts_cl_init_setup: exit  (status = 0)
09:21:11  BTS[32] bts_cl_init_restore: exit  (status = 0)
09:21:11  BTS[32] bts_cl_init: exit  (bts_cl_init_value = 1, status = 0)
09:21:11  BTS[32] bts_gls_init: entry 
09:21:11  BTS[32] bts_gls_init: exit  (status = 0)
09:21:11  BTS[32] bts_evp_check: entry 
09:21:11  BTS[32] bts_evp_check: exit  (status = 0)
09:21:11  BTS[32] bts_auto_trace: (skipped)
09:21:11  BTS[32] bts_init: exit  (status = 0)
09:21:11  BTS[32] bts_am_spacename: entry 
09:21:11  BTS[32] bts_am_spacename: exit  (spacename = 'bts_sbspace1', status = 0)
09:21:11  BTS[32] bts_am_space: entry 
09:21:11  BTS[32] bts_am_sbspace: entry 
09:21:11  BTS[32] bts_am_sbspace: exit  (rtn = '/ashworth/vessels_bts/1048885', status = 0)
09:21:11  BTS[32] bts_am_space: exit  (rtn = '/ashworth/vessels_bts/1048885', status = 0)
09:21:11  BTS[32] bts_hdr_check: entry 
09:21:11  BTS[32] bts_hdr_check: (hdr_status mask = 00000000)
09:21:11  BTS[32] bts_hdr_check: exit  (status = 0)
09:21:11  BTS[32] bts_lock_try: entry (name = '/ashworth/vessels_bts/1048885')
09:21:11  BTS[32] bts_lock_try: exit  (status = 0)
09:21:11  BTS[32] bts_am_params_read: entry 
09:21:11  BTS[32] bts_am_params_canonical_maps_setup: entry 
09:21:11  BTS[32] bts_am_params_canonical_maps_setup: (expand = 1)
09:21:11  BTS[32] bts_am_params_canonical_maps_setup: exit  (status = 0)
09:21:11  BTS[32] bts_am_params_read: exit  (status = 0)
09:21:11  BTS[32] bts_lock_release: entry (name = '/ashworth/vessels_bts/1048885')
09:21:11  BTS[32] bts_lock_release: exit  (status = 0)
09:21:11  BTS[32] bts_am_open: (open set_size 256)
09:21:11  BTS[32] bts_xact_register: entry 
09:21:11  BTS[32] bts_xact_register: (XACT: named_memory(BTS_XACT_20))
09:21:11  BTS[32] bts_xact_register: (new savepoint: 1-1 (first))
09:21:11  BTS[32] bts_xact_register: (register savepoint callback)
09:21:11  BTS[32] bts_xact_register: (register end_stmt callback)
09:21:11  BTS[32] bts_xact_register: (register end_xact callback)
09:21:11  BTS[32] bts_xact_register: (register post_xact callback)
09:21:11  BTS[32] bts_xact_register: exit  (status = 0)
09:21:11  BTS[32] bts_xact_log_params: entry 
09:21:11  BTS[32] bts_xact_init_bxt: exit  (status = 0)
09:21:11  BTS[32] bts_am_params_copy: exit  (status = 0)
09:21:11  BTS[32] bts_xact_log_params: (XACT: sbspace(bts_sbspace1))
09:21:11  BTS[32] bts_xact_log_params: (XACT: space_type(1))
09:21:11  BTS[32] bts_xact_log_params: exit  (status = 0)
09:21:11  BTS[32] bts_fini: entry (errcode = 0)
09:21:11  BTS[32] bts_cl_fini: entry (bts_cl_init_value = 1)
09:21:11  BTS[32] bts_cl_init_clear: entry 
09:21:11  BTS[32] bts_cl_init_clear: exit  (status = 0)
09:21:11  BTS[32] bts_cl_fini: exit  (bts_cl_init_value = 0, status = 0)
09:21:11  BTS[32] bts_lock_release: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: exit  (lock name: 'BTS_LOCK-EVP', status = 0)
09:21:11  BTS[32] bts_lock_release: exit  (status = 0)
09:21:11  BTS[32] bts_fini: exit  (status = 0)
09:21:11  BTS[32] bts_am_open: exit  (status = 0)
09:21:11  BTS[32] bts_am_beginscan: entry 
09:21:11  BTS[32] bts_am_userdata_get: entry 
09:21:11  BTS[32] bts_am_spacename: entry 
09:21:11  BTS[32] bts_am_spacename: exit  (spacename = 'bts_sbspace1', status = 0)
09:21:11  BTS[32] bts_am_userdata_get: (target = '/ashworth/vessels_bts/1048885')
09:21:11  BTS[32] bts_am_userdata_get: exit  (status = 0)
09:21:11  BTS[32] bts_am_beginscan: (target = '/ashworth/vessels_bts/1048885')
09:21:11  BTS[32] bts_am_literal: entry 
09:21:11  BTS[32] bts_am_literal_size: entry 
09:21:11  BTS[32] bts_am_literal_size: exit  (status = 0)
09:21:11  BTS[32] bts_am_literal_cat: entry 
09:21:11  BTS[32] bts_am_literal_cat: exit  (status = 0)
09:21:11  BTS[32] bts_am_literal: (literal is 'boatname:black')
09:21:11  BTS[32] bts_am_literal: exit  (status = 0)
09:21:11  BTS[32] bts_am_beginscan: (literal = 'boatname:black')
09:21:11  BTS[32] bts_am_beginscan: (rows = 256, score needed = 'no')
09:21:11  BTS[32] bts_am_beginscan: exit  (status = 0)
09:21:11  BTS[32] bts_am_getnext: entry 
09:21:11  BTS[32] bts_init: entry 
09:21:11  BTS[32] bts_lock_try: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: exit  (lock name: 'BTS_LOCK-EVP', status = 0)
09:21:11  BTS[32] bts_lock_try: exit  (status = 0)
09:21:11  BTS[32] bts_cl_init: entry (bts_cl_init_value = 0)
09:21:11  BTS[32] bts_cl_init_restore: entry 
09:21:11  BTS[32] bts_cl_init_restore: exit  (status = 0)
09:21:11  BTS[32] bts_cl_init: exit  (bts_cl_init_value = 1, status = 0)
09:21:11  BTS[32] bts_gls_init: entry 
09:21:11  BTS[32] bts_gls_init: exit  (status = 0)
09:21:11  BTS[32] bts_evp_check: entry 
09:21:11  BTS[32] bts_evp_check: exit  (status = 0)
09:21:11  BTS[32] bts_auto_trace: (skipped)
09:21:11  BTS[32] bts_init: exit  (status = 0)
09:21:11  BTS[32] bts_lock_try: entry (name = '/ashworth/vessels_bts/1048885')
09:21:11  BTS[32] bts_lock_try: exit  (status = 0)
09:21:11  BTS[32] bts_cl_query: entry 
09:21:11  BTS[32] bts_cl_query_setup: entry 
09:21:11  BTS[32] bts_xact_get_cl_cb: entry 
09:21:11  BTS[32] bts_xact_get_cl_cb: exit  (status = 0)
09:21:11  BTS[32] bts_cl_query_parse: entry 
09:21:11  BTS[32] bts_cl_query_dump: entry 
09:21:11  BTS[32] bts_cl_query_dump: (max clause count = 1024)
09:21:11  BTS[32] bts_cl_query_dump: (query default operator = '0' (or))
09:21:11  BTS[32] bts_cl_query_dump: (query = 'boatname:black')
09:21:11  BTS[32] bts_cl_query_dump: (keyfield = 'boatname')
09:21:11  BTS[32] bts_cl_query_dump: exit  (status = 0)
09:21:11  BTS[32] bts_cl_query_parse: exit  (status = 0)
09:21:11  BTS[32] bts_cl_query_setup: exit  (status = 0)
09:21:11  BTS[32] bts_cl_query_parse: entry 
09:21:11  BTS[32] bts_cl_query_parse: exit  (status = 0)
09:21:11  BTS[32] bts_cl_query: exit  (status = 0)
09:21:11  BTS[32] bts_am_getnext: (return 0 (0) fragid = 1048884, rowid = 257)
09:21:11  BTS[32] bts_lock_release: entry (name = '/ashworth/vessels_bts/1048885')
09:21:11  BTS[32] bts_lock_release: exit  (status = 0)
09:21:11  BTS[32] bts_fini: entry (errcode = 0)
09:21:11  BTS[32] bts_cl_fini: entry (bts_cl_init_value = 1)
09:21:11  BTS[32] bts_cl_init_clear: entry 
09:21:11  BTS[32] bts_cl_init_clear: exit  (status = 0)
09:21:11  BTS[32] bts_cl_fini: exit  (bts_cl_init_value = 0, status = 0)
09:21:11  BTS[32] bts_lock_release: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: exit  (lock name: 'BTS_LOCK-EVP', status = 0)
09:21:11  BTS[32] bts_lock_release: exit  (status = 0)
09:21:11  BTS[32] bts_fini: exit  (status = 0)
09:21:11  BTS[32] bts_am_getnext: exit  (status = 1)
09:21:11  BTS[32] bts_am_getnext: entry 
09:21:11  BTS[32] bts_init: entry 
09:21:11  BTS[32] bts_lock_try: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: exit  (lock name: 'BTS_LOCK-EVP', status = 0)
09:21:11  BTS[32] bts_lock_try: exit  (status = 0)
09:21:11  BTS[32] bts_cl_init: entry (bts_cl_init_value = 0)
09:21:11  BTS[32] bts_cl_init_restore: entry 
09:21:11  BTS[32] bts_cl_init_restore: exit  (status = 0)
09:21:11  BTS[32] bts_cl_init: exit  (bts_cl_init_value = 1, status = 0)
09:21:11  BTS[32] bts_gls_init: entry 
09:21:11  BTS[32] bts_gls_init: exit  (status = 0)
09:21:11  BTS[32] bts_evp_check: entry 
09:21:11  BTS[32] bts_evp_check: exit  (status = 0)
09:21:11  BTS[32] bts_auto_trace: (skipped)
09:21:11  BTS[32] bts_init: exit  (status = 0)
09:21:11  BTS[32] bts_lock_try: entry (name = '/ashworth/vessels_bts/1048885')
09:21:11  BTS[32] bts_lock_try: exit  (status = 0)
09:21:11  BTS[32] bts_cl_query: entry 
09:21:11  BTS[32] bts_cl_query_next: entry 
09:21:11  BTS[32] bts_cl_query_parse: entry 
09:21:11  BTS[32] bts_cl_query_parse: exit  (status = 0)
09:21:11  BTS[32] bts_cl_query_next: exit  (status = 0)
09:21:11  BTS[32] bts_cl_query_parse: entry 
09:21:11  BTS[32] bts_cl_query_parse: exit  (status = 0)
09:21:11  BTS[32] bts_cl_query: exit  (status = 0)
09:21:11  BTS[32] bts_lock_release: entry (name = '/ashworth/vessels_bts/1048885')
09:21:11  BTS[32] bts_lock_release: exit  (status = 0)
09:21:11  BTS[32] bts_fini: entry (errcode = 0)
09:21:11  BTS[32] bts_cl_fini: entry (bts_cl_init_value = 1)
09:21:11  BTS[32] bts_cl_init_clear: entry 
09:21:11  BTS[32] bts_cl_init_clear: exit  (status = 0)
09:21:11  BTS[32] bts_cl_fini: exit  (bts_cl_init_value = 0, status = 0)
09:21:11  BTS[32] bts_lock_release: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: exit  (lock name: 'BTS_LOCK-EVP', status = 0)
09:21:11  BTS[32] bts_lock_release: exit  (status = 0)
09:21:11  BTS[32] bts_fini: exit  (status = 0)
09:21:11  BTS[32] bts_am_getnext: exit  (status = 0)
09:21:11  BTS[32] bts_xact_end_stmt: entry 
09:21:11  BTS[32] bts_xact_bxh_init: entry 
09:21:11  BTS[32] bts_xact_bxh_init: (XACT: named_memory(BTS_XACT_20))
09:21:11  BTS[32] bts_xact_bxh_init: exit  (status = 0, bxh = 0x53661ce8)
09:21:11  BTS[32] bts_init: entry 
09:21:11  BTS[32] bts_lock_try: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: exit  (lock name: 'BTS_LOCK-EVP', status = 0)
09:21:11  BTS[32] bts_lock_try: exit  (status = 0)
09:21:11  BTS[32] bts_cl_init: entry (bts_cl_init_value = 0)
09:21:11  BTS[32] bts_cl_init_restore: entry 
09:21:11  BTS[32] bts_cl_init_restore: exit  (status = 0)
09:21:11  BTS[32] bts_cl_init: exit  (bts_cl_init_value = 1, status = 0)
09:21:11  BTS[32] bts_gls_init: entry 
09:21:11  BTS[32] bts_gls_init: exit  (status = 0)
09:21:11  BTS[32] bts_evp_check: entry 
09:21:11  BTS[32] bts_evp_check: exit  (status = 0)
09:21:11  BTS[32] bts_auto_trace: (skipped)
09:21:11  BTS[32] bts_init: exit  (status = 0)
09:21:11  BTS[32] bts_xact_end_stmt: (procesing current_stmt: 1)
09:21:11  BTS[32] bts_xact_process: entry 
09:21:11  BTS[32] bts_xact_process: (process: NORMAL_END)
09:21:11  BTS[32] bts_xact_process: (process end_stmt: 1)
09:21:11  BTS[32] bts_xact_process: (current savepoint is 1-1)
09:21:11  BTS[32] bts_lock_try: entry (name = '/ashworth/vessels_bts/1048885')
09:21:11  BTS[32] bts_lock_try: exit  (status = 0)
09:21:11  BTS[32] bts_lock_release: entry (name = '/ashworth/vessels_bts/1048885')
09:21:11  BTS[32] bts_lock_release: exit  (status = 0)
09:21:11  BTS[32] bts_xact_process: exit  (status = 0)
09:21:11  BTS[32] bts_xact_end_stmt: (new stmt: 2)
09:21:11  BTS[32] bts_fini: entry (errcode = 0)
09:21:11  BTS[32] bts_cl_fini: entry (bts_cl_init_value = 1)
09:21:11  BTS[32] bts_cl_init_clear: entry 
09:21:11  BTS[32] bts_cl_init_clear: exit  (status = 0)
09:21:11  BTS[32] bts_cl_fini: exit  (bts_cl_init_value = 0, status = 0)
09:21:11  BTS[32] bts_lock_release: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: exit  (lock name: 'BTS_LOCK-EVP', status = 0)
09:21:11  BTS[32] bts_lock_release: exit  (status = 0)
09:21:11  BTS[32] bts_fini: exit  (status = 0)
09:21:11  BTS[32] bts_xact_end_stmt: exit  (status = 0, state = 0)
09:21:11  BTS[32] bts_am_endscan: entry 
09:21:11  BTS[32] bts_init: entry 
09:21:11  BTS[32] bts_lock_try: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: exit  (lock name: 'BTS_LOCK-EVP', status = 0)
09:21:11  BTS[32] bts_lock_try: exit  (status = 0)
09:21:11  BTS[32] bts_cl_init: entry (bts_cl_init_value = 0)
09:21:11  BTS[32] bts_cl_init_restore: entry 
09:21:11  BTS[32] bts_cl_init_restore: exit  (status = 0)
09:21:11  BTS[32] bts_cl_init: exit  (bts_cl_init_value = 1, status = 0)
09:21:11  BTS[32] bts_gls_init: entry 
09:21:11  BTS[32] bts_gls_init: exit  (status = 0)
09:21:11  BTS[32] bts_evp_check: entry 
09:21:11  BTS[32] bts_evp_check: exit  (status = 0)
09:21:11  BTS[32] bts_auto_trace: (skipped)
09:21:11  BTS[32] bts_init: exit  (status = 0)
09:21:11  BTS[32] bts_lock_try: entry (name = '/ashworth/vessels_bts/1048885')
09:21:11  BTS[32] bts_lock_try: exit  (status = 0)
09:21:11  BTS[32] bts_cl_query_end: entry 
09:21:11  BTS[32] bts_cl_query_parse: entry 
09:21:11  BTS[32] bts_cl_query_parse: exit  (status = 0)
09:21:11  BTS[32] bts_cl_query_end: exit  (status = 0)
09:21:11  BTS[32] bts_lock_release: entry (name = '/ashworth/vessels_bts/1048885')
09:21:11  BTS[32] bts_lock_release: exit  (status = 0)
09:21:11  BTS[32] bts_fini: entry (errcode = 0)
09:21:11  BTS[32] bts_cl_fini: entry (bts_cl_init_value = 1)
09:21:11  BTS[32] bts_cl_init_clear: entry 
09:21:11  BTS[32] bts_cl_init_clear: exit  (status = 0)
09:21:11  BTS[32] bts_cl_fini: exit  (bts_cl_init_value = 0, status = 0)
09:21:11  BTS[32] bts_lock_release: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: exit  (lock name: 'BTS_LOCK-EVP', status = 0)
09:21:11  BTS[32] bts_lock_release: exit  (status = 0)
09:21:11  BTS[32] bts_fini: exit  (status = 0)
09:21:11  BTS[32] bts_am_endscan: exit  (status = 0)
09:21:11  BTS[32] bts_am_close: entry 
09:21:11  BTS[32] bts_init: entry 
09:21:11  BTS[32] bts_lock_try: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: exit  (lock name: 'BTS_LOCK-EVP', status = 0)
09:21:11  BTS[32] bts_lock_try: exit  (status = 0)
09:21:11  BTS[32] bts_cl_init: entry (bts_cl_init_value = 0)
09:21:11  BTS[32] bts_cl_init_restore: entry 
09:21:11  BTS[32] bts_cl_init_restore: exit  (status = 0)
09:21:11  BTS[32] bts_cl_init: exit  (bts_cl_init_value = 1, status = 0)
09:21:11  BTS[32] bts_gls_init: entry 
09:21:11  BTS[32] bts_gls_init: exit  (status = 0)
09:21:11  BTS[32] bts_evp_check: entry 
09:21:11  BTS[32] bts_evp_check: exit  (status = 0)
09:21:11  BTS[32] bts_auto_trace: (skipped)
09:21:11  BTS[32] bts_init: exit  (status = 0)
09:21:11  BTS[32] bts_am_spacename: entry 
09:21:11  BTS[32] bts_am_spacename: exit  (spacename = 'bts_sbspace1', status = 0)
09:21:11  BTS[32] bts_am_userdata: (target = '/ashworth/vessels_bts/1048885')
09:21:11  BTS[32] bts_am_userdata_free: entry 
09:21:11  BTS[32] bts_fini: entry (errcode = 0)
09:21:11  BTS[32] bts_cl_fini: entry (bts_cl_init_value = 1)
09:21:11  BTS[32] bts_cl_init_clear: entry 
09:21:11  BTS[32] bts_cl_init_clear: exit  (status = 0)
09:21:11  BTS[32] bts_cl_fini: exit  (bts_cl_init_value = 0, status = 0)
09:21:11  BTS[32] bts_lock_release: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: entry (name = 'EVP')
09:21:11  BTS[32] bts_lock_name: exit  (lock name: 'BTS_LOCK-EVP', status = 0)
09:21:11  BTS[32] bts_lock_release: exit  (status = 0)
09:21:11  BTS[32] bts_fini: exit  (status = 0)
09:21:11  BTS[32] bts_am_close: exit  (status = 0)
09:21:11  BTS[32] bts_xact_end_xact: entry 
09:21:11  BTS[32] bts_xact_bxh_init: entry 
09:21:11  BTS[32] bts_xact_bxh_init: (XACT: named_memory(BTS_XACT_20))
09:21:11  BTS[32] bts_xact_bxh_init: (XACT: mi_named_get(BTS_XACT_20) failed: 2)
09:21:11  BTS[32] bts_xact_bxh_init: (XACT: mi_named_get(BTS_XACT_20) failure ignored)
09:21:11  BTS[32] bts_xact_bxh_init: exit  (status = 0, bxh = 0x00000000)
09:21:11  BTS[32] bts_xact_end_xact: exit  (status = 0, state = -1)
09:21:11  FSE Entry bts_inFseXactCallback end_xact
09:21:11  FSE Exit  bts_inFseXactCallback end_xact
09:21:11  BTS[32] bts_xact_post_xact: entry 
09:21:11  BTS[32] bts_xact_bxh_init: entry 
09:21:11  BTS[32] bts_xact_bxh_init: (XACT: named_memory(BTS_XACT_20))
09:21:11  BTS[32] bts_xact_bxh_init: (XACT: mi_named_get(BTS_XACT_20) failed: 2)
09:21:11  BTS[32] bts_xact_bxh_init: (XACT: mi_named_get(BTS_XACT_20) failure ignored)
09:21:11  BTS[32] bts_xact_bxh_init: exit  (status = 0, bxh = 0x00000000)
09:21:11  BTS[32] bts_xact_post_xact: exit  (status = 0, state = -1)
09:21:11  FSE Entry bts_inFseXactCallback post_xact
09:21:11  FSE Exit  bts_inFseXactCallback post_xact