soitoolbox --archiveHistoryData returns SQL ERROR: Query timeout expired
search cancel

soitoolbox --archiveHistoryData returns SQL ERROR: Query timeout expired

book

Article ID: 190814

calendar_today

Updated On:

Products

CA Service Operations Insight (SOI)

Issue/Introduction

This article describes how to resolve an issue with the soitoolbox --archiveHistoryData failing. 

The soitoolbox --archiveHistoryData may display the following error: 

ERROR: Exception while processing SQL section 14 : ('HYT00', '[HYT00] [Microsoft][ODBC SQL Server Driver]Query timeout expired (0) (SQLExecDirectW)')
 Failed query: /* Now delete the actual data for that time period*/

Environment

Service Operations Insight Release: 4.2
soitoolbox 

Resolution

This command moves all historical data older than a specified number of days to an archive database. 

It's required specify the number of days by adding a number to the end of the command, for example --archiveHistoryData=10.

Note: The default name for the archive database is SOIArchiveDB. If required the name of the archive database can be changed with the --dbArchiveName command.

The "Query timeout expired" error message means the command / query executed reached the SQL timeout. This results in the process being terminated and is most likely caused by the volume of data (e.g. 360 days specified).

Note: There is no way to adjust or reconfigure the SQL Query timeout for the soitoolbox command. 

To workaround this error message decrease the specified number of days. Decrease the number of days to 30 days, step by step and continue to run the query until all of the required historic data is moved to archive database.