Skip to content

Instantly share code, notes, and snippets.

@DataSic
Created May 29, 2018 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DataSic/42ea26416a8e6f3ce3fa3f23d616646b to your computer and use it in GitHub Desktop.
Save DataSic/42ea26416a8e6f3ce3fa3f23d616646b to your computer and use it in GitHub Desktop.
AzureSqlPass - Add Firewall Rule tSQL
/*
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-set-database-firewall-rule-azure-sql-database
*/
--[DatabaseName] context
EXEC sp_set_database_firewall_rule @name = N'NewDatabaseFirewallRule',
@start_ip_address = 'IpAddressStart',
@end_ip_address = 'IpAddressEnd'
/*
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-set-firewall-rule-azure-sql-database
*/
--[Master] context
EXEC sp_set_firewall_rule @name = N'NewServerFirewallRule',
@start_ip_address = 'IpAddressStart',
@end_ip_address = 'IpAddressEnd'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment