Every time I right-click an object in SSMS 2016 and click Script Object As > CREATE To > New Query Editor Window, I get the prompt below. Not sure if I changed a setting or what, but was hoping someone knew how to make it so it doesn't prompt to open a new connection each time.
Connect to Database Engine Prompt on Script Object – SSMS SQL Server 2016
sql-server-2016ssms
Related Question
- Microsoft SQL Server Management Studio – default table view, default table parameters
- SQL Server – How to Get an Object’s ‘Script As’ Script Through Code
- SQL Server – SSMS 2016 Context Menu Delay for Indexes
- Sql-server – My SSMS is bringing wrong object in “Script Stored Procedure as” > “CREATE To” > “New Query Editor Window”
- SSMS – Reconnect ‘Not Connected’ Query Windows
- Sql-server – Unable to connect to Listener after rebuild
- SQL Server – How to Fix SSMS Not Opening Popup Wizard to Create a New Schema
Best Answer
I was able to reproduce the problem you're encountering.
Originally, I wasn't being prompted like you are being prompted. There is a button just to the right of New Query that invokes the Database Engine Query. This button would be very easy to click because it's close the the New Query button
This brings up the connection dialog box you are experiencing. The problem is, once you click this button, you will continually be prompted for a connection until you exit out of SSMS and come back in (at least, that is how I corrected the problem).