Was this helpful?
Example: Logging Tables
The ima_log_processes, ima_log_databases and ima_log_transactions tables below show information about transactions on the system. The data is susceptible to dirty reads:
register table ima_log_processes (
vnode varchar(64) not null not default is
'VNODE',
log_id_instance integer4 not null not default is
'exp.dmf.lg.lpb_id.id_instance',
log_process_id integer4 not null not default is
'exp.dmf.lg.lpb_id.id_id',
buffer_manager_id varchar(20) not null not default is
'exp.dmf.lg.lpb_bufmgr_id',
condition varchar(20) not null not default is
'exp.dmf.lg.lpb_cond',
force_abort_session varchar(30) not null not default is
'exp.dmf.lg.lpb_force_abort_sid',
group_commit_asleep varchar(20) not null not default is
'exp.dmf.lg.lpb_gcmt_asleep',
group_commit_session varchar(30) not null not default is
'exp.dmf.lg.lpb_gcmt_sid',
process_count integer4 not null not default is
'exp.dmf.lg.lpb_lpd_count',
process_status varchar(200) not null not default is
'exp.dmf.lg.lpb_status',
process_status_num integer4 not null not default is
'exp.dmf.lg.lpb_status_num',
process_tx_begins integer4 not null not default is
'exp.dmf.lg.lpb_stat.begin',
process_tx_ends integer4 not null not default is
'exp.dmf.lg.lpb_stat.end',
process_log_forces integer4 not null not default is
'exp.dmf.lg.lpb_stat.force',
process_reads integer4 not null not default is
'exp.dmf.lg.lpb_stat.readio',
process_waits integer4 not null not default is
'exp.dmf.lg.lpb_stat.wait',
process_writes integer4 not null not default is
'exp.dmf.lg.lpb_stat.write',
process_pid integer4 not null not default is
'exp.dmf.lg.lpb_pid'
)
as import from 'tables'
with dbms = IMA,
structure = unique sortkeyed,
key = (vnode, log_process_id);
 
 
register table ima_log_databases (
vnode varchar(64) not null not default is
'VNODE',
db_id integer4 not null not default is
'exp.dmf.lg.ldb_id.id_id',
db_status varchar(100) not null not default is
'exp.dmf.lg.ldb_status',
db_database_id integer4 not null not default is
'exp.dmf.lg.ldb_database_id',
db_name varchar(32) not null not default is
'exp.dmf.lg.ldb_db_name',
db_owner varchar(32) not null not default is
'exp.dmf.lg.ldb_db_owner',
db_buffer varchar(32) not null not default is
'exp.dmf.lg.ldb_buffer',
db_first_la varchar(32) not null not default is
'exp.dmf.lg.ldb_d_first_la',
db_first_la_offset integer4 not null not default is
'exp.dmf.lg.ldb_d_first_la.la_offset',
db_first_la_sequence integer4 not null not default is
'exp.dmf.lg.ldb_d_first_la.la_sequence',
db_last_la varchar(32) not null not default is
'exp.dmf.lg.ldb_d_last_la',
db_last_la_offset integer4 not null not default is
'exp.dmf.lg.ldb_d_last_la.la_offset',
db_last_la_sequence integer4 not null not default is
'exp.dmf.lg.ldb_d_last_la.la_sequence',
db_first_jla varchar(32) not null not default is
'exp.dmf.lg.ldb_j_first_la',
db_first_jla_offset integer4 not null not default is
'exp.dmf.lg.ldb_j_first_la.la_offset',
db_first_jla_sequence integer4 not null not default is
'exp.dmf.lg.ldb_j_first_la.la_sequence',
db_last_jla varchar(32) not null not default is
'exp.dmf.lg.ldb_j_last_la',
db_last_jla_offset integer4 not null not default is
'exp.dmf.lg.ldb_j_last_la.la_offset',
db_last_jla_sequence integer4 not null not default is
'exp.dmf.lg.ldb_j_last_la.la_sequence',
db_l_buffer varchar(32) not null not default is
'exp.dmf.lg.ldb_l_buffer',
db_process_count integer4 not null not default is
'exp.dmf.lg.ldb_lpd_count',
db_tx_count integer4 not null not default is
'exp.dmf.lg.ldb_lxb_count',
db_online_ckp_tx_count integer4 not null not default is
'exp.dmf.lg.ldb_lxbo_count',
db_sback_lsn varchar(32) not null not default is
'exp.dmf.lg.ldb_sback_lsn',
db_sback_lsn_high varchar(32) not null not default is
'exp.dmf.lg.ldb_sback_lsn_high',
db_sback_lsn_low varchar(32) not null not default is
'exp.dmf.lg.ldb_sback_lsn_low',
db_ldb_sbackup varchar(32) not null not default is
'exp.dmf.lg.ldb_sbackup',
db_ldb_sbackup_offset integer4 not null not default is
'exp.dmf.lg.ldb_sbackup.la_offset',
db_ldb_sbackup_sequence integer4 not null not default is
'exp.dmf.lg.ldb_sbackup.la_sequence',
db_tx_begins integer4 not null not default is
'exp.dmf.lg.ldb_stat.begin',
db_tx_ends integer4 not null not default is
'exp.dmf.lg.ldb_stat.end',
db_forces integer4 not null not default is
'exp.dmf.lg.ldb_stat.force',
db_reads integer4 not null not default is
'exp.dmf.lg.ldb_stat.read',
db_waits integer4 not null not default is
'exp.dmf.lg.ldb_stat.wait',
db_writes integer4 not null not default is
'exp.dmf.lg.ldb_stat.write',
db_status_num integer4 not null not default is
'exp.dmf.lg.ldb_status_num'
)
as import from 'tables'
with dbms = IMA,
structure = unique sortkeyed,
key = (vnode, db_id);
 
