Answered by:
Data co-location on tape fails

Question
-
Due to a server failure, we had to reinstall our DPM server and restore the DPM DB. Everything is now up and running, but the colocation of data on tape fails. Even though a Co-located protection group set already exists, the tape is marked Offsite ready as soon as the data from a PG is written to the tape. Besides, I can't delete the current group set, get this error message:
There are protection groups associated with this set. Please remove them from the set first".
The PGs are all remove from the group but for some reason it's impossible to delete it. Of course I've tried to create a new group set but this didn't solve the problem. Any ideas are much appreciated!
O/S: Windows Server 2012 R2
DPM version: 2012 R2 UR11
/AmirFriday, November 4, 2016 10:39 AM
Answers
-
HI,
OK - now we're getting somewhere.
Please run these queries and use the appropriate guid in each query.
select MediaPoolId from tbl_MM_MediaPool where PGSetId = 'PGSETID_GUID_TO_DELETE' update tbl_MM_MediaPool set PGSetId = NULL where MediaPoolId = 'MediaPoolId_from_above_query'
Then delete the PGset using the query that failed last time.Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.
- Marked as answer by Jaan Meijer Monday, November 14, 2016 7:28 AM
Wednesday, November 9, 2016 3:30 PM
All replies
-
Hi
Please run the below SQL query to see what protection group membership is for each PGSet.
select MP.PGSetId,PGSet.SetName, ProtectedGroupId as MediaPoolID,PG.FriendlyName as 'PG Friendlyname' from dbo.tbl_MM_MediaPool MP Join dbo.tbl_IM_ProtectedGroup PG on PG.MediapoolId = MP.MediaPoolId join dbo.tbl_MM_PGSet PGSET on PGSET.PGSetId = MP.PGSetId where mp.PGSetId is not null and pg.MarkedForDeletion = 0 order by MP.PGSetId
If you find a rogue protection group belonging to a PGset, you can remove it using the below script. Be sure to make a DPMDB backup before making any changes.update dbo.tbl_MM_MediaPool set PGSetId = NULL where MediaPoolId = '00000000-0000-000-0000-000000000000' -- replace with valid MediaPoolId from previous query
Once the PGSet no longer has any members then you can delete it using the DPM UI.
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.
- Proposed as answer by Mike JacquetMicrosoft employee Friday, November 4, 2016 4:26 PM
Friday, November 4, 2016 4:23 PM -
Thanks Mike :). Unfortunately, when I run the first script - no PG's are listed as members, but I still cannot remove the PG set in the GUI. I have tried to create a new PG set and made all the PG's as members into it, but the behaviour is still the same - the tape is marked as Offsite ready straight after backup of a single PG.
Is there perhaps a script that removes the present PG set?
Important to mention is that this has worked fine earlier, but we recently had to reinstall the DPM server from scratch (due to a ransomware attack) and consequently restore the DPM DB. This procedure was successful, but as mentioned above this mess with co-location on tape seems to have started after this.
/AmirMonday, November 7, 2016 3:52 PM -
Hi,
Neither problems make sense to me so maybe remove all PG's from all of the PGset's, delete all the PGSets then remake them. For any that give you an error, delete it using sql query below.
Again - be sure you have a good DPMDB backup before proceeding.
select * from dbo.tbl_MM_PGSet -- list all PGsets delete dbo.tbl_MM_PGSet ---delete a PGSet Where pgsetid = 'PGSETID_GUID_TO_DELETE_FROM_ABOVE_QUERY'
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.
Monday, November 7, 2016 5:57 PM -
Hello Mike,
I get the following error msg in Management Studio when executing the script:
Msg 8169, Level 16, State 2, Line 3
Conversion failed when converting from a character string to uniqueidentifier.
Tuesday, November 8, 2016 3:40 PM -
Hi,
Select * from dbo.tbl_MM_PGSet
Given the below output:PGSetId SetName AllowDiffRetnPeriods WritePeriod ExpiryTolerance
7809C059-B04E-4139-BA0F-327290FDA145 Hyper-V 0 P00Y00M08W00D P00Y00M03W00DYou would run:
delete dbo.tbl_MM_PGSet ---delete a PGSet
Where pgsetid = '7809C059-B04E-4139-BA0F-327290FDA145'
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.
- Edited by Mike JacquetMicrosoft employee Tuesday, November 8, 2016 4:17 PM
Tuesday, November 8, 2016 4:14 PM -
Hello Mike,
I managed to get the pgsetid, but now I get a new error:
Msg 547, Level 16, State 0, Line 1
The DELETE statement conflicted with the REFERENCE constraint "FK_tbl_MM_MediaPool_tbl_MM_PGSet". The conflict occurred in database "DPMDB", table "dbo.tbl_MM_MediaPool", column 'PGSetId'.
The statement has been terminated.
Wednesday, November 9, 2016 7:49 AM -
HI,
OK - now we're getting somewhere.
Please run these queries and use the appropriate guid in each query.
select MediaPoolId from tbl_MM_MediaPool where PGSetId = 'PGSETID_GUID_TO_DELETE' update tbl_MM_MediaPool set PGSetId = NULL where MediaPoolId = 'MediaPoolId_from_above_query'
Then delete the PGset using the query that failed last time.Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.
- Marked as answer by Jaan Meijer Monday, November 14, 2016 7:28 AM
Wednesday, November 9, 2016 3:30 PM -
Yes, this time I managed to get rid of the corrupted PG set and the co-location works perfect again!
Thank you so much Mike, I'm very impressed by your DPM skills!!
/AmirMonday, November 14, 2016 7:31 AM -
I'll just add this for the record:
Recently I was facing a complete DPM server rebuild, as every time I modified a PG or performed a tape operation the DPM service would either crash with error ID 999, 943 or error 944 if any attempt was made to modify a PG. Even trying to mark a tape as Free resulted in a DPM service crash.
Reading through the code above I figured that the tape optimisation/collation set I had configured was possibly corrupted in some way, as I couldn't delete it using the DPM UI or PowerShell. This was the case even though I had removed all PGs from the set.
I carefully went through the code in this post and removed all traces of the MediaPoolIDs and finally the PGSetId in SQL Admin. The corrupted PG collation group had gone and so had all my errors when trying to make almost any modification. I cannot tell you how happy I was!
Thank you Mike. You are a star.
Thursday, December 17, 2020 12:58 PM