Select from events returns events from current day only.
A "select * from events where scheduled_start>current_timestamp-48 hours" command expecting events from the last two days but only the events from the current day are returned.
Working as designed for V5 servers. Design changed in V6.1.5, V6.2.3 and V188.8.131.52 levels.
Resolving the problem
The select command from a Tivoli Storage Manager server V5 uses a subset of the SQL92 and SQL93 standards. The select from the events table is one command that does not follow the standard. By default, the select command returns the events for the current day only. To return events for previous days, it is not sufficient to perform timestamp operation such as "scheduled_start>current_timestamp-48 hours". This will still return events for the current day only. To return events from previous days, it is necessary to specify a *start* date for the scheduled_start. For example :
select node_name, status, scheduled_start from events where scheduled_start >= '1900-01-01' and (status like 'Missed' or status like 'Failed') and scheduled_start>current_timestamp-48 hours
The above command returns missed or failed events for the past two days. This design of the select command from the events table has been modified to be in line with sql standards with apar IC72356, implemented in the 6.1.5 and 6.2.3 levels of the server. The above command may be used to achieve the same results for for lower levels of Tivoli Storage Manager servers.
More support for:
Tivoli Storage Manager
Software version: All Supported Versions
Operating system(s): Platform Independent
Reference #: 1579338
Modified date: 21 November 2016