download ssms

download ssms about 800MB 

SQL Server ssms usage

Hi, My name is Jimmy Sam. If you need DBA help, please email to for further discussion. Thanks.

quick link

mssql_02     home  
top   prev   next  

ssms usage

-- ssms for alwayson read only connection
Additional Connection Parameters


To show the Summary or Details page

On the View menu, click Object Explorer Details. 
The Object Explorer Details page opens, if it is not already open, 
and comes to the front if it is open in the background.

Or, at any time, you can press F7 to display the Object Explorer Details page.

Tools --> Options --> Text Editor --> Transact-SQL --> Display --> Line number ( Word wrap )

Display Line Numbers in SQL Server Management Studio (SSMS)

SSMS --> Tools --> Options --> SQL Server Object Explorer --> Scripting 
General scripting options:

Object scripting options: 

Table and view options
Include collation: True, default false
Script Indexes: True

options for sql server object explorer scripting page 

Options (SQL Server Object Explorer-Scripting Page) 

generating scriptsin ssms 

generate and publish script 

looking for sql server log 
Object Explorer --> Management --> SQL Server Logs --> Current --> 
( filter )
Source --> Logon
Message --> Failed

looking for sql server agent log 
Object Explorer --> SQL Server Agent --> Error Logs --> Current

To comment out a portion of your script
1): using tools bar
-- using comment button or uncomment button

comment:   Ctrl-K Ctrl-C
uncomment: Ctrl-K Ctrl-U

Press CTRL+K and CTRL+C to comment the text, 
or press CTRL+K, CTRL+U to uncomment the text. 
CTRL+K+C and CTRL+K+U: comment/uncomment select block of code

Use your mouse to select the text.
On the Edit menu, point to Advanced, and then click Comment Selection. 
The selected text is commented out with dashes (--).

ssms keyboard shortcuts 

-- format sql code
CTRL+SHIFT+Q: Open Query Designer, Paste query code, click OK

CTRL+SHIFT+U and CTRL+SHIFT+L: Change selected text to UPPER/lower case
SHIFT+ALT+Selecting text: select/cut/copy/paste a rectangular block of text ( box selection )

-- Open a new query window
Ctrl+N: Open New Query (Button) Window
Ctrl+R: Show/hide Results Pane
Ctrl+L: Display Query Execution Plan

-- to run a query in query window
f5 (working)
alt+x (working )
CTRL+SHIFT+E ( not working )
ctrl+E ( not working )
F5, CTRL+E or ALT+X: execute currently selected TSQL code

ssms shortcut

output to 1): grid  2): text  3): file
1): Using toolbar

Right Click: Result to:
Ctrl + T: get results in text mode
Ctrl + D: get results in Grid mode
Ctrl + Shift + F: get results to File

-- Turn On line number in text editor Of Query Window
In SSMS, go to Tools, Options.
Then choose and expand the Text Editor option and choose Transact SQL
There you will check "Line Numbers.

You will then have line numbers in the query window.