Increasing your Coding Speed in SQL Server Management

  • Slides: 44
Download presentation
Increasing your Coding Speed in SQL Server Management Studio SAMIR BEHARA

Increasing your Coding Speed in SQL Server Management Studio SAMIR BEHARA

About Me I am Samir Behara. Currently working as a Senior Developer in EBSCO

About Me I am Samir Behara. Currently working as a Senior Developer in EBSCO Industries, Birmingham. More than ten years of experience in IT industry, working on large-scale enterprise applications involving complex business functions, web integration, and data management in various domains like Insurance, Manufacturing and Publishing. Twitter – @samirbehara Linked. In -- https: //www. linkedin. com/in/samir-behara-78953870 Website – www. dotnetvibes. com Steel City SQL User group - https: //www. meetup. com/Steel. City. SQL/

 What we will try to cover in this session? SSMS Tips and Tricks

What we will try to cover in this session? SSMS Tips and Tricks Boost Productivity SSMS 2016 Enhancements Increase Coding Speed

SSMS 2016 Productivity Enhancements

SSMS 2016 Productivity Enhancements

SQL Server Management Studio 2016 • SSMS 2016 is FREE. • SSMS is an

SQL Server Management Studio 2016 • SSMS 2016 is FREE. • SSMS is an independent web installer. • SSMS is decoupled from the underlying SQL Server Engine. • SSMS now uses Visual Studio 2015 isolated shell. • More frequent releases for new features, enhancement and bug fixes.

New Installation Experience with SSMS 2016

New Installation Experience with SSMS 2016

Navigation Buttons Move quickly between various tabs ‘Navigate Backward’ button has a drop-down list

Navigation Buttons Move quickly between various tabs ‘Navigate Backward’ button has a drop-down list box containing the list of all your navigation history.

Automatic Check for Updates Built in notification system to alert users about updates for

Automatic Check for Updates Built in notification system to alert users about updates for new releases.

Option to manually check for updates SSMS is up to date

Option to manually check for updates SSMS is up to date

Vertical Scroll Bar Enhancements The enhanced scroll bar displays different colors on the vertical

Vertical Scroll Bar Enhancements The enhanced scroll bar displays different colors on the vertical bar – • • Red – Syntax Errors Blue – Current Cursor Position Green – Saved Changes Yellow – Unsaved Changes

Quick Launch – The search tool • Search features & options inside SSMS •

Quick Launch – The search tool • Search features & options inside SSMS • No need to remember any shortcuts

Improvements to Execution Plan window • Allows you to zoom the contents of the

Improvements to Execution Plan window • Allows you to zoom the contents of the execution plans. • CTRL + Mouse Scroll to increase/decrease size of execution plan.

Compare Execution Plans ‘Compare Showplan’ feature allows side by side comparison of two execution

Compare Execution Plans ‘Compare Showplan’ feature allows side by side comparison of two execution plans.

Dual Properties Window Choose specific operator and compare – • Actual Number of rows

Dual Properties Window Choose specific operator and compare – • Actual Number of rows • Estimated Operator Cost • Number of rows read

Compare Global Properties Choose the SELECT operator and view – • Compile Time •

Compare Global Properties Choose the SELECT operator and view – • Compile Time • Estimated Subtree Cost • Missing Indexes

Color Theme • Option to switch between 2 color themes – Blue and Light

Color Theme • Option to switch between 2 color themes – Blue and Light • Dark theme and high DPI support to be enabled in future releases

SSMS Tips and Tricks

SSMS Tips and Tricks

Type less and generate more code Code Snippets are ready-made snippets of code, which

Type less and generate more code Code Snippets are ready-made snippets of code, which you can insert into your T-SQL code. Expansion Snippet Type - CTRL K + X Surround With Snippet Type - CTRL K + S

Reuse code by creating Custom Code Snippet Create your own Code Snippet using XML

Reuse code by creating Custom Code Snippet Create your own Code Snippet using XML Register the Code Snippet in SSMS Invoke the Code Snippet

Get Row Count of tables without executing a T-SQL script Click F 7 or

Get Row Count of tables without executing a T-SQL script Click F 7 or go to View -> Object Explorer Details window

Save connection information of frequently accessed servers 1 Registered Servers 2 3

