Geek Sync I Working with SQL Server for Linux Cross-Platform

How confident are you working with SQL Server on Linux? With this platform becoming increasingly popular it is important for SQL experts to become more knowledgeable for their employers.

Join IDERA and Maximo Trinidad on July 12th as he explores the latest build of SQL Server for Linux, including everything you need to install and connect to SQL Server. He will also look into the tools that are available to use from Linux and / or Windows. Maximo will provide samples on querying for database information using Python/Java and PowerShell between two environments. This will be a demo intensive session you will not want to miss!

You can view Max's slides here.

You can view Max's scripts below.


sudo mount.cifs //win10ent01/CrossPlatScripts /home/maxt/CrossPlatScripts -o user=maxt

sudo mount.cifs //w2k12Sql01/TempSQLBackups /var/opt/mssql/TempSQLBackups -o user=maxt

sudo umount //win10ent01/CrossPlatScripts

sudo umount //w2k12Sql01/TempSQLBackups

Demo Outline:

1. Using you tools
VS Code
SSMS Windows/Linux SQL Server
Create/Mount you folders
Restore Database

2. Python 3.6 (Anaconda)

3. PowerShell Getting SQL Results:

4. Python/PowerShell Integration:
Function Out-CsvToGridView.ps1
import tkinter
from tkinter import *
import csv
import sys

## - Prepare GUI envelope:
root = Tk()

## - Open CSV file from folder location:
with open(str(sys.argv[1]), mode='r') as csvfile:
    ## - Created Title for GUI application:
    root.title("LittleGridView - " + sys.argv[1])
    ## - Loads CSV file:
    csvdata = csv.reader(csvfile, delimiter=',', quotechar='"')

    ## - Reading CSV data from memory:
    for i, rec in enumerate(csvdata, 0):
        col = 0

        ## - For loop for each column(s) found:
        for c in rec:

            ## - Adjust columns default values:
            if col == 0:
                colWidth = 25
                colWidth = 20
            ## - Font Section:
            if i == 0:
                myFg = 'White'
                myBg = 'Black'
                myFg = 'Black'
                myBg = 'Yellow'

            ## - Build the datagrid:
            Label(root, text=c.replace('"', '').replace('', ''), bg = myBg, fg = myFg, relief=RIDGE, width=colWidth, anchor=W).grid(row=i, column=col)
            col = col + 1
        ## - Stop displaying record limited to 20 rows:
        if i == 20:
            #resp = input('Enter Y to Continue: ')