question

ArunRaaman-6281 avatar image
0 Votes"
ArunRaaman-6281 asked ArunRaaman-6281 commented

how to recover tag values in azure sql database

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.

sql-server-generalazure-sql-database
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @ArunRaaman-6281,

Welcome to Q&A forum.

Your question is related to SQL Azure DB, I only have local environment, do not have Azure environment. So I add the azure-sql-database tag, people there will give you a better help.

0 Votes 0 ·
VaibhavChaudhari avatar image
0 Votes"
VaibhavChaudhari answered ArunRaaman-6281 commented

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


image.png (27.0 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


Thanks Vaibhav. I found this later in day yesterday after I posted the question.

0 Votes 0 ·
AnuragSharma-MSFT avatar image
0 Votes"
AnuragSharma-MSFT answered

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

Adding on top of @VaibhavChaudhari 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



image.png (12.1 KiB)
image.png (7.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.