EXEC P_ALTERPK 'PK_T_AUDIT_TRACE_LOG', 'T_AUDIT_TRACE_LOG', 'FID', '1';

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_AUDIT_TRACE_LOG_TIMESTAMP')
CREATE INDEX IDX_T_AUDIT_TRACE_LOG_TIMESTAMP ON T_AUDIT_TRACE_LOG ( FTIMESTAMP );

EXEC P_ALTERPK 'PK_T_AUDIT_TRACE_BD', 'T_AUDIT_TRACE_BD', 'FID', '1';