none
How Can I Find All Offsite Tapes From August RRS feed

  • Question

  • I'm using SCDPM 2012 SP1 and I need to work out what offline tapes have all our backups from August on them so I can set them aside as our 'Yearly/Annual Backups' as I havent set that up yet in DPM for it to do it automatically for us.

    I cant see any options in the DPM admin console itself so I'm guessing there may be some PowerShell commands I need to run?

    Once I've got a list of the offsite tapes and can see the ones from August, I'll need to remove them from DPM so if you can help with that too that would be great!

    Wednesday, October 30, 2013 3:46 PM

Answers

  • Hi,

    You can use this SQL script to get a list of tapes used on august.

    use dpmdb
    select media.Label,media.BarcodeValue,pd.CreationDate,pd.ExpiryDate,pd.LifeStatus as "1=valid, 2=expired" from dbo.tbl_MM_MediaMap mm
    join dbo.tbl_MM_PhysicalDataset pd on pd.datasetid = mm.datasetid 
    join dbo.tbl_MM_Media media on media.MediaId = mm.MediaId 
    and pd.CreationDate >= '2013-08-01' 
    and pd.CreationDate <= '2013-08-31'


    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 BuchatechMVP, Moderator Monday, November 4, 2013 2:06 AM
    • Unmarked as answer by FazzaGBR Monday, November 4, 2013 8:40 AM
    • Marked as answer by FazzaGBR Tuesday, November 5, 2013 8:00 AM
    Friday, November 1, 2013 11:22 PM
    Moderator

All replies

  • Hi Frazza

    When the Recovery group retention range is configured it will retain the information in the DPM DB to be able to recover from the tape in the protection group. If you have not set them, the information will be purged from the database.

    This is not an issue as the tape can be quickly catalogued and brought back into the system as a imported media type when / if needed.

    My warning is if you choose to retain the information online for all month and year end tapes, larger protection environments will see large DPM databases and can cause slow console response times (in my experience).

    Hope this helps

    Thanks

    Russell

    Friday, November 1, 2013 9:05 PM
  • Hi,

    You can use this SQL script to get a list of tapes used on august.

    use dpmdb
    select media.Label,media.BarcodeValue,pd.CreationDate,pd.ExpiryDate,pd.LifeStatus as "1=valid, 2=expired" from dbo.tbl_MM_MediaMap mm
    join dbo.tbl_MM_PhysicalDataset pd on pd.datasetid = mm.datasetid 
    join dbo.tbl_MM_Media media on media.MediaId = mm.MediaId 
    and pd.CreationDate >= '2013-08-01' 
    and pd.CreationDate <= '2013-08-31'


    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 BuchatechMVP, Moderator Monday, November 4, 2013 2:06 AM
    • Unmarked as answer by FazzaGBR Monday, November 4, 2013 8:40 AM
    • Marked as answer by FazzaGBR Tuesday, November 5, 2013 8:00 AM
    Friday, November 1, 2013 11:22 PM
    Moderator
  • I've tried the above powershell script and I'm afraid it doesnt work for me.

    On running the script I get the following:

    PS C:\> .\augustTapes.ps1
    At C:\augustTapes.ps1:6 char:21
    + and pd.CreationDate <= '2013-08-31'
    +                     ~
    The '<' operator is reserved for future use.
        + CategoryInfo          : ParserError: (:) [], ParseException
        + FullyQualifiedErrorId : RedirectionNotSupported

    Monday, November 4, 2013 8:38 AM
  • The above is not a powershell script, it's a SQL script. You need to run SQL management studio and connect to the SQL Server instance used by DPM. If the DPM DB name is different, then you must also change that in the script. 

    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 4, 2013 3:39 PM
    Moderator
  • I must of been having a bad/busy day when I read the answer and tried to run an SQL script as a PowerShell script!!

    I've just run the query and now have the answer I needed so thank you very much.


    My next question is, now I know which tapes are from August, how do I remove them from SCDPM so it doesnt pester me for them in the future as I have no intention of ever using these tapes again?

    Thanks.  :)

    Tuesday, November 5, 2013 8:03 AM
  • Hi,

    You can remove tapes from the overdue tapes section of the tape management report using this procedure:

    http://social.technet.microsoft.com/Forums/en-US/ef755c32-3a09-4e3c-8805-aa29cf4f13be/remove-lost-or-broken-tapes-out-of-the-dpm-db-tape-report-dpm2012-sp1-ru3


    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.

    Tuesday, November 5, 2013 3:45 PM
    Moderator
  • Excellent!  I'll give that a go this morning.

    Thanks Mike for all your help.

    :)

    Thursday, November 7, 2013 8:01 AM