When running Azure SQL, we can use the option Firewalls and virtual networks to configure how the DB administrator and applications will have access to the SQL server and databases. When trying to connect from home, in some cases (especially in DEV environments that you may not even be connected to the corporate network to test your code), you may want to allow your workstation to be able to connect. There are a couple of ways to connect your home computer to your Azure SQL server and database. The first one is by adding a client IP and use your public IP on the SQL server.
The second method is using SQL Management Studio on your workstation. Type the server name (make sure to use suffix .database.windows.net) and provide the credentials that you defined during SQL server creation. You will be prompt to authenticate on Microsoft Azure, and after the authentication is successful, a dialogue box to create a new firewall rule with your existing IP will be displayed. Just click OK, and that will grant you access to the feature above to connect to the SQL server.
More Quick Tips articles
- New from Microsoft: Azure Security Center onboarding guide
- Fixing Azure Key Vault when moving to a different tenant
- Restore Azure Key Vault using just two PowerShell cmdlets
- This overlooked feature in Visual Studio Code can speed release time
- Enabling Front Door managed certificates in Azure: Status update