Azure Data Platform · Azure Services

T-SQL way to ADD and EDIT Client IP Address in Azure SQL DB

Introduction

In this Article, we will see how to Add, Edit (and Delete) Client IP Addresses/Firewall in Microsoft Azure through Transact SQL(T-SQL) in SQL Server Management(SSMS) for Azure SQL DB.

To know what is Azure Firewall and how to Add, Edit (and Delete) Client IP Addresses in Microsoft Azure Portal step by step, check – ADD and EDIT Client IP Address in Azure SQL DB

Server Firewall Rule

Server Firewall Rule – T-SQL Query Pic in SSMS
Server Firewall Rule – Result set in SSMS

After our UPSERT [UPdate + inSERT] through T-SQL, we can cross-check the latest Server Firewall rules in Azure Portal as well with refresh, it will be reflected there.

Database Firewall Rule

Database Firewall Rule – T-SQL Query Pic in SSMS
Database Firewall Rule – Result set in SSMS

After our UPSERT [UPdate + inSERT] through T-SQL, we can cross-check the latest Database Firewall rules in Azure Portal as well with refresh, it will be reflected there.

Notes-

  • If both Start IP and End IP Addresses are equal to ‘0.0.0.0’, means ‘Allow Azure services and resources to access this server’ option set to ‘Yes’.
Allow All Windows Azure Ips – T-SQL
Allow All Windows Azure Ips – Azure Portal

If you are interest to re-use or practice the above code, visit Arulmouzhi/AzureStuffs repos.

Use case Scenario

The T-SQL query way to add, edit and delete IP addresses in Azure, will be much more handy for all Azure SQL admins who can easily handle requests of client’s IP Addresses within SSMS itself instead of preferring Azure Portal.

Summary

Thus, we saw how to Add, Edit (and Delete) Client IP Addresses/Firewall in Microsoft Azure through Transact SQL(T-SQL) in SQL Server Management(SSMS) for Azure SQL DB and Use case Scenario as well.

Follow Blog and Show your Support for many more interesting upcoming Posts!

Advertisement

5 thoughts on “T-SQL way to ADD and EDIT Client IP Address in Azure SQL DB

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s