SlideShare a Scribd company logo
Jose Manuel Jurado Diaz | Support Escalation Engineer
Roberto Cavalcanti | Support Escalation Engineer
Session will start 1 min past hour
About us
Session Objectives
 The main components in the connectivity path.
 Best practices in your code to avoid connectivity
issues.
 How to solve most common connectivity
problems.
SQL Server
Platform History
SQL Server Platform History
Low Control
Shared
Lowercost
Dedicated
Highercost
High Control
Hybrid Cloud
100% Compatibility
Rapid self-service provisioning
SQL Server in WA VM - IaaS
Virtualized Machine
SQL Server
Physical Machine (raw iron)
Full h/w control
Roll-your-own HA/DR/scale
Managed database service
Focus on business logic
Virtualized Database
WA SQL Database - PaaS
Elastic/Self-Service capabilities
Full h/w control
SQL Server PrivateVirtualized Machine
SQL Server on Azure - IaaS
Main Components
How connections work
Port: 1433
Protocol: TCP
Encrypted
Proxy:
• Protect
connection
• Check
firewall rules
Authentication
Method.
ADO
.NET 4.6
ADALSQL
AAD
How Connections work Inside Azure
TCP:servername.database.windows.net,1433
Redirected to: Tenant Ring
using Port: 11202
All connections: 11202
P S
S
S
How Connections work Outside Azure
TCP:servername.database.windows.net,1433
P S
S
S
Best Practices
Best Practices
• Main Points
Configuration
• Retry-Logic
• Connection String parameters
Prevention
• Command Timeout
• Connect Retry Count
Execution
• How to monitor my connections
Monitor
Best Practices – Configuration
Wrong DNS
Ports outbound
Antivirus/Windows
Firewall
Your ISP Provider
Public IP Azure VM
DNS not updated, missing, invalid.
Outside: 1433
Inside: 11000-11999 / 14000-14999
Port 1433 is blocked as outbound
Ephemeral ports are not available
Client IP is blocked
Azure SQL Proxy is blocked or
changed
VM needs a Public IP
Geo-Replicated User Orphaned Logins
Best Practices – Prevention
tcp:yourservername.data
base.windows.net,1433
Connection Timeout=30
Latest version of
ADO.NET, Microsoft
JDBC, ODBC
Contained User instead
of Logins
Connection Pooling
Open/close the
connection as fast as
possible
Connection may fail –
Retry Logic is key
- EF and NET.4.6.1
Avoid idle connections –
ConnectRetryInterval and
ConnectRetryCount
Try .. Catch for all
connections and
command executions
MultipleActiveResultSets
Best Practices – Prevention
public bool HazUnaConexionConReintentos(string clsConexion, C.SqlConnection sqlConnection, bool bInstanciaCadaVez=false)
{
int retryIntervalSeconds = 10;
bool returnBool = false;
for (int tries = 1; tries <= 5; tries++)
{
try
{
Console.WriteLine("Attempt Number: " + tries.ToString());
Console.WriteLine();
if (tries > 1)
{
Console.WriteLine(“Wait time: " + retryIntervalSeconds.ToString() + " seconds");
Console.WriteLine();
H.Thread.Sleep(1000 * retryIntervalSeconds);
retryIntervalSeconds = Convert.ToInt32(retryIntervalSeconds * 1.5);
C.SqlConnection.ClearAllPools();
}
if (bInstanciaCadaVez)
{
sqlConnection = new C.SqlConnection();
}
sqlConnection.ConnectionString = clsConexion;
sqlConnection.Open();
// Sólo para conexiones que se reconectan. sqlConnection.Execute(). De forma automática tenemos 2 nuevas propiedades en la cadena de conexión.
// ConnectRetryCount(Default is 0.Range is 0 through 255.)
// ConnectRetryInterval(Default is 1 second.Range is 1 through 60.)
// Connection Timeout (Default is 15 seconds.Range is 0 through 2147483647)
//Specifically, your chosen values should make the following equality true:
//Connection Timeout = ConnectRetryCount * ConnectionRetryInterval
//For example, if the count = 3, and interval = 10 seconds, a timeout of only 29 seconds would not quite give the system enough time for its 3rd and final retry at
connecting: 29 < 3 * 10.
returnBool = true;
break;
}
Best Practices – Prevention – (continued)
catch (C.SqlException sqlExc)
{
if (sqlExc.Number == 4060 || sqlExc.Number == 40197 || sqlExc.Number == 40501 || sqlExc.Number == 40613 || sqlExc.Number == 49918 ||
sqlExc.Number == 49919 || sqlExc.Number == 49920 || sqlExc.Number==18456)
//18456 for demo. Login Failed.
// 4060 Cannot open database "%.*ls" requested by the login. The login failed
// 10928 "The %s limit for the database is %d and has been reached. See http://go.microsoft.com/fwlink/?LinkId=267637 for assistance.")
// 17830 SRV_LOGIN_TIMERS
// 40197 The service has encountered an error processing your request
// 40501 The service is currently busy. Retry the request after 10 seconds. Incident ID: %ls. Code: %d.
// 40613 Database unavailable
// 40615 Blocked by firewall
// 49918 Cannot process request. Not enough resources to process request
// 49919 Cannot process create or update request. Too many create or update operations in progress for subscription "%ld
// 49920 Cannot process request. Too many operations in progress for subscription "%ld
// 18456 Login Error, for testing, pretend network error is transient.
// See more: https://azure.microsoft.com/en-us/documentation/articles/sql-database-develop-error-messages/
{
Console.WriteLine(“Connectivity error: " + sqlExc.Number.ToString() + '-' + sqlExc.Message );
Console.WriteLine();
C.SqlConnection.ClearAllPools();
continue;
}
else
//{ throw sqlExc; }
{
Console.WriteLine(“No more options!!" + sqlExc.Number.ToString() + '-' + sqlExc.Message);
Console.WriteLine();
C.SqlConnection.ClearAllPools();
}
}
}
return returnBool;
}
Best Practices – Execution
Avoid to use select * and
return just needed rows
Execution timeout
Distributed transactions
Cross-Queries
UTC, Language
Short Batches
Indexes and Statistics
Transaction.Scope
sp_execute_remote
AT TIME ZONE
Language in the connection string
Best Practices – Execution
CREATE EVENT SESSION ssEventoTimeout
ON DATABASE
ADD EVENT sqlserver.sql_batch_completed (
ACTION (sqlserver.client_app_name,sqlserver.client_connection_id,sqlserver.client_hostname,sqlserver.client_pid,sqlserver.database_id,s
qlserver.database_name,sqlserver.session_id,sqlserver.sql_text,sqlserver.username)
WHERE ([result] <> (0)))
ADD TARGET package0.asynchronous_file_target(
SET filename=’https://azureblobcontainer.blob.core.windows.net/xe-container/DemoPersistedTimeout.xel’)
If you need to reproduce a TSQL command timeout, basically you need to:
Create a stored procedure that takes more time that you expected in your application:
create PROC usp_Timeout
as
select 1
waitfor delay ’00:00:10′
Try to specify in the SQL SERVER Management Studio->Command Timeout or in your application change the command timeout
parameter with a value less than you have in waitfor (in this case, 5 seconds)
using (SqlConnection awConnectionDb = new SqlConnection(connectionStringDb))
{
awConnectionDb.Open();
SqlCommand cmd1 = awConnectionDb.CreateCommand();
cmd1.CommandTimeout = 5;
cmd1.CommandText = string.Format(“usp_Timeout”);
cmd1.ExecuteNonQuery();
}
Best Practices – Monitoring
Internal Telemetry
SQL Auditing
SQL Connection Statistics
and StopWatch
Query Data Store, QPI
Best Practices – Monitoring
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
awConnection.StatisticsEnabled = true;
string productSQL = "SELECT top " + nRows.ToString() + "* FROM ValoresEjemplo";
SqlDataAdapter productAdapter = new SqlDataAdapter(productSQL, awConnection);
DataSet awDataSet = new DataSet();
awConnection.Open();
productAdapter.Fill(awDataSet, "ValoresEjemplo");
IDictionary currentStatistics = awConnection.RetrieveStatistics();
long bytesReceived = (long)currentStatistics["BytesReceived"];
long bytesSent = (long)currentStatistics["BytesSent"];
long selectCount = (long)currentStatistics["SelectCount"];
long selectRows = (long)currentStatistics["SelectRows"];
long ExecutionTime = (long)currentStatistics["ExecutionTime"];
long ConnectionTime = (long)currentStatistics["ConnectionTime"];
Console.WriteLine("BytesReceived: " + bytesReceived.ToString());
Console.WriteLine("BytesSent: " + bytesSent.ToString());
Console.WriteLine("SelectCount: " + selectCount.ToString());
Console.WriteLine("SelectRows: " + selectRows.ToString());
Console.WriteLine("ExecutionTime: " + ExecutionTime.ToString());
Console.WriteLine("ConnectionTime: " + ConnectionTime.ToString());
Thread.Sleep(1000);
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}",
ts.Hours, ts.Minutes, ts.Seconds,
ts.Milliseconds / 10);
Console.WriteLine("RunTime " + elapsedTime);
awConnection.ResetStatistics();
Customer can change the connection to proxy only (we do not do this but customer can). Not Preferred Here is
documentation on this:
https://msdn.microsoft.com/en-us/library/azure/mt604380.aspx
https://msdn.microsoft.com/en-us/library/azure/mt604439.aspx
Here is a script that does this very easily for the customer and a selected server that was found on Github (have
tested it myself)
https://github.com/robotechredmond/Azure-PowerShell-Snippets/blob/master/AzureRM%20-
%20Reconfigure%20Azure%20SQL%20Server%20Connection%20Policy%20Type.ps1#L1
This really should only be if the customer absolutely cannot open those outgoing ports and we have confirmed that
is in fact the issue, the above troubleshooting steps should allow us to do so. The other consideration is this is per
server so in multiple servers, they all have to be configured. Do push for opening the ports and indicating it is for
outgoing traffic only.
How to solve issues
How to solve connectivity most common issues
• NetSh
• PortQueryUI
• Ping/psPing
Client Side
• Rules
• Firewall
• Global Protection
Corporate Network Side
• Application Insights
• Application Logs
• Alerts
Azure Side
Questions?
jmjurado@microsoft.com
@jmjuradodiaz
rocavalc@microsoft.com
@rocavalc
Azure SQL Database
Connectivity

More Related Content

DOC
The Ring of The Dove (A TREATISE ON LOVE)
PPT
Paleo ja terveys, onko maidosta ja viljoista haittaa vai hyötyä
PPTX
Ingesting streaming data for analysis in apache ignite (stream sets theme)
PPTX
Scaling asp.net websites to millions of users
PPTX
Developing on SQL Azure
PDF
MLflow at Company Scale
PPTX
Dapper performance
PPTX
Integrating Bedework, a CalDAV Calendar Server, into OAE
The Ring of The Dove (A TREATISE ON LOVE)
Paleo ja terveys, onko maidosta ja viljoista haittaa vai hyötyä
Ingesting streaming data for analysis in apache ignite (stream sets theme)
Scaling asp.net websites to millions of users
Developing on SQL Azure
MLflow at Company Scale
Dapper performance
Integrating Bedework, a CalDAV Calendar Server, into OAE

Similar to Azure SQL Database - Connectivity Best Practices (20)

PDF
MongoDB World 2019: Life In Stitch-es
PPTX
[NDC 2019] Enterprise-Grade Serverless
PPTX
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
PDF
QA Fest 2019. Антон Молдован. Load testing which you always wanted
PDF
PDF
Anton Moldovan "Load testing which you always wanted"
PPTX
Solving anything in VCL
PPTX
10 Ways to Gaurantee Your Azure Project will Fail
PDF
Introduction to SQLite in Adobe AIR
PDF
Working with data using Azure Functions.pdf
ZIP
Introduction to SQLite in Adobe AIR 1.5
PPTX
SQL Server - CLR integration
ODP
Introduce about Nodejs - duyetdev.com
PPTX
Oracle Connection Manager
DOCX
SSMS-waitstats
PPTX
El camino a las Cloud Native Apps - Introduction
PDF
NoSQL meets Microservices - Michael Hackstein
PPT
ADO.Net Improvements in .Net 2.0
PPTX
Sherlock Homepage - A detective story about running large web services - NDC ...
PDF
Introduction to .Net Driver
MongoDB World 2019: Life In Stitch-es
[NDC 2019] Enterprise-Grade Serverless
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
QA Fest 2019. Антон Молдован. Load testing which you always wanted
Anton Moldovan "Load testing which you always wanted"
Solving anything in VCL
10 Ways to Gaurantee Your Azure Project will Fail
Introduction to SQLite in Adobe AIR
Working with data using Azure Functions.pdf
Introduction to SQLite in Adobe AIR 1.5
SQL Server - CLR integration
Introduce about Nodejs - duyetdev.com
Oracle Connection Manager
SSMS-waitstats
El camino a las Cloud Native Apps - Introduction
NoSQL meets Microservices - Michael Hackstein
ADO.Net Improvements in .Net 2.0
Sherlock Homepage - A detective story about running large web services - NDC ...
Introduction to .Net Driver
Ad

Recently uploaded (20)

PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Electronic commerce courselecture one. Pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Cloud computing and distributed systems.
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Machine learning based COVID-19 study performance prediction
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
MYSQL Presentation for SQL database connectivity
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Reach Out and Touch Someone: Haptics and Empathic Computing
Network Security Unit 5.pdf for BCA BBA.
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Electronic commerce courselecture one. Pdf
The AUB Centre for AI in Media Proposal.docx
MIND Revenue Release Quarter 2 2025 Press Release
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Cloud computing and distributed systems.
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Machine learning based COVID-19 study performance prediction
Chapter 3 Spatial Domain Image Processing.pdf
sap open course for s4hana steps from ECC to s4
Digital-Transformation-Roadmap-for-Companies.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Ad

Azure SQL Database - Connectivity Best Practices

  • 1. Jose Manuel Jurado Diaz | Support Escalation Engineer Roberto Cavalcanti | Support Escalation Engineer Session will start 1 min past hour
  • 3. Session Objectives  The main components in the connectivity path.  Best practices in your code to avoid connectivity issues.  How to solve most common connectivity problems.
  • 5. SQL Server Platform History Low Control Shared Lowercost Dedicated Highercost High Control Hybrid Cloud 100% Compatibility Rapid self-service provisioning SQL Server in WA VM - IaaS Virtualized Machine SQL Server Physical Machine (raw iron) Full h/w control Roll-your-own HA/DR/scale Managed database service Focus on business logic Virtualized Database WA SQL Database - PaaS Elastic/Self-Service capabilities Full h/w control SQL Server PrivateVirtualized Machine SQL Server on Azure - IaaS
  • 7. How connections work Port: 1433 Protocol: TCP Encrypted Proxy: • Protect connection • Check firewall rules Authentication Method. ADO .NET 4.6 ADALSQL AAD
  • 8. How Connections work Inside Azure TCP:servername.database.windows.net,1433 Redirected to: Tenant Ring using Port: 11202 All connections: 11202 P S S S
  • 9. How Connections work Outside Azure TCP:servername.database.windows.net,1433 P S S S
  • 11. Best Practices • Main Points Configuration • Retry-Logic • Connection String parameters Prevention • Command Timeout • Connect Retry Count Execution • How to monitor my connections Monitor
  • 12. Best Practices – Configuration Wrong DNS Ports outbound Antivirus/Windows Firewall Your ISP Provider Public IP Azure VM DNS not updated, missing, invalid. Outside: 1433 Inside: 11000-11999 / 14000-14999 Port 1433 is blocked as outbound Ephemeral ports are not available Client IP is blocked Azure SQL Proxy is blocked or changed VM needs a Public IP Geo-Replicated User Orphaned Logins
  • 13. Best Practices – Prevention tcp:yourservername.data base.windows.net,1433 Connection Timeout=30 Latest version of ADO.NET, Microsoft JDBC, ODBC Contained User instead of Logins Connection Pooling Open/close the connection as fast as possible Connection may fail – Retry Logic is key - EF and NET.4.6.1 Avoid idle connections – ConnectRetryInterval and ConnectRetryCount Try .. Catch for all connections and command executions MultipleActiveResultSets
  • 14. Best Practices – Prevention public bool HazUnaConexionConReintentos(string clsConexion, C.SqlConnection sqlConnection, bool bInstanciaCadaVez=false) { int retryIntervalSeconds = 10; bool returnBool = false; for (int tries = 1; tries <= 5; tries++) { try { Console.WriteLine("Attempt Number: " + tries.ToString()); Console.WriteLine(); if (tries > 1) { Console.WriteLine(“Wait time: " + retryIntervalSeconds.ToString() + " seconds"); Console.WriteLine(); H.Thread.Sleep(1000 * retryIntervalSeconds); retryIntervalSeconds = Convert.ToInt32(retryIntervalSeconds * 1.5); C.SqlConnection.ClearAllPools(); } if (bInstanciaCadaVez) { sqlConnection = new C.SqlConnection(); } sqlConnection.ConnectionString = clsConexion; sqlConnection.Open(); // Sólo para conexiones que se reconectan. sqlConnection.Execute(). De forma automática tenemos 2 nuevas propiedades en la cadena de conexión. // ConnectRetryCount(Default is 0.Range is 0 through 255.) // ConnectRetryInterval(Default is 1 second.Range is 1 through 60.) // Connection Timeout (Default is 15 seconds.Range is 0 through 2147483647) //Specifically, your chosen values should make the following equality true: //Connection Timeout = ConnectRetryCount * ConnectionRetryInterval //For example, if the count = 3, and interval = 10 seconds, a timeout of only 29 seconds would not quite give the system enough time for its 3rd and final retry at connecting: 29 < 3 * 10. returnBool = true; break; }
  • 15. Best Practices – Prevention – (continued) catch (C.SqlException sqlExc) { if (sqlExc.Number == 4060 || sqlExc.Number == 40197 || sqlExc.Number == 40501 || sqlExc.Number == 40613 || sqlExc.Number == 49918 || sqlExc.Number == 49919 || sqlExc.Number == 49920 || sqlExc.Number==18456) //18456 for demo. Login Failed. // 4060 Cannot open database "%.*ls" requested by the login. The login failed // 10928 "The %s limit for the database is %d and has been reached. See http://go.microsoft.com/fwlink/?LinkId=267637 for assistance.") // 17830 SRV_LOGIN_TIMERS // 40197 The service has encountered an error processing your request // 40501 The service is currently busy. Retry the request after 10 seconds. Incident ID: %ls. Code: %d. // 40613 Database unavailable // 40615 Blocked by firewall // 49918 Cannot process request. Not enough resources to process request // 49919 Cannot process create or update request. Too many create or update operations in progress for subscription "%ld // 49920 Cannot process request. Too many operations in progress for subscription "%ld // 18456 Login Error, for testing, pretend network error is transient. // See more: https://azure.microsoft.com/en-us/documentation/articles/sql-database-develop-error-messages/ { Console.WriteLine(“Connectivity error: " + sqlExc.Number.ToString() + '-' + sqlExc.Message ); Console.WriteLine(); C.SqlConnection.ClearAllPools(); continue; } else //{ throw sqlExc; } { Console.WriteLine(“No more options!!" + sqlExc.Number.ToString() + '-' + sqlExc.Message); Console.WriteLine(); C.SqlConnection.ClearAllPools(); } } } return returnBool; }
  • 16. Best Practices – Execution Avoid to use select * and return just needed rows Execution timeout Distributed transactions Cross-Queries UTC, Language Short Batches Indexes and Statistics Transaction.Scope sp_execute_remote AT TIME ZONE Language in the connection string
  • 17. Best Practices – Execution CREATE EVENT SESSION ssEventoTimeout ON DATABASE ADD EVENT sqlserver.sql_batch_completed ( ACTION (sqlserver.client_app_name,sqlserver.client_connection_id,sqlserver.client_hostname,sqlserver.client_pid,sqlserver.database_id,s qlserver.database_name,sqlserver.session_id,sqlserver.sql_text,sqlserver.username) WHERE ([result] <> (0))) ADD TARGET package0.asynchronous_file_target( SET filename=’https://azureblobcontainer.blob.core.windows.net/xe-container/DemoPersistedTimeout.xel’) If you need to reproduce a TSQL command timeout, basically you need to: Create a stored procedure that takes more time that you expected in your application: create PROC usp_Timeout as select 1 waitfor delay ’00:00:10′ Try to specify in the SQL SERVER Management Studio->Command Timeout or in your application change the command timeout parameter with a value less than you have in waitfor (in this case, 5 seconds) using (SqlConnection awConnectionDb = new SqlConnection(connectionStringDb)) { awConnectionDb.Open(); SqlCommand cmd1 = awConnectionDb.CreateCommand(); cmd1.CommandTimeout = 5; cmd1.CommandText = string.Format(“usp_Timeout”); cmd1.ExecuteNonQuery(); }
  • 18. Best Practices – Monitoring Internal Telemetry SQL Auditing SQL Connection Statistics and StopWatch Query Data Store, QPI
  • 19. Best Practices – Monitoring Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); awConnection.StatisticsEnabled = true; string productSQL = "SELECT top " + nRows.ToString() + "* FROM ValoresEjemplo"; SqlDataAdapter productAdapter = new SqlDataAdapter(productSQL, awConnection); DataSet awDataSet = new DataSet(); awConnection.Open(); productAdapter.Fill(awDataSet, "ValoresEjemplo"); IDictionary currentStatistics = awConnection.RetrieveStatistics(); long bytesReceived = (long)currentStatistics["BytesReceived"]; long bytesSent = (long)currentStatistics["BytesSent"]; long selectCount = (long)currentStatistics["SelectCount"]; long selectRows = (long)currentStatistics["SelectRows"]; long ExecutionTime = (long)currentStatistics["ExecutionTime"]; long ConnectionTime = (long)currentStatistics["ConnectionTime"]; Console.WriteLine("BytesReceived: " + bytesReceived.ToString()); Console.WriteLine("BytesSent: " + bytesSent.ToString()); Console.WriteLine("SelectCount: " + selectCount.ToString()); Console.WriteLine("SelectRows: " + selectRows.ToString()); Console.WriteLine("ExecutionTime: " + ExecutionTime.ToString()); Console.WriteLine("ConnectionTime: " + ConnectionTime.ToString()); Thread.Sleep(1000); stopWatch.Stop(); TimeSpan ts = stopWatch.Elapsed; string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10); Console.WriteLine("RunTime " + elapsedTime); awConnection.ResetStatistics();
  • 20. Customer can change the connection to proxy only (we do not do this but customer can). Not Preferred Here is documentation on this: https://msdn.microsoft.com/en-us/library/azure/mt604380.aspx https://msdn.microsoft.com/en-us/library/azure/mt604439.aspx Here is a script that does this very easily for the customer and a selected server that was found on Github (have tested it myself) https://github.com/robotechredmond/Azure-PowerShell-Snippets/blob/master/AzureRM%20- %20Reconfigure%20Azure%20SQL%20Server%20Connection%20Policy%20Type.ps1#L1 This really should only be if the customer absolutely cannot open those outgoing ports and we have confirmed that is in fact the issue, the above troubleshooting steps should allow us to do so. The other consideration is this is per server so in multiple servers, they all have to be configured. Do push for opening the ports and indicating it is for outgoing traffic only.
  • 21. How to solve issues
  • 22. How to solve connectivity most common issues • NetSh • PortQueryUI • Ping/psPing Client Side • Rules • Firewall • Global Protection Corporate Network Side • Application Insights • Application Logs • Alerts Azure Side

Editor's Notes

  • #8: TLS: https://technet.microsoft.com/en-us/library/cc784450(WS.10).aspx y https://blogs.msdn.microsoft.com/sqlserverfaq/2012/04/04/can-tls-certificate-be-used-for-sql-server-encryption-on-the-wire/