how to recover tag values in azure sql database

ArunRaaman 1,001 Reputation points
2021-07-28T22:28:15.897+00:00

Hello There,

I have a situation where I created 'Tag' with value and forgot its value after Azure SQL database is created.

Could anyone please help if there is a way to retrieve forgotten tag's value.

Azure SQL Database
SQL Server Other
{count} votes

Accepted answer
  1. Vaibhav Chaudhari 38,916 Reputation points Volunteer Moderator
    2021-07-29T05:55:09.81+00:00

    If you open up that SQL DB in the portal, you should be able to see the tag name and value given

    118951-image.png

    ----------

    Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav


1 additional answer

Sort by: Most helpful
  1. Anurag Sharma 17,631 Reputation points
    2021-07-29T06:41:21.717+00:00

    Hi @ArunRaaman , welcome to Microsoft Q&A forum.

    Adding on top of anonymous userChaudhari response, you can also get the value of tags using CLI or PowerShell. Below is the command of PowerShell. Just replace the value in placeholders with correct values:

    Get-AzTag -ResourceId /subscriptions/<your subscription id>/resourcegroups/<your resource group>/providers/Microsoft.Sql/servers/<your sql server name>/databases/<your db name>  
    

    Output:
    118948-image.png

    Azure CLI Command:

    az tag list --resource-id /subscriptions/<your subscription id>/resourcegroups/<your resource group>/providers/Microsoft.Sql/servers/<your sql server name>/databases/<your db name>  
    

    Output:
    118935-image.png

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.