Save connection information of frequently accessed servers 1 Registered Servers 2 3

Execute a SQL Query against multiple servers at the same time 1 2 No

Execute a SQL Query against multiple servers at the same time 1 2 No need to connect to different database instances one by one and execute the same query multiple times.

Save time by leveraging pre-defined SQL scripts 2 1 Template Browser 3

Save time by leveraging pre-defined SQL scripts 2 1 Template Browser 3

Use Keyboard Shortcuts to increase efficiency CTRL+TAB to switch between tabs Shortcuts Action CTRL+R

Use Keyboard Shortcuts to increase efficiency CTRL+TAB to switch between tabs Shortcuts Action CTRL+R Toggle between displaying and hiding Results Pane CTRL+N Open new query tab with current database connection CTRL+L Display estimated execution plan of the query SHIFT+ALT+ENTER Toggle between Code Editor being displayed in Full Screen CTRL + ] Navigate to the matching parenthesis CTRL+K+X Insert SQL Code Snippets CTRL+SHIFT+U Change text to upper case CTRL+SHIFT+L Change text to lower case CTRL+K+C Comment selected text CTRL+K+U Uncomment selected text Using Keyboard shortcuts for repetitive day to day actions

Maximize your workspace with multiple code windows 1 2 Horizontal/Vertical Tab Groups

Maximize your workspace with multiple code windows 1 2 Horizontal/Vertical Tab Groups

Use custom colors to differentiate between environments

Use custom colors to differentiate between environments

1 Set different colors for connection to separate environments 2

1 Set different colors for connection to separate environments 2

Reuse your copied items by storing in memory Cycle Clipboard Ring - CTRL+SHIFT+V Allows

Reuse your copied items by storing in memory Cycle Clipboard Ring - CTRL+SHIFT+V Allows you to keep track of last 20 items you have cut/copy and reuse them

Edit multiple lines of code at the same time Vertical Block Select Mode Keyboard

Edit multiple lines of code at the same time Vertical Block Select Mode Keyboard Shortcut – ALT + SHIFT + Arrow Keys Mouse – ALT + Left-Click + Drag

Leverage built in Performance Reports in SSMS Standard Reports for Performance Monitoring & Troubleshooting

Leverage built in Performance Reports in SSMS Standard Reports for Performance Monitoring & Troubleshooting

Generate SQL Insert scripts using SSMS 2 1 ‘Generate and Publish Scripts’ Wizard

Generate SQL Insert scripts using SSMS 2 1 ‘Generate and Publish Scripts’ Wizard

Troubleshoot issues with Intellisense in SSMS Edit -> Intelli. Sense -> Refresh Local Cache

Troubleshoot issues with Intellisense in SSMS Edit -> Intelli. Sense -> Refresh Local Cache

Recover your unsaved SQL queries in SSMS Configure the ‘Auto-Recovery’ option to be helpful

Recover your unsaved SQL queries in SSMS Configure the ‘Auto-Recovery’ option to be helpful during SSMS Crashes & Sudden machine reboots

 If you don’t get File Recovery prompt, navigate to the backup file location.

If you don’t get File Recovery prompt, navigate to the backup file location. SSMS tries to recover unsaved queries, incase of unexpected SSMS shutdown.

Customize your environment for better productivity Personalize the toolbar by placing frequently used buttons

Customize your environment for better productivity Personalize the toolbar by placing frequently used buttons

 Add buttons to the toolbar

Add buttons to the toolbar

Take assistance of online articles from within SSMS Click on ‘Web Browser’ icon or

Take assistance of online articles from within SSMS Click on ‘Web Browser’ icon or use CTRL+ALT+R to open web browser inside SSMS

 Leverage Horizontal/Vertical Tab Group Feature to have your SQL Query and Web Browser

Leverage Horizontal/Vertical Tab Group Feature to have your SQL Query and Web Browser in side by side

More information… More in-depth details on my blog – https: //dotnetvibes. com/my-sqlshack-articles/ SQL Scripts

More information… More in-depth details on my blog – https: //dotnetvibes. com/my-sqlshack-articles/ SQL Scripts used for the purpose of this presentation are upload in – https: //gist. github. com/samirbehara

THANK YOU

THANK YOU