ProcessDeleteBatchesInBulk
Deletes selected batches.
Member of namespace
Maintenance ManagerSyntax
bool ProcessDeleteBatchesInBulk ()Parameters
- deleteSubFolders
- True deletes any subfolders within batch directories, regardless of creation source.
- preserveEngineDBRecords
- True retains engine database records (only batch directories are deleted).
- detailDebugLog
- When true, it writes the detail RRS log of action execution. It helps to debug the action execution. Recommended to set it false. Performance may be affected due to enabling this parameter.
Returns
True if the batches are deleted. Otherwise, False.Level
Any level.
Details
Using the results from a previous query performed by NENU actions, the selected batches are deleted from disk. Action deletes batches in bulk. The performance of the delete operation is improved.
This delete process needs a different stored procedure for different databases and one table name
'DeleteRecordList'. Database-specific stored procedures and table script are provided in
\\Datacap\support\DBScript folder
Note:
A previous query must be done to identify the batches to delete. The database connection is
closed by this action.- This action is limited to SQL server, Oracle, and Db2 database.
- Depending on the database connecting to a Db2, SQL, or Db2 server, run the DB2_BulkDelete.sql, SQL_BulkDelete.sql , or the Oracle_BulkDelete.sql query that is found in the \Datacap\Support\dbscript folder before calling the ProcessDeleteBatchesInBulk() action.
- This action does not save deleted batch info in the debug table.
-
If huge number of records are present in debug table, it is recommended to use the ProcessClearDebugTable() action before calling ProcessDeleteBatchesInBulk() action. But ProcessClearDebugTable() action deletes all records from debug table, and debug report in RV2 reports may be affected.
- If a huge number of records are present in debug table and the
ProcessClearDebugTable() action is not used before
ProcessDeleteBatchesInBulk() action, the SQL query execution takes more time to
run and it could timeout before execution is completed. To increase the timeout for the SQL query,
it is recommended to set the following registry value according to the number of records present in
the debug table.
For x86 "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Datacap\TMS\InterThread"
For x64 "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Datacap\TMS\InterThread"
- Example:
-
QuerySetStation("1") QuerySetJobID("!Demo Job") ProcessRunSqlQueryEx("") ProcessDeleteBatchesInBulk("false,false,false")