register table ima_log_transactions (
vnode varchar(64) not null not default is
'VNODE',
tx_id_id integer4 not null not default is
'exp.dmf.lg.lxb_id.id_id',
tx_id_instance integer4 not null not default is
'exp.dmf.lg.lxb_id.id_instance',
tx_status varchar(200) not null not default is
'exp.dmf.lg.lxb_status',
tx_db_id_id integer4 not null not default is
'exp.dmf.lg.lxb_db_id_id',
tx_db_name varchar(32) not null not default is
'exp.dmf.lg.lxb_db_name',
tx_db_owner varchar(32) not null not default is
'exp.dmf.lg.lxb_db_owner',
tx_pr_id_id integer4 not null not default is
'exp.dmf.lg.lxb_pr_id_id',
tx_wait_reason varchar(16) not null not default is
'exp.dmf.lg.lxb_wait_reason',
tx_first_log_address varchar (32) not null not default is
'exp.dmf.lg.lxb_first_lga',
tx_last_log_address varchar (32) not null not default is
'exp.dmf.lg.lxb_last_lga',
tx_cp_log_address varchar (32) not null not default is
'exp.dmf.lg.lxb_cp_lga',
tx_transaction_id varchar(32) not null not default is
'exp.dmf.lg.lxb_tran_id',
tx_transaction_high integer4 not null not default is
'exp.dmf.lg.lxb_tran_id.db_high_tran',
tx_transaction_low integer4 not null not default is
'exp.dmf.lg.lxb_tran_id.db_low_tran',
tx_server_pid integer4 not null not default is
'exp.dmf.lg.lxb_pid',
tx_session_id varchar(32) not null not default is
'exp.dmf.lg.lxb_sid',
tx_user_name varchar(32) not null not default is
'exp.dmf.lg.lxb_user_name',
tx_state_split integer4 not null not default is
'exp.dmf.lg.lxb_stat.split',
tx_state_write integer4 not null not default is
'exp.dmf.lg.lxb_stat.write',
tx_state_force integer4 not null not default is
'exp.dmf.lg.lxb_stat.force',
tx_state_wait integer4 not null not default is
'exp.dmf.lg.lxb_stat.wait'
)
as import from 'tables'
with dbms = IMA,
structure = unique sortkeyed,
key = (vnode, tx_id_id);
Last modified date: 11/09/2022