SQL Server 2016 Management Studio doesn't keep line numbers - ssms

I can't get SQL Server 2016 Management Studio to remember that I want line numbers. Every time I open an instance, I have to turn line numbers on, but when I open a new instance, they've been turned off again.
Does anyone know how to make them stay on permanently or whether this is a bug within SSMS?

Even though the answer to this question was already given, i was looking for how to put line numbers on the editor and the answer was not given, so here it is!
Step1: Go to Tools > Options.
Step2: In the Options dialog box navigate to Text Editor >
Transact-SQL > General.
Step 3: Check “Line Numbers” and click on “OK” Now, when a query
window is opened Line Numbers will be displayed

Related

How to execute SQL in the IntelliJ Ultimate SQL Console?

In IntelliJ Ultimate 2017.2, the SQL Console opened from the Database panel lets me enter some SQL.
Unfortunately, when I click the green triangle icon in its upper-left corner, sometimes my SQL executes and sometimes it does not. Sometimes I need to select all the text before hitting the triangle to make it execute, sometimes I do not. Apparently there is some logic or magic trick intended by this tool that escapes me.
➠ How to execute the SQL Console?
The documentation for Database Console says:
Use this icon or shortcut to execute the selected (highlighted) SQL statement or statements.
If nothing is selected, the current statement is executed.
That is not the behavior I see when running on macOS Sierra 10.12.5.
You can control what IDE executes on this action in the Preferences/Settings > Tools > Database > Execute in Console.
You may want to set some of those to the Whole script.

How do i shut off auto fill / autocomplete SSMS 2012?

In SSMS 2012
when I type "a." SSMS auto populates "ABS."
When I type "b." SSMS auto fills "basecamp"
When I type "d." SSMS auto fills "db_accessadmin."
and so on.
This auto fill is terribly frustrating when writing code, especially with joins. Obviously, there's some "auto complete" type setting beyond typical intellisense I have activated.
Anyone know what SSMS setting I need to change to eliminate the autocomplete feature? I do want to retain Intellisense where it fills regular field names. My peers are stumped too.
Thanks in advance.
I think I solved this. It appears to be related to "auto list members" feature. To disable
Go to Tools > Options > Text Editor > Transact-SQL > General
Ensure "auto list members" is unchecked
I found this via some hours of trial and error.
It is called IntelliSense, you can turn it on and off from the Edit menu (IntelliSense -> Toggle Completion Mode) or using the CTRL+ALT+SPACE (default) combination or in the settings of SSMS.
You can turn it on or off, there is no way (what I know) to disable only parts of it.
You may want to consider to install an SSMS plugin which replaces IntelliSense, such as
RedGate's SQL Prompt
Apex's SQL Complete

Show executed query in Microsoft SQL Server 2016

In MySQL Workbench, after editing a column, table, or whatever, it will show the query for that action.
I could not find a similar feature in SQL Server 2016. I just want to view the SQL for the action I perform, such as editing a column.
Is it possible?
Something I've always set is Auto generate change scripts which can be found within the options:
This shows the script and prompts you to save it.
If I don't want it so that every time I do a change it prompts me I use the Generate Change Script icon (first icon below):
This is usually greyed out until you make a modification then you can click it. However the annoying thing is you have to click the icon to generate the script prior to saving the modification.
Downloaded SSMS 2016
The icon has slightly changed. In 2016 this is what you are looking for:
You will want to use the first icon on the toolbar above.
There is also a menu that appears called Table Designer. From there you can also generate the change script. This isn't a new feature in 2016 it was something I noticed when looking for the icon.

Edit arbitrary database values with the SQL Server Management Studio GUI

In MySQL Workbench, as long as you can display a row, you can edit it by typing in the cells.
Is there any way to do that with SQL Server Management Studio? SSMS seems limited to providing a GUI editor for the top 200 entries.
You can edit the query used to display the rows to edit by opening the "Query Designer" menu and selecting "Pane"->"SQL".
Once you've made your changes open the "Query Designer" menu and click "Execute SQL".
(Note these commands are also available on the toolbar and have hotkeys associated with them by default).

SQL Management Studio 2008 - Server name on Query Editor tabs...where did they go?

I recently upgraded to SQL Management Studio 2008 (full not express, if it matters).
In 2005, when I was in the Query Editor, each tab (with an unsaved query) would have the servername-instance-query name or something like that, but all I cared about was seeing the server name there so I knew which server I was running my query on.
In 2008 it appears that they've decided to change the tab title to query name-servername, and the result of this is I can't see what server I'm working on without hovering over the tab and looking at the tooltip thing that pops up, which really slows me down. So currently all my tabs are titled something like "SQLQuery5.sql..." which is useless to me.
How can I get the servername back to the front the tab title?
It can be turned off/on in SSMS 2005, so possibly in 2008 you have it switched off.
Go to Tools -> Options -> Text Editor -> Editor Tab and Status Bar. Under "Tab Text" in the right hand panel, make sure "Include server name" is set to True.
If you have the SQL Editor menu checked up top then there is a drop down that tells you exactly what database you're in for the currently selected tab.
You should be running any queries in the active window? At the bottom there is a status bar with the server name and database name in it. That way you don't have to clutter the limited tab space with all that data.