none
Free tape stuck as offsite ready? RRS feed

  • Question

  • I have a tape that’s marked as “offsite ready” despite the fact that I “marked it as free” and subsequently erased it.

    It does not show up as belonging to any protection group and a detailed inventory on the tape doesn’t appear to change its status.

    It also does not show up in the tape management report as a tape ready for offsite despite being marked as such in the console.

    Any help in rectifying this?

    Thanks


    EDIT: sorry additional info, DPM 2012 R2 UR4.
    • Edited by PCAU Monday, November 17, 2014 11:55 PM
    Monday, November 17, 2014 11:51 PM

All replies

  • Sorry to hear about that!

    While we work on root causing/fixing that, you could probably try a workaround which might help here.

    Since the tape is erased/marked free and not associated with any protection group, you can remove the tape from DPM DB and perform inventory thereafter.

    Unfortunately removing tape from DPM DB is not supported in UI. However, you could follow the steps listed down in one of the forum threads to remove the tape from DB. Sharing snapshot of the thread below as pasting links is not working for me:

    To remove a tape media from the over due tape report, you can run a SQL script to remove the media from the DPM database.

    To run the script, perform the following steps:

    1)  Open the DPM console and under the reporting tab, double-click the "tape management" report and select the number of weeks you want a report for (up to 4 weeks).
    2)  Once the report opens- go to the page that list Over Due Tapes.
    3)  Make a note of the "Tape labels"  for the tapes you want to remove from the DPM database so they will no longer show up on the report.

    4) Make a backup of the DPMDB Sql database before proceeding using the following command:

         DPMBACKUP -db (The database will be saved in the C:\Program Files\Microsoft DPM\DPM\Volumes\ShadowCopy\Database Backups folder.

    5) Open SQL Enterprise manager and connect to the Server_name\$MS$DPM2007 instance. (For DPMM 2010 connect to MSDPM2010 instance)
    6) Under DATABASES - Highlight the DPMDB entry - then click on "NEW QUERY" button.
    7)  Copy / paste the following SQL script into the new query window.

    ---------- START COPY HERE -------------

    -- overdue tapes
    -- for clarity, set up the parameter as a variable
    declare @paramTapeLabel as nvarchar(256)
    set @paramTapeLabel = N'SAMPLE_TAPE_LABEL_NAME'

    -- keys
    declare @vMediaId as guid
    declare @vGlobalMediaId as guid

    -- if the delete gives trouble, add keyset after cursor
    declare cur_label cursor
     for select MediaId, GlobalMediaId
     from tbl_MM_Media
     where label = @paramTapeLabel;

    open cur_label
    while (0 = 0)
    begin
     fetch next from cur_label into @vMediaId, @vGlobalMediaId
     -- test for being done
     if @@fetch_status <> 0 break;

     print 'Deleting MediaId = ' + cast(@vMediaId as varchar(36))
     -- do a set of deletes atomically
     begin transaction;
     delete from tbl_MM_TapeArchiveMedia
      where MediaId = @vMediaId;

     delete from tbl_MM_MediaMap
      where MediaId = @vMediaId;

     delete from tbl_MM_ArchiveMedia
      where MediaId = @vMediaId;

     delete from tbl_MM_Global_ArchiveMedia
      where MediaId = @vGlobalMediaId;

     delete from tbl_MM_Global_Media
      where MediaId = @vGlobalMediaId;

     delete from tbl_MM_Media
      where current of cur_label;

     commit transaction;

    end
    close cur_label
    deallocate cur_label

    -------------- END COPY HERE ----------------------

    8)  replace the tape label name parameter in the script with the name of the tape label from the over due tape report that you want to delete.
            set @paramTapeLabel = N'SAMPLE_TAPE_LABEL_NAME'      <--- replace tape label between the single quotes ' '

    9) Execute the SQL script.

    10)  Repeat steps 8. and 9. for each tape label that you want to delete.


    Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    I am not sure if this would work and hence do remember to backup your DB before trying out database operations

    Thanks

    Samir

    Tuesday, November 18, 2014 2:11 PM
  • Thank you Samir I will cautiously try that option and report back.

    In the meantime though I have also tried running the ForceFree-Tape script over this which did not solve the issue.

    Wednesday, November 19, 2014 12:14 AM