Work with Custom Stored Procedures

Empty stored procedures (sprocs) are created during the database update phase. Newly created Cases automatically contain the sprocs.

During the installation’s database update phase, empty stored procedures (sprocs) are created for existing Cases (within each Client database) that do not already have sprocs. This allows for the insertion of custom stored procedures at the completion of the following Job types for existing Cases:

  • Discovery
  • Streaming Discovery
  • Data Extract
  • Processing
  • Export

In addition, an empty stored procedure is inserted once disk layout is completed for export, but before the distribution of tasks. Expected names of the stored procedures are:

  • dbo.CustomDataExtract
  • dbo. CustomDiscovery
  • dbo.CustomExport
  • dbo.CustomExportVolumized
  • dbo.CustomProcessing
  • dbo.CustomStreamingDiscovery

There is no established timeout value for the execution of custom sprocs. An eCapture job will not be marked complete until the associated stored procedure has completed. Presently, a timeout threshold for stored procedures cannot be established by the end-user.

The @JobID parameter is passed into all custom sprocs. The stored procedure labeled “CustomExport” contains one additional parameter (@LastExport) which indicates whether or not the export in question is the last export in the series for the associated job. A value of 0 = False and 1 = True.

If a custom sproc was inserted, the sproc runs and an entry appears in the QueueManager.log file indicating it ran. The following line appears in the Queue Manager.log file for a Custom Discovery sproc.

2016-06-28 12:39:33,710 [33] INFO – Executing custom stored procedure DEMO123_Client00001.dbo.CustomDiscovery for JobID[40].

If an error occurs in one of the custom stored procedures, it will also appear in the QueueManager.log file and the Job will proceed without interruption.

 

Related Topics

Create a New Case (Project)