70-473 · Question #30
You deploy a Microsoft SQL Server instance on a Microsoft Azure virtual machine by using a template. You plan to deploy a PHP-based app in an Azure web app. The web app will use a database on the virt
The correct answer is B. Use sp_configure to enable remote access. D. On the virtual machine, enable the inbound connections on TCP port 1433 from Windows E. Restart the SQL Server service.. To enable an Azure web app to access a SQL Server database on an Azure VM within the same virtual network, you must configure SQL Server for remote access, open the necessary firewall port on the VM, and restart the SQL Server service.
Question
Options
- AChange the SQL Server authentication to mixed mode.
- BUse sp_configure to enable remote access.
- CFrom the Azure portal, add an endpoint for TCP port 1434.
- DOn the virtual machine, enable the inbound connections on TCP port 1433 from Windows
- ERestart the SQL Server service.
How the community answered
(39 responses)- A23% (9)
- B67% (26)
- C10% (4)
Why each option
To enable an Azure web app to access a SQL Server database on an Azure VM within the same virtual network, you must configure SQL Server for remote access, open the necessary firewall port on the VM, and restart the SQL Server service.
Changing SQL Server authentication to mixed mode allows both Windows and SQL Server authentication, but it is not a direct prerequisite for enabling remote connectivity; the web app could use an existing Windows account or SQL authentication if already configured.
The `sp_configure 'remote access'` setting helps configure SQL Server to process requests from remote clients. Enabling this option ensures that the SQL Server instance is configured to accept and respond to connection attempts originating from outside its host server, which is necessary for the Azure web app to connect.
TCP port 1434 is used by the SQL Server Browser service, which helps locate named instances or instances using dynamic ports, but the primary port for direct T-SQL client connections to a default SQL Server instance is TCP 1433, not 1434.
SQL Server typically listens on TCP port 1433 for client connections. To allow the Azure web app to connect to the SQL Server database on the virtual machine, an inbound rule must be enabled on the virtual machine's Windows Firewall for TCP port 1433.
After making configuration changes to SQL Server's remote access settings or modifying firewall rules that affect SQL Server connectivity, restarting the SQL Server service is often required for these changes to be fully applied and become effective for new connections.
Concept tested: SQL Server remote connectivity configuration
Source: https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-a-windows-firewall-for-database-engine-access
Topics
Community Discussion
No community discussion yet for this question.