Please check the sealed status before you run any scripts and record whether or not the Arrest was sealed or not beforehand. Here is the query… if “Deleted = 1” then it is sealed. Select Deleted From NYPD_ASD where ArrestNum = '' The Scripts below will handle Sealing and Unsealing. Note: when Unsealing (Passing 0 to DatabasesDeleteRec) the IndexServer is not notified of the Unseal, that is why the IndexServer SP’s have to be called separately. When Sealing the DatabasesDeleteRec handles the IndexServer. --To Unseal Declare @R_ID uniqueidentifier Declare @D_ID uniqueidentifier Declare @LocationCode varchar(50) Select @LocationCode = l.Code from locations l join sites s on l.l_ID = s.l_id Select @D_ID = D_ID From Databases where TableName = 'NYPD_ASD' Select @R_ID = R_ID From NYPD_ASD where ArrestNum = 'm16618128' Exec DatabasesDeleteRec @LocationCode,'admin',@D_ID,@R_ID,0 execute IndexServerChangesAddMCAll @D_ID, @R_ID execute IndexServerChangesAdd @D_ID, @R_ID --ToSeal Declare @R_ID uniqueidentifier Declare @D_ID uniqueidentifier Declare @LocationCode varchar(50) Select @LocationCode = l.Code from locations l join sites s on l.l_ID = s.l_id Select @D_ID = D_ID From Databases where TableName = 'NYPD_ASD' Select @R_ID = R_ID From NYPD_ASD where ArrestNum = 'm16618128' Exec DatabasesDeleteRec @LocationCode,'admin',@D_ID,@R_ID,1