More than one MediaPool reported for same Media

I’ve been battling with System Center 2012 R2 Data Protection Manager for the last couple of days when trying to add a HP StoreEver MSL 4048 Tape Library connected via directly attached Fibre.

I could perform a rescan and discover the Tape Library and the Tape Drive, however whenever I tried to perform an Inventory, the DPM console would refresh and the Tape Library and Tape Drive would disappear. Under Monitoring it displayed an error relating to zoning and making sure that the medium changer was not presented to the DPM server.

Eventually, I found an error in the Event Logs reporting “More than one MediaPool reported for same Media xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”. As a result of this I found this blog post¬†and sure enough I found duplicate entries when running the following SQL query

1
prc_Global_MM_ArchiveMedia_GetMediaPool 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'

After backing up the database and running the

1
SetSharedDpmDatabase -RemoveDatabaseSharing

command, I reran the SQL query and the duplicates disappeared.

I could then rescan and perform an Inventory against the Tape Library.