DPM 2012. offsite tapes not expiring. duetapes.ps1 RRS feed

  • Question

  • Hi,

    After all adventures with SCDOM2012 install, after strange bugs, when almost all is working propertly I stuck.

    I thought that will  be a cure for my problems, but like most of all I get strange expiration dates far far away form reality

    For examle:

    Tape with barcode XM9927L3.

    duetape.ps1  shows me expire date - 01/01/2017 21:04:36( and this is a "magic date" which actualy "presents" on all tapes!)

    Using SQLQuery i found out that expire date for that tape -  2012-07-28 14:04:04 

    maybe problem is in date format? i try different - resault is the same...

    Cure needed!

    Wednesday, July 11, 2012 2:18 AM

All replies

  • i had a similar issue, had to uninstall re-install and restore d-base, check my post about this.


    Thursday, July 12, 2012 3:50 PM
  • Hi,

    Use this SQL query instead and see if that gives you what you want. It will list all used media and show expiry dates in ascending order,

    Use dpmdb
    SELECT DISTINCT Media.SlotNum + 1 AS MediaSlotNumber,
       Media.BarcodeValue AS MediaBarcode, 
       Media.Label AS MediaLabel,
       Media.Location AS IsOnline, 
       Library.UserFriendlyName AS LibraryName, 
       dbo.ufn_MM_GetPgLabels(Media.MediaId) AS ProtectedGroupName,
       MAX(Dataset.ExpiryDate) AS MediaExpiryDate
       FROM   dbo.tbl_MM_Media AS Media INNER JOIN
       dbo.tbl_MM_ArchiveMedia AS ArchiveMedia ON ArchiveMedia.MediaId = Media.MediaId INNER JOIN
       dbo.tbl_MM_MediaMap AS MediaMap ON MediaMap.MediaId = ArchiveMedia.MediaId INNER JOIN
       dbo.tbl_MM_PhysicalDataset AS Dataset ON Dataset.DatasetId = MediaMap.DatasetId LEFT OUTER JOIN
       dbo.tbl_MM_Library AS Library ON Library.LibraryId = Media.LibraryId
       WHERE   (Dataset.LifeStatus = 1 OR Dataset.LifeStatus = 2) AND (Dataset.Vault = 1 OR Dataset.Vault = 3 OR Dataset.Vault = 4 OR Dataset.Vault = 5)
         --AND dbo.ufn_MM_IsOffsiteReadyTape(Media.MediaId) = 1
       GROUP BY Media.SlotNum, Media.BarcodeValue, Media.Label, Media.Location, Library.UserFriendlyName, dbo.ufn_MM_GetPgLabels(Media.MediaId)
       order by MediaExpiryDate

    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.

    Thursday, July 12, 2012 7:05 PM
  • Jeramy_T

    tnx, with your blog I've fixed first part of quest) But reporting part in DPM2012 still shows nothing(

    Monday, July 16, 2012 3:38 AM
  • Mike Jacquet

    tnx a lot! And when such fix will be placed into any DPM update?)

    Monday, July 16, 2012 3:43 AM
  • Mike Jacquet

    Hm.. i have  a lot of tapes with NULL MediaBarcodes. How can I correctly delete them? 

    Monday, July 16, 2012 3:50 AM