SM_MoveActiveSampleRecords stored procedure
The SM_MoveActiveSampleRecords stored procedure moves records, that include identifiers, in the ActiveSampleRecords table to another queue. The stored procedure runs some final checks to determine whether the record is erroneously ACTIVE before it is moved to the queue defined in the @newQueue parameter.
Stored procedure process
1 Remove the record from the ActiveSampleRecords table if it meets any of the following criteria:
▪No longer in the ACTIVE queue
▪Or the associated project was deleted
▪Or the associated project status was changed to Test orInactive
▪Or the associated project was reactivated without sample
2 Otherwise, the record is still ACTIVE. If the @maxElapsedTime passed since the CheckTime, move the record to @newQueue and delete it from the ActiveSampleRecords table.
3 The remaining ACTIVE records have not yet passed the @maxElapsedTime in the table.
4 The stored procedure outputs a list of the record identifiers that were moved in step 2.
SM_MoveActiveSampleRecords stored procedure parameters
@newQueue
The name of the new queue that stores moved records. The default value is TIMED_OUT.
@maxElapsedTime
The sample management data source server name.
See also