Download presentation
Presentation is loading. Please wait.
1
Using PowerShell with Python & SQL Server
June 10, 2017 Maximo Trinidad
2
1 2 3 4 5 Understanding Your Environment PowerShell and SQL Server
Python SQL Connectors 4 Questions 5 Reference Information
3
Understanding Your Environment
2 You’ve got to be kidding!
4
Top demand programming languages
3 SQL Java Python Javascript C++ C# Perl iOS PHP
5
Understanding Your Environment
4 Understanding Your Environment - Install component in both Windows and Linux - PowerShell Open Source - Python 2.7 (By Default) or 3.x - Python Tcl/Tk packages - Python SQL Connectors - Use OneDrive - On Bash access (/mnt/c/Users/#username#/OneDrive) - On Linux access Windows shared folders
6
Understanding Your Environment
5 Understanding Your Environment - You're New to Linux - Go “Bash-On-Ubuntu-On-Windows” - Install "Ubuntu Desktop" - PowerShell - Python - Cross-Platform Editor - VS Code lightweight Multi-language editor - Other editors -Sublime -Brains PyCharm (Robust Python Editor Windows and Linux) *Use Windows Editors to create code
7
6 Demo 1
8
PowerShell and SQL Server
7 PowerShell and SQL Server - Connecting to SQL Server for scripting - Two ways: SQLPS module and SMO - Used only Windows Desktop (or Server) *Not possible on Linux systems - Access PowerShell from SSMS - Python with PowerShell for data collection - Possibility of Cross-platform solutions - Take advantage of .NET objects in Linux
9
PowerShell and SQL Server
8 PowerShell and SQL Server
10
PowerShell and SQL Server
9 PowerShell and SQL Server
11
Connecting to SQL Server with Python
10 Connecting to SQL Server with Python Choose a Python version Use “sudo Update-Alternatives” command # update-alternatives --list python - Two SQL Connectors - pyodbc - pymssql - Connectors Behavior - pyodbc and pymssql can connect to - Windows local and Multi-instance SQLServer - Linux only single instance
12
11 Demo 2 Connecting to SQL Server with PowerShell/Python.:
13
Reference Information
13 Reference Information PowerShell Open Source: Windows PowerShell bugs use UserVoice: Python (both Windows and Linux): Python Tcl/Tk: Python SQL Server ODBC connector (pyodbc): Python Microsoft SQL Server connector (pymssql): Bash for Windows 10: Python 3.6 Anaconda in SQL Server 2017: Microsoft blog - MVP Award program Blog:
14
12 Questions
15
Contact information: Maximo Trinidad
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.