Thanks for the response But I believe `tcpping` will not be sufficient enough to test the database connectivity, better to use a posh script as below.
Note: upload the posh script to Azure web app using Kudo `Zip Push Deploy` or vs code editor in portal. then execute thescript as `Powershell -File ".\<ScriptFileName.ps1>`
# Define the necessary variables
$serverName = "test.database.windows.net"
$databaseName = "test"
$username = "<your username>"
$password = "<your password>"
# Construct the connection string
$connectionString = "Server=tcp:$serverName,1433;Initial Catalog=$databaseName;Persist Security Info=False;User ID=$username;Password=$password;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
# Load the .NET assembly
Add-Type -AssemblyName "System.Data"
# Create a new SQL connection
$connection = New-Object System.Data.SqlClient.SqlConnection
$connection.ConnectionString = $connectionString
# Open the connection
$connection.Open()
# Create a new SQL command
$command = $connection.CreateCommand()
$command.CommandText = "SELECT DB_NAME()"
# Execute the command and read the results
$reader = $command.ExecuteReader()
while ($reader.Read()) {
Write-Output $reader[0]
}
# Close the reader and the connection
$reader.Close()
$connection.Close()
If connectivity is success, it will return the database name.
Thank you.