Note: Ensure the Storage Migration has been completed before performing the below process.
1. Open the Admin website | Storage Location | Storage Migration | View Storage Migration History2. Make a note of the name of the failing task.3. In SQL run the following query and look for the TaskName noted above and then note the MigrationTaskID e.g 2Select * from MigrationTask4. Run the following queries using the MigrationTaskID noted above, e.g. 2. The first query may take some time to complete:DELETE FROM MigrationLog WHERE MigrationTaskID = 2DELETE FROM MigrationTask WHERE MigrationTaskID = 25. Determine the ID if your old Storage Location:Select * from StorageLocation6. Take note of the old StorageLocationID number.7. Run the following query replacing x with the above noted storagelocationid:DELETE FROM StorageLocation WHERE StorageLocationID = x8. Confirm the old Storage Location is no longer visible in the Archive Manager Web Console under the Storage Location node.
WORKAROUND 2:
1. Stop the Archive Manager Services
Note: The following is done when the culprit is StorageID 2.
2. Back up the tables below with the following queries:
DECLARE @STORAGEID INT
SET @STORAGEID = 2
SELECT ML.* INTO BACKUP_MIGRATIONLOG FROM MigrationLog AS ML
JOIN MigrationTask AS MT ON ML.MigrationTaskID = MT.MigrationTaskID
WHERE MT.OriginalSLID = @STORAGEID OR MT.NewSLID = @STORAGEID
SELECT * INTO BACKUP_MIGRATIONTASK FROM MigrationTask
WHERE OriginalSLID = @STORAGEID OR NewSLID = @STORAGEID
SELECT * INTO BACKUP_STORAGELOCATION FROM StorageLocation WHERE StorageLocationID = @STORAGEID
3. Delete the storage entries after replacing the parameter @STORAGEID, this step will take a long time.
DECLARE @STORAGEID INT
SET @STORAGEID = 2
DELETE ML FROM MigrationLog AS ML
JOIN MigrationTask AS MT WITH (NOLOCK) ON ML.MigrationTaskID = MT.MigrationTaskID WHERE MT.OriginalSLID = @STORAGEID OR MT.NewSLID = @STORAGEID
DELETE FROM MigrationTask
WHERE OriginalSLID = @STORAGEID OR NewSLID = @STORAGEID
DELETE FROM StorageLocation WHERE StorageLocationID = @STORAGEID