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
- Using Azure ephemeral disks when provisioning VMs with ARM
- Checking services availability in Azure and Azure Stack Hub
- Reading text files with PowerShell and Linux bash shell
- Integrating Microsoft Defender with Cloud App Security
- New from Microsoft: Azure Security Center onboarding guide