Patrick Flynn | Link Group Australia Optimizing your management of SQL Server with SSMS and SQL Operations Studio The 2018 Edition
Who Am I Patrick Flynn MCM – SQL Server 2008 MCSM – Data Platform Twitter @sqllensman email sqllensman@outlook.com Happy to answers any queries on this or any other SQL Server issues MCM – SQL Server 2008 MCSM – Data Platform Production DBA for 10+ years.
SSMS 17.4 SQL Operations Studio Third Party Add-Ins
SQL Server Management Studio V17.x Latest generation of SQL Server Management Studio Runs only on Windows Separate Download from SQL Server Free Can be installed with SSMS versions 16.x or earlier First Public Preview – November 2017 Current Version
SSMS setup options Tools => Options Control Environment Options Startup Query Options etc Works great for attribution of code that you grabbed from the interwebz Also great for pointing at a wiki or internal documentation
Templates + CTRL + SHIFT + M Demo Templates + CTRL + SHIFT + M Template Replacement Using templates for saved/reusable scripts <label, datatype, default value>
SSMS Query Shortcuts 3 Built-in, non-customizable 9 customizable shortcuts Get to frequent queries quickly Highlight text, then use shortcut key combination SELECT TOP 10 * FROM Highlight table name, hit Ctrl+3
SSMS External Tools Shortcuts Setup Shortcuts to run External Programs Launch frequently used programs. Eg Excel PowerShell
SSMS has a web browser built-in CTRL + ALT + R URLs in your comments are clickable Works great for attribution of code that you grabbed from the interwebz Also great for pointing at a wiki or internal documentation
Management Studio Tabs Drag-drop a tab in SSMS to re-order Drag a tab out of SSMS to float/undock Pin a tab to your SSMS Query window Also WindowFloat from the menu One difference between Chrome & SSMS is that dragging a tab OUT will create another full window of Chrome, complete with menu bars, etc. In SSMS, your tab literally floats outside the existing SSMS. Both your “main” SSMS and your floating tab are in focus at the same time
Results as separate tab Results as separate tab, instead of results pane F6 to switch between tabs Ctrl+R to hide the results pane won’t work, because there’s no results pane Good for when screen real estate matters Laptop screen Projector Long queries You’ll see most presenters using this, but I love it anytime I’m working on my teeny tiny 13” laptop screen. NOTE: This won’t affect tabs already open. You’ll need to open a new tab.
Include query in result set Makes a quick report that also includes a record of what query you used to generate the results Auditors love this “Proves” what query generated the results One-time ad-hoc queries for end users Never lose the script you used to generate the output One-time queries are rarely one-time—they’ll want it again next month or next year Setting is available for both “Results to Grid” and “Results to Text” … With “Results to Text” it will appear on your Results tab. With “Results to Grid” it will appear on the Messages tab.
Editing Options Bookmarks Find and Replace Column and Block Editing Regular Expressions Code Snippets First Public Preview – November 2017 Current Version
Additional Tools and Explorers Object Explorer Details Solution Explorer Activity Monitor Registered Servers XEvent Profiler Vulnerability Assessment Reports First Public Preview – November 2017 Current Version
SSMS Keyboard shortcuts (the ones you probably already know) Ctrl + Tab / Ctrl + Shift + Tab – Switch tabs Ctrl + R – Show/hide Results pane Ctrl + L – Get estimated execution plan Ctrl + M – Include actual execution plan Ctrl + (K,C) – Comment selected text Ctrl + (K,U) – Uncomment selected text Shift + Alt + Enter – Toggle full screen Ctrl + U – Move cursor to database-selection dropdown https://docs.microsoft.com/en-au/sql/ssms/sql-server-management-studio-keyboard-shortcuts https://www.mssqltips.com/sqlservertip/2413/sql-server-management-studio-keyboard-shortcuts-part-1-of-2/ https://www.mssqltips.com/sqlservertip/2415/ssms-keyboard-shortcuts-part-2-of-2/ https://www.red-gate.com/simple-talk/sql/sql-training/ssms-the-query-window-keyboard-shortcuts/
Management Studio Demos
SSMS 17.4 SQL Operations Studio Third Party Add-Ins
SQL Operations Studio Open sourced and is in GitHub Free Lightweight cross platform tool Runs on Windows, Linux and macOS Open sourced and is in GitHub Still in Preview! First Public Preview – November 2017 Current Version
Features Customizable Database Dashboard First Public Preview – November 2017 Current Version
Features ‘Search Widget’ inside your Database Dashboard First Public Preview – November 2017 Current Version
Features Use Code Snippets by Typing ‘sql’ in Editor First Public Preview – November 2017 Current Version
Features Peek Definition Feature – familiar to folks working in Visual Studio IDE First Public Preview – November 2017 Current Version
Features Exporting query results to CSV, Excel and JSON First Public Preview – November 2017 Current Version
Features Github Source Control Integration with Ops Studio First Public Preview – November 2017 Current Version
Features Color Themes and Customization First Public Preview – November 2017 Current Version
SQL Operations Studio Demos
SSMS 17.4 SQL Operations Studio Third Party Add-Ins
Questions? ? ? ? ? ? ? ? @sqllensman ? Patrick Flynn ? ? ? ? ? ? ? ?
Social Make sure you tweet on #sqlsat702 or #sqlsatmalaysia Don’t forget to thank Sponsors, Volunteers and Speakers!
Resources Wayne Sheffield – A month of SSMS Andy M Mallon – AM2 http://blog.waynesheffield.com/wayne/archive/2018/01/a-month-of-ssms/ Andy M Mallon – AM2 https://am2.co/2016/03/shortcuts-cheat-sheet/ https://am2.co/2017/09/shortcuts-recording/ Drew Furgiuele http://port1433.com/2017/11/16/building-custom-widgets-in-sql-operations-studio/ http://port1433.com/2017/11/20/importing-registered-servers-from-ssms-into-sql-operations-studio/ http://port1433.com/2017/11/27/0-to-60-with-source-control-inside-of-sql-operations-studio/
Resources Microsoft SQL Server Tools Regular Expressions https://docs.microsoft.com/en-us/sql/tools/overview-sql-tools https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms https://docs.microsoft.com/en-us/sql/sql-operations-studio/what-is https://github.com/Microsoft/sqlopsstudio https://docs.microsoft.com/en-us/sql/relational-databases/security/sql-vulnerability-assessment Regular Expressions https://www.youtube.com/watch?v=vrboAJImPGk