SSMS Tips

SSMS - Work in progress

Cycle ClipBoard Ring


Albany*

%parks%

Liberty County%


copy each

CTRL + Shift + V - each time click moves back through list 

Select * from customers where Customername like 'Liberty County%'

Move Line up or down - multiple lines

ALT = up

ALT = down


Albany*

Liberty County%

%parks%

Vertical block Select mode or Column mode

alt key


LSTNAME

LSTNAME

LSTNAME

 

Color selection

when connecting - Click on options - Connection Properties - use custom color

Will show color in Status bar

 


Quick table row count

Object Explorer Details


F7

Right click and choose cols

 

moving registered servers & other through PS

PS - using scripting tools called DBA tools.

dbatools.io

NOTES on PS

Get-Module -ListAvailable

$env:PSModulePath  -- place it in one of the directories in your

PS C:\Program Files\WindowsPowerShell\modules> get-ExecutionPolicy

Restricted


PS C:\Program Files\WindowsPowerShell\modules> Set-Executionpolicy AllSigned


PS C:\Program Files\WindowsPowerShell\modules> get-ExecutionPolicy

AllSigned


PS C:\Program Files\WindowsPowerShell\modules> Set-PSRepository -Name PSGallery -InstallationPolicy Trusted


PS C:\Program Files\WindowsPowerShell\modules> Install-Module dbatools


PS C:\Program Files\WindowsPowerShell\modules> Import-Module dbatools


PS C:\Program Files\WindowsPowerShell\modules> Get-DbaDatabase -SqlInstance


Get-DbaDatabase -sqlinstance ccgdevdb\sql2016, ccgdevdb\sql2019 -Database stRhodeIslandVBDotNet

Get-DbaDatabase -sqlinstance andersonsqlserver.dataabse.windows.net

Regular expressions (Sean Mcallin midnight dba - expression champ)  https://www.youtube.com/watch?v=aS5tsxipxQ0

^L


^[LJ]  --starts with

c.ts


Can use in Find 

Select * from customers where n

 

Quick Launch

--similar to vs code  ctrl-shift-p    'Command pallete'

ssms top right

e.g upper  or lower 12UF-3RT99-XY

 

compare showplan

--must have xecutionplan saved to disk 1st

select * from customers

select Customerid from customers 


Also in execution plan Ctrl + f e.g. Database - Contains - Review

 

 Delete horizontal White Space  

 ctrl + K, ctrl + \

 mike, john, sue,      pete. po, mo,     ,ko


Filter objects in Object Explorer

Click table >filer > filter settings


Display Line Number


> options >Text Editor > all Languanges  > 


View Multiple Queries and Results Side by Side

Window - > New vertical Tab Group


open as specific domain name  / user

runas /netonly user: manderson "C:\programfiles\ssms.exe"

or from shortcut use shift

  Replace

  ctrl+ H  e. g  [   with space


Scroll bar - Options  >

for long list - right click scrollbar options

* Use map mode

 


Copy whole line without selecting it


only use ctrl + C without highlighting line or ctrl X & ctrl V

 

Go Command


select 1 + 1

Go 3

 

windows manager ctrl + tab

 

Change database

  CTRL + U

 

moving between brackets ctrl + ]

(understands nesting

 

USe bookmarks

CTRL K,K

CTRL K,N  move between lines Next

CTRL K,P move between lines Previous

CTRL K,L  delete bookmark


Comments