Wednesday, February 14, 2018


Do you Encrypt your Remote Connections to SQL Azure Databases?

If you’re not encrypting connections to SQL Azure (or any remote SQL Server instance), then you probably should.

Encrypted connections to SQL Server use SSL,  and that is about as secure as you can get (currently).

[Remember: SSL protects only the connection, i.e. the data as it is transmitted ‘on the wire’ between the client and SQL Server. It says nothing about how the data is actually stored on the server].


When you open SSMS’s ‘Connect to Server’ dialog, click the bottom right ‘Options’ button, and make sure you tick the checkbox ‘Encrypt Connection’:



Ensure you add the -N command line option. The -N switch is used by the client to request an encrypted connection. This option is equivalent to the option ENCRYPT = true.


sqlcmd –N –U username –P password  –S servername –d databasename –Q “SELECT * FROM myTable”

Linked Servers

When creating a linked server to SQL Azure,  the @provstr parameter must be set to 'Encrypt=yes;’:

-- Create the linked server:

EXEC sp_addlinkedserver
     @server     = 'LocalLinkedServername',
     @srvproduct = N'Any',
     @provider   = 'SQLNCLI',
     @datasrc    = '???', -- Azure server name
     @location   = '',
     @provstr    = N'Encrypt=yes;',       -- <<--  Important!
     @catalog    = 'RemoteDatabaseName';  -- remote(Azure) database name

ADO.NET Connection strings

Add “ENCRYPT = true” to your connection string, or set the SqlConnectionStringBuilder property to True.

[Remember: don’t distribute passwords by sending as plaintext over the Internet, i.e. don’t email passwords! ]

Tuesday, February 06, 2018


Installing TensorFlow with GPU support on Windows 10

If you have a high end NVidia graphics card and you’re investigating data science with Keras+Tensorflow, then you obviously want Tensorflow to take advantage of your GPU (training times for deep neural networks can be 10 – 15 times faster even when compared to the latest CPUs).

Getting it all working can be tricky: I found this guide that explains the steps: Installing TensorFlow with GPU on Windows 10

Here’s another: How to run TensorFlow with GPU on Windows 10 in a Jupyter Notebook


Powered by Blogger