Find Database Backup URL

  • Hi All,

    I have some databases that are being backed up to a URL (Azure Blob Storage) with a Credentia.

    I've always used the following (or roudabout) query to identify where the backups are:

    SELECT *
    FROM msdb.dbo.backupset b
    JOIN msdb.dbo.backupmediafamily m ON b.media_set_id = m.media_set_id
    WHERE database_name = 'MyDB'
    and type = 'd'
    ORDER BY backup_finish_date DESC

    However, with the URL backups the physcial_device_name field is populated with a GUID + INT

    Example: {ABB61E9D-E1C8-4128-AC12-69D48AB096B9}12

    Is there a way to get a URL from this?

    Cheers

    Alex

     

    • This topic was modified 5 years, 2 months ago by  alex.sqldba. Reason: Added formatting to code block
  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • No, you cannot get URL from GUID. The backup most probably would be done on Blob contained in the Azure storage account. You can reverse engineer to find it out

    SQL Database Recovery Expert 🙂

  • This was removed by the editor as SPAM

  • You could use the following command which returns the URL of the backup file:

    SELECT *

    FROM managed_backup.fn_available_backups ('databasename')

    For more details, please refer to https://docs.microsoft.com/en-us/sql/relational-databases/system-functions/managed-backup-fn-available-backups-transact-sql?view=sql-server-ver15.

    Hope this could help you.

    SQL Database Recovery Expert 🙂

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply