We see the following error repeatedly in the TrueSight.log file ERROR 06/02 11:19:10 Invalid [DBThread_Event#mc.pncell_mytsimserver.abc1.0] 611139 executeQuery():::Query::::INSERT INTO EG_EVENT_2 (MC_UEID,EVENT_HANDLE,EVENTCLASS,MC_CLIENT_ADDRESS,MC_LOCATION,MC_SERVICE,MC_HOST,MC_HOST_ADDRESS,MC_HOST_CLASS,MC_OBJECT_CLASS,MC_ACCOUNT,MC_OBJECT_OWNER,MC_OBJECT,MC_TOOL_CLASS,MC_TOOL,MC_TOOL_SEV,MC_ORIGIN_CLASS,MC_ORIGIN,MC_ORIGIN_KEY,MC_ORIGIN_SEV,MC_PARAMETER,MC_PARAMETER_VALUE,MC_EVENT_CATEGORY,MC_INCIDENT_TIME,MC_ARRIVAL_TIME,MC_LOCAL_RECEPTION_TIME,DATE_RECEPTION,MC_DATE,STATUS,SEVERITY,MC_ORIGINAL_SEVERITY,MC_PRIORITY,MC_ORIGINAL_PRIORITY,MC_OWNER,MSG,DURATION,REPEAT_COUNT,MC_ACTION_COUNT,ADMINISTRATOR,MC_DATE_MODIFICATION,MC_NOTIFICATION_HISTORY,MC_SMC_ID,MC_HOST_ID,MC_OPERATIONS,MC_EVENT_SUBCATEGORY,ADAPTER_HOST,MC_TOOL_ID,MC_TOOL_RULE,MC_TOOL_KEY,MC_TOOL_ADDRESS,MC_TOOL_URI,MC_TOOL_TIME,MC_TOOL_SUGGESTION,MC_PARAMETER_UNIT,MC_PARAMETER_THRESHOLD,MC_LONG_MSG,MC_TIMEOUT,MC_ACL,MC_NOTES,MC_BAD_SLOT_NAMES,MC_BAD_SLOT_VALUES,MC_HISTORY,MC_MODHIST,MC_PROPAGATIONS,MC_COLLECTORS,MC_ABSTRACTION,MC_ABSTRACTED,MC_ASSOCIATIONS,MC_CAUSE,MC_EFFECTS,MC_EVENT_RELATIONS,MC_RELATION_SOURCE,MC_SMC_ALIAS,MC_SMC_IMPACT,MC_SMC_TYPE,MC_SMC_PRIORITY,MC_SMC_CAUSES,MC_SMC_EFFECTS,MC_EVENT_MODEL_VERSION,MC_INCIDENT_REPORT_TIME,MC_OBJECT_URI,MC_USING_ORGANIZATION,MC_USING_ORGANIZATION_ID,PN_DETAIL_DIAG_COUNT,PN_DETAIL_DIAG,PN_OBJECT_CLASS_ID,PN_OBJECT_ID,PN_LAST_TIME,PN_END_TIME,PN_VM_HOST,PN_GROUP_IDS,PN_GROUPS,PN_PARAMETER_ID,PN_VM_HOST_ID,PN_THRESH_ABOVE,PN_THRESH_TYPE,PN_THRESH_ID,PN_BASELINE_TYPE,PN_THRESH_DURATION,PN_EXTREMENESS,PN_DEVICE_NAME,PN_ALARM_ID,PN_OLD_SEVERITY,PN_IS_SUPPRESSING,PN_ALARM_EXEC_NOTIFY,PN_HIGHEST_SEVERITY,PN_SUPPRESS_TYPE,PN_SUPPRESS_MODE,PN_SUPPRESS_NOTIFIED,PN_SUPPRESS_RULE_ID,PN_IS_PREDICTED,PN_PREDICT_TO_OCCUR_TIME,PN_SUPPRESS_PRIMARY_ALARM_ID,PN_PREDICTED_SEVERITY,PN_AVG_VALUE,PN_EVENT_SCORE,PN_PTS_EXCEEDED,PN_PTS_TOTAL,PN_BASELINE_HOURLY_HIGH,PN_BASELINE_HOURLY_LOW,PN_BASELINE_DAILY_HIGH,PN_BASELINE_DAILY_LOW,PN_BASELINE_WEEKLY_HIGH,PN_BASELINE_WEEKLY_LOW,CELL_ID,CLOSED_TIME) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) java.sql.SQLException: SQL Anywhere Error -638: Right truncation of string data |
BMC suspects that the MC_OBJECT_CLASS was not updated in one of the EG_EVENT partitions while upgrading from TS 10.0 or TS 10.5 to TS 10.7 The length of the slots for the event will need to be compared to the length of the columns in the Sybase DB. Once the column has been identified as the cause of the problem, then it will need to have its length changed. For example if the following event failed to be inserted 'mc_ueid=bppm-alr-466'., then an mquery command should be run to see the entire event in baroc format : mquery -n <cell> -w "mc_ueid: =='bppm-alr-466'" -f BAROC > event.baroc The length of the slots as seen in the event.baroc file should be compared to the column lengths for the table EG_EVENT. There are two ways to identify the column lengths for EG_EVENT table : 1) Open the file pw\pronto\sysdata\SybaseSQLAnyWhereV7.sql and locate the "create table EG_EVENT" section. Here you can see the column definitions. 2) Run dbisql from /usr/pw/sybase/asa/bin (Unix) or pw\sybase\bin32 or pw\sybase\bin64 (depending on the Windows platform) and issue command DESCRIBE EG_EVENT. The column names and column types will then be displayed. Once the problem event slot/column has been identified then the length of the column will need to be increased accordingly in the Sybase DB. In this example, we will use mc_host_address as the problem column and increase the length from 16 to 32 : 1) Stop TS Server. 2) Start only the database service. 3) Open dbisql from /usr/pw/sybase/asa/bin (Unix) or pw\sybase\bin32 or pw\sybase\bin64 (depending on the Windows platform) 4) Run the command: select NAME from sysobjects where NAME like 'EG_EVENT%' and NAME NOT like '%VIEW%' 5) For each of the names returned in step 4, issue the following alter statement : ALTER TABLE <name> MODIFY MC_HOST_ADDRESS varchar(32) 6) Be sure to disconnect and close dbisql when finished otherwise it will keep the tables locked. 7) Start TS server. In our sample case the issue was happening with only one class APM_Event_v2 So the following should be done: A> As per analysis MC_OBJECT_CLASS = 'Application(^_^)ExecutionPlan(^_^)Transaction(^_^)Location(^_^)MetricCategory(^_^)Metric' and its coming In with a size of 91 so if the MC_OBJECT_CLASS column width is 128 it will work but if the column width is set to 64 bytes it will fail. B> In TS 10.1 and TS 10.5 the MC_OBJECT_CLASS column width was 64 and in TS 10.7 it was updated to a width of 128 bytes. Therefore, it's best to check the columns to see what they are set to. C> Please run the following queries 1. Verify /tmp/eg_event1.log ./runsqli "select systable.table_name , syscolumn.column_name, syscolumn.width from syscolumn , systable where syscolumn.table_id = systable.table_id and systable.table_name like 'EG_EVENT^per' and syscolumn.column_name = 'MC_OBJECT_CLASS'" > /tmp/eg_event1.log The output may be for one of the EG_EVENT partitions and would possibly look like this [ex. EG_EVENT_2 MC_OBJECT_CLASS 64] if that is the case, then please alter the table using the command below for all <EG_EVENT> partitions where the MC_OBJECT_CLASS is set to 64 ./runsqli "ALTER TABLE <table> MODIFY MC_OBJECT_CLASS varchar(128)" Verify whether you continue to see the java.sql.SQLException: SQL Anywhere Error -638: Right truncation of string data errors 2 If the issue is not resolved by extending the column width, then please run the following command and send the output to BMC Support ./runsqli "select systable.table_name , syscolumn.column_name, syscolumn.width from syscolumn , systable where syscolumn.table_id = systable.table_id and systable.table_name like 'EG_EVENT^per'" > /tmp/eg_event2.log The workaround above worked to address our sample issue and as a result, BMC suspects there was a failure to update the column width in the Sybase DB so defect QM002311211 has been created to investigate |